-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.eslintrc
93 lines (92 loc) · 2.62 KB
/
.eslintrc
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"plugin:react/recommended",
"airbnb"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": [
"react-hooks",
"react",
"babel"
],
"rules": {
// eslint
"indent": ["error", 4, { "SwitchCase": 1 }],
"semi": [2, "always"],
"camelcase": 0,
"max-len": [2, 200, 4],
"arrow-parens": [2, "as-needed"],
"consistent-return": 0,
"import/extensions": 0,
"import/no-unresolved": 0,
"import/prefer-default-export": 0,
"import/no-cycle": 0,
"no-bitwise": 0,
"no-plusplus": 0,
"no-shadow": 0,
"no-param-reassign": 0,
"no-restricted-syntax": 0,
"no-case-declarations": 0,
"no-mixed-operators": 0,
"no-prototype-builtins": 0,
"no-restricted-properties": 0,
"no-return-assign": 0,
"no-nested-ternary": 0,
"no-unused-expressions": 0,
// babel plugin
"babel/no-unused-expressions": 0,
// react plugin
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/button-has-type": 0,
"react/prop-types": 0,
"react/jsx-props-no-spreading": 0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".tsx"] }],
"react/jsx-first-prop-new-line": [2, "multiline"],
"react-hooks/rules-of-hooks": 2,
"react-hooks/exhaustive-deps": 2,
// jsx-a11y
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/label-has-associated-control": 0,
//eslint-import-plugin
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always"
}
]
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src"]
}
}
}
}