This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.cjs
54 lines (54 loc) · 1.5 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
module.exports = {
root: true,
env: {
node: true,
browser: true,
es2020: true
},
settings: {
react: {
version: 'detect'
}
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react-hooks/recommended'
],
overrides: [],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
plugins: ['react', '@typescript-eslint', 'react-refresh'],
rules: {
'prettier/prettier': 'warn',
'react/no-unknown-property': ['off', { ignore: ['css'] }],
'react-refresh/only-export-components': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'off',
'react/jsx-uses-react': 'error',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'prefer-const': 'off',
'@typescript-eslint/ban-types': 'off',
'no-console': 'warn',
'no-lonely-if': 'error',
'no-negated-condition': 'error',
'no-nested-ternary': 'error',
'no-useless-return': 'error',
'no-warning-comments': 'warn',
'require-await': 'error',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-var-requires': 'off'
}
}