/
.eslintrc
177 lines (177 loc) · 5 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
{
"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"overrides": [
{
"files": [
"stories/**/*.{js,jsx}"
],
"rules": {
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
}
},
{
"files": [
"src/**/*.{js,jsx,ts,tsx}",
"spec/**/*.{js,jsx,ts,tsx}",
"stories/**/*.{js,jsx,ts,tsx}"
],
"env": {
"browser": true
},
"parser": "@typescript-eslint/parser",
"plugins": [ "babel", "react", "react-hooks" ],
"rules": {
"babel/semi": 2,
"import/no-extraneous-dependencies": [
"error", {
"devDependencies": [
"**/*.stories.*",
"**/*.test.*"
]
}
],
"import/prefer-default-export": 0,
"jsx-a11y/anchor-is-valid": 1,
"jsx-a11y/label-has-for": 0,
"no-alert": 0,
"react/destructuring-assignment": 0,
"react/forbid-prop-types": 0,
"react/jsx-props-no-spreading": 0,
"react/jsx-no-target-blank": 1,
"react/jsx-no-undef": 0,
"react/jsx-one-expression-per-line": 0,
"react/jsx-sort-props": [2, {
"callbacksLast": true,
"ignoreCase": true,
"noSortAlphabetically": false
}],
"react/no-unescaped-entities": ["error", { "forbid": [">", "}"] }],
"react/prop-types": [2, { "ignore": ["children"] }],
"react/react-in-jsx-scope": [0],
"react/sort-comp": [2, {
"order": [
"static-methods",
"constructor",
"state",
"own-properties",
"/^handle.+/",
"getters",
"setters",
"everything-else",
"lifecycle",
"/^render.+/",
"render"
],
"groups": {
"own-properties": [
"instance-variables",
"instance-methods"
],
"react-methods": [
"displayName",
"propTypes",
"contextTypes",
"childContextTypes",
"mixins",
"statics",
"defaultProps",
"constructor",
"getDefaultProps",
"getInitialState",
"getChildContext",
"getDerivedStateFromProps",
"componentWillMount",
"UNSAFE_componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"UNSAFE_componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"UNSAFE_componentWillUpdate",
"getSnapshotBeforeUpdate",
"componentDidUpdate",
"componentDidCatch",
"componentWillUnmount"
]
}
}
],
"react/sort-prop-types": [2, {
"callbacksLast": true,
"ignoreCase": true,
"noSortAlphabetically": false,
"requiredFirst": false,
"sortShapeProp": true
}],
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"semi": 0
}
},
{
"files": "**/*.{ts,tsx}",
"rules": {
"react/require-default-props": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
}
}
],
"settings": {
"import/resolver": {
"node": {
"paths": ["./"]
}
}
},
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-function": "off",
"class-methods-use-this": 0,
"function-paren-newline": ["error", "consistent"],
"func-names": ["error", "never"],
"implicit-arrow-linebreak": 0,
"jsx-a11y/label-has-associated-control": [ 2, {
"assert": "either",
"controlComponents": ["AsyncSelect", "SingleSelect"],
"depth": 25,
"labelAttributes": ["label"],
"labelComponents": []
}],
"linebreak-style": 0,
"no-case-declarations": "warn",
"no-confusing-arrow": 0,
"no-loop-func": 1,
"no-plusplus": 0,
"no-restricted-syntax": 0,
"no-undef": 0,
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
"no-use-before-define": 0,
"operator-linebreak": ["error", "after"],
"prefer-destructuring": "warn",
"quotes": ["error", "single", { "allowTemplateLiterals" : true }],
"radix": 0,
"react/jsx-filename-extension": ["error", {
"extensions": [".tsx", ".jsx"]
}],
"react/jsx-fragments": 0,
"symbol-description": 0,
"template-curly-spacing": "off",
"indent": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
}
}