-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
46 lines (44 loc) · 1.45 KB
/
eslint.config.mjs
File metadata and controls
46 lines (44 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import url from 'node:url';
import { includeIgnoreFile } from '@eslint/compat';
import { defineConfig } from 'eslint/config';
import biome from 'eslint-config-biome';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import tseslint from 'typescript-eslint';
const gitignorePath = url.fileURLToPath(new URL('.gitignore', import.meta.url));
export default defineConfig([
includeIgnoreFile(gitignorePath),
{
extends: [
tseslint.configs.base, // .recommendedTypeCheckedOnly,
reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat['jsx-runtime'],
reactHooksPlugin.configs.flat.recommended,
biome,
],
languageOptions: {
parserOptions: {
projectService: true,
},
},
files: ['**/*.{ts,tsx}'],
ignores: [],
settings: {
react: {
version: 'detect',
},
},
rules: {
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/unbound-method': 'error',
'react/prop-types': 'off',
},
},
]);