-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
76 lines (76 loc) · 2.41 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
module.exports = {
parser: '@typescript-eslint/parser',
env: {
browser: true,
es2021: true,
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
typescript: {
project: '.',
},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src/', '_modules/'],
},
},
},
ignorePatterns: ['**/*.json'],
extends: [
'airbnb',
'airbnb/hooks',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended', // should be at the last
],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
plugins: ['react', 'prettier'],
rules: {
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'no-underscore-dangle': ['error', { allowAfterThis: true }],
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/no-var-requires': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
indent: 0,
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
singleQuote: true,
},
],
'react/jsx-indent': 0,
'import/extensions': 0,
'linebreak-style': 0,
'no-console': 'error',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/prefer-default-export': 0,
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['state'] }],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
radix: 0,
},
};