-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
57 lines (54 loc) · 1.75 KB
/
.eslintrc.cjs
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
47
48
49
50
51
52
53
54
55
56
57
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
env: { browser: true, es2021: true, node: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:react-hooks/recommended-legacy',
'plugin:@tanstack/query/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: ['node_modules', 'build', '.eslintrc.cjs', '.vscode'],
settings: {
react: { version: 'detect' },
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: __dirname,
projectService: true,
},
plugins: [
'@typescript-eslint',
'react',
'react-refresh',
'eslint-plugin-react-compiler',
'import',
],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
],
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
],
'import/consistent-type-specifier-style': ['error', 'prefer-inline'],
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'react-hooks/exhaustive-deps': 'warn',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'react-compiler/react-compiler': 'error',
},
};