-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
55 lines (55 loc) · 1.85 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
module.exports = {
env: {
browser: true,
node: true,
es2020: true,
},
extends: [
'standard-with-typescript',
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
rules: {
'@typescript-eslint/no-explicit-any': 0,
'no-await-in-loop': 0,
'no-underscore-dangle': 0,
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': 1,
'comma-dangle': 0,
'no-console': 0,
'no-mixed-operators': 0,
'new-cap': 0,
'max-len': 0,
'promise/always-return': 'off',
'import/no-cycle': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'off',
'import/extensions': 'off',
'object-curly-newline': ['error', { multiline: true }],
'@typescript-eslint/restrict-template-expressions': 0,
'@typescript-eslint/no-misused-promises': 0,
'react/jsx-indent': ['error', 2],
'@typescript-eslint/strict-boolean-expressions': 0,
'react/prop-types': [0],
'react/button-has-type': 'off',
'react/jsx-props-no-spreading': [0],
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'error', // Checks effect dependencies
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
plugins: ['compat', 'react', 'react-hooks'],
settings: {
react: { version: '18.0.2' },
'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'] },
},
}