-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (56 loc) · 1.77 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true,
es2021: true,
},
settings: {
react: { pragma: 'React', version: 'detect' },
},
extends: [
'eslint:recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'prettier',
'prettier/prettier',
'plugin:prettier/recommended',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['jsx-a11y', 'react', 'prettier'],
rules: {
'prettier/prettier': [
'warn',
{ endOfLine: 'auto', singleQuote: true, jsxSingleQuote: true },
],
'no-duplicate-imports': ['warn', { includeExports: true }],
'no-template-curly-in-string': 'warn',
camelcase: ['warn', { properties: 'always' }],
'default-case': 'warn',
'no-lone-blocks': 'warn',
'prefer-const': 'warn',
yoda: 'error',
'no-unused-vars': 'warn',
'react/boolean-prop-naming': ['warn', { validateNested: true }],
'react/button-has-type': 'warn',
'react/no-array-index-key': 'warn',
'react/no-unstable-nested-components': 'error',
'react/no-unused-prop-types': 'warn',
'react/no-unused-state': 'warn',
'react/self-closing-comp': 'warn',
'react/jsx-no-constructed-context-values': 'warn',
'react/jsx-no-leaked-render': [
'warn',
{ validStrategies: ['ternary', 'coerce'] },
],
'react/prop-types': 'off',
'jsx-a11y/click-events-have-key-events': 'warn',
'jsx-a11y/no-static-element-interactions': 'warn',
},
};