-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
75 lines (74 loc) · 2.23 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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'airbnb',
'airbnb/hooks',
'eslint:recommended',
'plugin:react/recommended',
'plugin:prettier/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:import/warnings',
],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', 'prettier'],
rules: {
'prettier/prettier': [
'error',
{
count: 2,
printWidth: 100,
tabWidth: 4,
bracketSpacing: true,
trailingComma: 'es5',
jsxBracketSameLine: false,
singleQuote: true,
arrowParens: 'always',
semi: true,
endOfLine: 'auto',
importOrder: [
'^react$',
'^[a-z\\-/]*$',
'(^components)',
'(^[src/]*$|^[./]|^[../])',
'',
],
importOrderSeparation: true,
experimentalBabelParserPluginsList: ['js', 'jsx'],
},
],
'react/function-component-definition': [
{
namedComponents: 'function-declaration' | 'function-expression' | 'arrow-function',
unnamedComponents: 'function-expression' | 'arrow-function',
},
],
'no-console': 'warn',
'no-eval': 'warn',
'no-proto': 2,
'react/display-name': 'off',
'react/prop-types': 'off',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react-hooks/exhaustive-deps': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-named-as-default-member': 0,
'import/no-named-as-default': 0,
'import/named': 0,
'import/export': 0,
'import/default': 0,
'import/namespace': 0,
'import/no-cycle': 'error',
'import/no-duplicates': 'error',
'no-shadow': 0,
'no-return-await': 0,
'react-hooks/rules-of-hooks': 'error',
},
};