@entva/styleguide 0.0.0 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -77
- package/package.json +29 -6
- package/.github/workflows/ci.yml +0 -14
- package/css/README.md +0 -385
- package/css/packages/stylelint/LICENSE +0 -21
- package/css/packages/stylelint/README.md +0 -27
- package/css/packages/stylelint/eslint.config.js +0 -3
- package/css/packages/stylelint/index.js +0 -84
- package/css/packages/stylelint/package-lock.json +0 -4042
- package/css/packages/stylelint/package.json +0 -42
- package/html/README.md +0 -98
- package/javascript/README.md +0 -3255
- package/javascript/packages/eslint-base/LICENSE +0 -21
- package/javascript/packages/eslint-base/README.md +0 -27
- package/javascript/packages/eslint-base/eslint.config.js +0 -3
- package/javascript/packages/eslint-base/index.js +0 -1084
- package/javascript/packages/eslint-base/package-lock.json +0 -2653
- package/javascript/packages/eslint-base/package.json +0 -36
- package/javascript/packages/eslint-react/LICENSE +0 -21
- package/javascript/packages/eslint-react/README.md +0 -27
- package/javascript/packages/eslint-react/eslint.config.js +0 -3
- package/javascript/packages/eslint-react/index.js +0 -526
- package/javascript/packages/eslint-react/package-lock.json +0 -3035
- package/javascript/packages/eslint-react/package.json +0 -42
- package/react/README.md +0 -726
- package/scripts/for-each-package +0 -12
- package/test/css.js +0 -36
- package/test/index.js +0 -7
- package/test/js.js +0 -35
- package/test/utils.js +0 -63
- package/tooling/packages/biome/LICENSE +0 -21
- package/tooling/packages/biome/README.md +0 -27
- package/tooling/packages/biome/package-lock.json +0 -183
- package/tooling/packages/biome/package.json +0 -38
- package/tsconfig.json +0 -31
- package/typescript/README.md +0 -66
- package/typescript/packages/eslint-typescript-base/LICENSE +0 -21
- package/typescript/packages/eslint-typescript-base/README.md +0 -27
- package/typescript/packages/eslint-typescript-base/eslint.config.js +0 -3
- package/typescript/packages/eslint-typescript-base/index.js +0 -272
- package/typescript/packages/eslint-typescript-base/package-lock.json +0 -3215
- package/typescript/packages/eslint-typescript-base/package.json +0 -41
- package/typescript/packages/eslint-typescript-base/tsconfig.json +0 -30
- package/typescript/packages/eslint-typescript-react/LICENSE +0 -21
- package/typescript/packages/eslint-typescript-react/README.md +0 -27
- package/typescript/packages/eslint-typescript-react/eslint.config.js +0 -3
- package/typescript/packages/eslint-typescript-react/index.js +0 -75
- package/typescript/packages/eslint-typescript-react/package-lock.json +0 -3630
- package/typescript/packages/eslint-typescript-react/package.json +0 -41
- package/typescript/packages/eslint-typescript-react/tsconfig.json +0 -30
- /package/{tooling/packages/biome/biome.json → biome.json} +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-config-entva-base",
|
|
3
|
-
"description": "Shareable entva styleguide config for eslint",
|
|
4
|
-
"author": "Max Degterev <max@degterev.me>",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"readmeFilename": "README.md",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/entva/styleguide"
|
|
10
|
-
},
|
|
11
|
-
"bugs": "https://github.com/entva/styleguide/issues",
|
|
12
|
-
"version": "2.4.0",
|
|
13
|
-
"keywords": [
|
|
14
|
-
"linter",
|
|
15
|
-
"config",
|
|
16
|
-
"eslint"
|
|
17
|
-
],
|
|
18
|
-
"type": "module",
|
|
19
|
-
"main": "index.js",
|
|
20
|
-
"scripts": {
|
|
21
|
-
"reinstall": "rm -rf node_modules package-lock.json && npm install",
|
|
22
|
-
"test": "node ../../../test ./test js",
|
|
23
|
-
"rules": "eslint --print-config file.js > eslint-ruleset-output.json",
|
|
24
|
-
"prepublishOnly": "npm test"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"eslint": "^9.16.0"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"eslint-plugin-import": "^2.31.0",
|
|
31
|
-
"globals": "^15.13.0"
|
|
32
|
-
},
|
|
33
|
-
"peerDependencies": {
|
|
34
|
-
"eslint": "^9.x.x"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Maxim Degterev <max@degterev.me> (https://max.degterev.me)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# eslint-config-entva
|
|
2
|
-
|
|
3
|
-
> Shareable entva styleguide config for eslint.
|
|
4
|
-
|
|
5
|
-
Extends [`eslint-config-airbnb`](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb).
|
|
6
|
-
|
|
7
|
-
A shareable config to enforce entva styleguide: https://github.com/entva/styleguide
|
|
8
|
-
|
|
9
|
-
To see the rules that this config uses, please read the [config itself](./index.js).
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install eslint-config-entva --save-dev
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
If you've installed `eslint-config-entva` locally within your project, just set your `eslint` config to:
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{
|
|
23
|
-
"extends": "eslint-config-entva"
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## [MIT License](LICENSE)
|
|
@@ -1,526 +0,0 @@
|
|
|
1
|
-
import baseConfig from 'eslint-config-entva-base';
|
|
2
|
-
import react from 'eslint-plugin-react';
|
|
3
|
-
import jsxA11Y from 'eslint-plugin-jsx-a11y';
|
|
4
|
-
import reactHooks from 'eslint-plugin-react-hooks';
|
|
5
|
-
import importPlugin from 'eslint-plugin-import';
|
|
6
|
-
import globals from 'globals';
|
|
7
|
-
|
|
8
|
-
export default [
|
|
9
|
-
...baseConfig,
|
|
10
|
-
{
|
|
11
|
-
files: [
|
|
12
|
-
'**/*.test.jsx',
|
|
13
|
-
'**/*.spec.jsx',
|
|
14
|
-
],
|
|
15
|
-
languageOptions: {
|
|
16
|
-
globals: {
|
|
17
|
-
...globals.jest,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
files: ['**/*.{js,mjs,cjs,jsx}'],
|
|
23
|
-
plugins: {
|
|
24
|
-
react,
|
|
25
|
-
'jsx-a11y': jsxA11Y,
|
|
26
|
-
'react-hooks': reactHooks,
|
|
27
|
-
import: importPlugin,
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
languageOptions: {
|
|
31
|
-
globals: {
|
|
32
|
-
...globals.browser,
|
|
33
|
-
...globals.node,
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
ecmaVersion: 'latest',
|
|
37
|
-
sourceType: 'module',
|
|
38
|
-
|
|
39
|
-
parserOptions: {
|
|
40
|
-
ecmaFeatures: {
|
|
41
|
-
generators: false,
|
|
42
|
-
objectLiteralDuplicateProperties: false,
|
|
43
|
-
jsx: true,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
settings: {
|
|
49
|
-
'import/resolver': {
|
|
50
|
-
node: {
|
|
51
|
-
extensions: ['.mjs', '.js', '.json', '.jsx'],
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
'import/extensions': ['.mjs', '.js', '.json', '.jsx'],
|
|
56
|
-
'import/core-modules': [],
|
|
57
|
-
'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'],
|
|
58
|
-
|
|
59
|
-
react: {
|
|
60
|
-
pragma: 'React',
|
|
61
|
-
version: 'detect',
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
propWrapperFunctions: ['forbidExtraProps', 'exact', 'Object.freeze'],
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
rules: {
|
|
68
|
-
'react/jsx-props-no-spreading': ['off', {
|
|
69
|
-
html: 'enforce',
|
|
70
|
-
custom: 'enforce',
|
|
71
|
-
explicitSpread: 'ignore',
|
|
72
|
-
exceptions: [],
|
|
73
|
-
}],
|
|
74
|
-
|
|
75
|
-
'react/forbid-prop-types': ['off', {
|
|
76
|
-
forbid: ['any', 'array', 'object'],
|
|
77
|
-
checkContextTypes: true,
|
|
78
|
-
checkChildContextTypes: true,
|
|
79
|
-
}],
|
|
80
|
-
|
|
81
|
-
'react/require-default-props': ['off', {
|
|
82
|
-
forbidDefaultForRequired: true,
|
|
83
|
-
}],
|
|
84
|
-
|
|
85
|
-
'react/no-array-index-key': ['off'],
|
|
86
|
-
|
|
87
|
-
'react/jsx-no-bind': ['off', {
|
|
88
|
-
ignoreRefs: true,
|
|
89
|
-
allowArrowFunctions: true,
|
|
90
|
-
allowFunctions: false,
|
|
91
|
-
allowBind: false,
|
|
92
|
-
ignoreDOMComponents: true,
|
|
93
|
-
}],
|
|
94
|
-
|
|
95
|
-
'react/prop-types': ['off', {
|
|
96
|
-
ignore: [],
|
|
97
|
-
customValidators: [],
|
|
98
|
-
skipUndeclared: false,
|
|
99
|
-
}],
|
|
100
|
-
|
|
101
|
-
'react/react-in-jsx-scope': ['off'],
|
|
102
|
-
|
|
103
|
-
'react/function-component-definition': [2, {
|
|
104
|
-
namedComponents: 'arrow-function',
|
|
105
|
-
}],
|
|
106
|
-
|
|
107
|
-
'react/jsx-max-props-per-line': ['error', {
|
|
108
|
-
maximum: 1,
|
|
109
|
-
when: 'multiline',
|
|
110
|
-
}],
|
|
111
|
-
|
|
112
|
-
'react/jsx-uses-react': ['off'],
|
|
113
|
-
|
|
114
|
-
'react/no-unstable-nested-components': ['error', {
|
|
115
|
-
allowAsProps: true,
|
|
116
|
-
}],
|
|
117
|
-
|
|
118
|
-
'react/no-unused-class-component-methods': ['off'],
|
|
119
|
-
'react-hooks/exhaustive-deps': 'off',
|
|
120
|
-
|
|
121
|
-
'react/display-name': 'off',
|
|
122
|
-
|
|
123
|
-
'react/jsx-one-expression-per-line': ['off', {
|
|
124
|
-
allow: 'single-child',
|
|
125
|
-
}],
|
|
126
|
-
|
|
127
|
-
'jsx-a11y/anchor-is-valid': ['off', {
|
|
128
|
-
components: ['Link'],
|
|
129
|
-
specialLink: ['to'],
|
|
130
|
-
aspects: ['noHref', 'invalidHref', 'preferButton'],
|
|
131
|
-
}],
|
|
132
|
-
|
|
133
|
-
'jsx-a11y/anchor-has-content': ['off', {
|
|
134
|
-
components: [],
|
|
135
|
-
}],
|
|
136
|
-
|
|
137
|
-
'jsx-a11y/no-static-element-interactions': ['off', {
|
|
138
|
-
handlers: [
|
|
139
|
-
'onClick',
|
|
140
|
-
'onMouseDown',
|
|
141
|
-
'onMouseUp',
|
|
142
|
-
'onKeyPress',
|
|
143
|
-
'onKeyDown',
|
|
144
|
-
'onKeyUp',
|
|
145
|
-
],
|
|
146
|
-
}],
|
|
147
|
-
|
|
148
|
-
'jsx-a11y/click-events-have-key-events': ['off'],
|
|
149
|
-
|
|
150
|
-
'jsx-a11y/media-has-caption': ['off', {
|
|
151
|
-
audio: [],
|
|
152
|
-
video: [],
|
|
153
|
-
track: [],
|
|
154
|
-
}],
|
|
155
|
-
|
|
156
|
-
'jsx-a11y/no-noninteractive-element-interactions': ['off', {
|
|
157
|
-
handlers: [
|
|
158
|
-
'onClick',
|
|
159
|
-
'onMouseDown',
|
|
160
|
-
'onMouseUp',
|
|
161
|
-
'onKeyPress',
|
|
162
|
-
'onKeyDown',
|
|
163
|
-
'onKeyUp',
|
|
164
|
-
],
|
|
165
|
-
}],
|
|
166
|
-
|
|
167
|
-
'jsx-a11y/label-has-for': ['off', {
|
|
168
|
-
components: [],
|
|
169
|
-
|
|
170
|
-
required: {
|
|
171
|
-
every: ['nesting', 'id'],
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
allowChildren: false,
|
|
175
|
-
}],
|
|
176
|
-
|
|
177
|
-
'jsx-a11y/label-has-associated-control': ['off', {
|
|
178
|
-
labelComponents: [],
|
|
179
|
-
labelAttributes: [],
|
|
180
|
-
controlComponents: [],
|
|
181
|
-
assert: 'both',
|
|
182
|
-
depth: 25,
|
|
183
|
-
}],
|
|
184
|
-
|
|
185
|
-
'jsx-a11y/control-has-associated-label': ['off', {
|
|
186
|
-
labelAttributes: ['label'],
|
|
187
|
-
controlComponents: [],
|
|
188
|
-
ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
|
|
189
|
-
|
|
190
|
-
ignoreRoles: [
|
|
191
|
-
'grid',
|
|
192
|
-
'listbox',
|
|
193
|
-
'menu',
|
|
194
|
-
'menubar',
|
|
195
|
-
'radiogroup',
|
|
196
|
-
'row',
|
|
197
|
-
'tablist',
|
|
198
|
-
'toolbar',
|
|
199
|
-
'tree',
|
|
200
|
-
'treegrid',
|
|
201
|
-
],
|
|
202
|
-
|
|
203
|
-
depth: 5,
|
|
204
|
-
}],
|
|
205
|
-
|
|
206
|
-
'react-hooks/rules-of-hooks': ['error'],
|
|
207
|
-
'jsx-a11y/accessible-emoji': ['off'],
|
|
208
|
-
|
|
209
|
-
'jsx-a11y/alt-text': 'off',
|
|
210
|
-
|
|
211
|
-
'jsx-a11y/aria-activedescendant-has-tabindex': ['error'],
|
|
212
|
-
'jsx-a11y/aria-props': ['error'],
|
|
213
|
-
'jsx-a11y/aria-proptypes': ['error'],
|
|
214
|
-
|
|
215
|
-
'jsx-a11y/aria-role': ['error', {
|
|
216
|
-
ignoreNonDOM: false,
|
|
217
|
-
}],
|
|
218
|
-
|
|
219
|
-
'jsx-a11y/aria-unsupported-elements': ['error'],
|
|
220
|
-
|
|
221
|
-
'jsx-a11y/autocomplete-valid': ['off', {
|
|
222
|
-
inputComponents: [],
|
|
223
|
-
}],
|
|
224
|
-
|
|
225
|
-
'jsx-a11y/heading-has-content': ['error', {
|
|
226
|
-
components: [''],
|
|
227
|
-
}],
|
|
228
|
-
|
|
229
|
-
'jsx-a11y/html-has-lang': ['error'],
|
|
230
|
-
'jsx-a11y/iframe-has-title': ['error'],
|
|
231
|
-
'jsx-a11y/img-redundant-alt': ['error'],
|
|
232
|
-
'jsx-a11y/interactive-supports-focus': ['error'],
|
|
233
|
-
'jsx-a11y/lang': ['error'],
|
|
234
|
-
'jsx-a11y/mouse-events-have-key-events': ['error'],
|
|
235
|
-
'jsx-a11y/no-access-key': ['error'],
|
|
236
|
-
|
|
237
|
-
'jsx-a11y/no-autofocus': ['error', {
|
|
238
|
-
ignoreNonDOM: true,
|
|
239
|
-
}],
|
|
240
|
-
|
|
241
|
-
'jsx-a11y/no-distracting-elements': ['error', {
|
|
242
|
-
elements: ['marquee', 'blink'],
|
|
243
|
-
}],
|
|
244
|
-
|
|
245
|
-
'jsx-a11y/no-interactive-element-to-noninteractive-role': ['error', {
|
|
246
|
-
tr: ['none', 'presentation'],
|
|
247
|
-
}],
|
|
248
|
-
|
|
249
|
-
'jsx-a11y/no-noninteractive-element-to-interactive-role': ['error', {
|
|
250
|
-
ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
|
251
|
-
ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
|
252
|
-
li: ['menuitem', 'option', 'row', 'tab', 'treeitem'],
|
|
253
|
-
table: ['grid'],
|
|
254
|
-
td: ['gridcell'],
|
|
255
|
-
}],
|
|
256
|
-
|
|
257
|
-
'jsx-a11y/no-noninteractive-tabindex': ['error', {
|
|
258
|
-
tags: [],
|
|
259
|
-
roles: ['tabpanel'],
|
|
260
|
-
}],
|
|
261
|
-
|
|
262
|
-
'jsx-a11y/no-onchange': ['off'],
|
|
263
|
-
'jsx-a11y/no-redundant-roles': ['error'],
|
|
264
|
-
'jsx-a11y/role-has-required-aria-props': ['error'],
|
|
265
|
-
'jsx-a11y/role-supports-aria-props': ['error'],
|
|
266
|
-
'jsx-a11y/scope': ['error'],
|
|
267
|
-
'jsx-a11y/tabindex-no-positive': ['error'],
|
|
268
|
-
|
|
269
|
-
'react/forbid-dom-props': ['off', {
|
|
270
|
-
forbid: [],
|
|
271
|
-
}],
|
|
272
|
-
|
|
273
|
-
'react/jsx-boolean-value': ['error', 'never', {
|
|
274
|
-
always: [],
|
|
275
|
-
}],
|
|
276
|
-
|
|
277
|
-
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
|
|
278
|
-
'react/jsx-closing-tag-location': ['error'],
|
|
279
|
-
|
|
280
|
-
'react/jsx-curly-spacing': ['error', 'never', {
|
|
281
|
-
allowMultiline: true,
|
|
282
|
-
}],
|
|
283
|
-
|
|
284
|
-
'react/jsx-handler-names': ['off', {
|
|
285
|
-
eventHandlerPrefix: 'handle',
|
|
286
|
-
eventHandlerPropPrefix: 'on',
|
|
287
|
-
}],
|
|
288
|
-
|
|
289
|
-
'react/jsx-indent-props': ['error', 2],
|
|
290
|
-
'react/jsx-key': ['off'],
|
|
291
|
-
|
|
292
|
-
'react/jsx-no-duplicate-props': ['error', {
|
|
293
|
-
ignoreCase: true,
|
|
294
|
-
}],
|
|
295
|
-
|
|
296
|
-
'react/jsx-no-literals': ['off', {
|
|
297
|
-
noStrings: true,
|
|
298
|
-
}],
|
|
299
|
-
|
|
300
|
-
'react/jsx-no-undef': ['error'],
|
|
301
|
-
|
|
302
|
-
'react/jsx-pascal-case': ['error', {
|
|
303
|
-
allowAllCaps: true,
|
|
304
|
-
ignore: [],
|
|
305
|
-
}],
|
|
306
|
-
|
|
307
|
-
'react/sort-prop-types': ['off', {
|
|
308
|
-
ignoreCase: true,
|
|
309
|
-
callbacksLast: false,
|
|
310
|
-
requiredFirst: false,
|
|
311
|
-
sortShapeProp: true,
|
|
312
|
-
}],
|
|
313
|
-
|
|
314
|
-
'react/jsx-sort-prop-types': ['off'],
|
|
315
|
-
|
|
316
|
-
'react/jsx-sort-props': ['off', {
|
|
317
|
-
ignoreCase: true,
|
|
318
|
-
callbacksLast: false,
|
|
319
|
-
shorthandFirst: false,
|
|
320
|
-
shorthandLast: false,
|
|
321
|
-
noSortAlphabetically: false,
|
|
322
|
-
reservedFirst: true,
|
|
323
|
-
}],
|
|
324
|
-
|
|
325
|
-
'react/jsx-sort-default-props': ['off', {
|
|
326
|
-
ignoreCase: true,
|
|
327
|
-
}],
|
|
328
|
-
|
|
329
|
-
'react/jsx-uses-vars': ['error'],
|
|
330
|
-
'react/no-danger': ['warn'],
|
|
331
|
-
'react/no-deprecated': ['error'],
|
|
332
|
-
'react/no-did-mount-set-state': ['off'],
|
|
333
|
-
'react/no-did-update-set-state': ['error'],
|
|
334
|
-
'react/no-will-update-set-state': ['error'],
|
|
335
|
-
'react/no-direct-mutation-state': ['off'],
|
|
336
|
-
'react/no-is-mounted': ['error'],
|
|
337
|
-
'react/no-multi-comp': ['off'],
|
|
338
|
-
'react/no-set-state': ['off'],
|
|
339
|
-
'react/no-string-refs': ['error'],
|
|
340
|
-
'react/no-unknown-property': ['error'],
|
|
341
|
-
'react/prefer-es6-class': ['error', 'always'],
|
|
342
|
-
|
|
343
|
-
'react/prefer-stateless-function': ['error', {
|
|
344
|
-
ignorePureComponents: true,
|
|
345
|
-
}],
|
|
346
|
-
|
|
347
|
-
'react/require-render-return': ['error'],
|
|
348
|
-
'react/self-closing-comp': ['error'],
|
|
349
|
-
|
|
350
|
-
'react/sort-comp': ['error', {
|
|
351
|
-
order: [
|
|
352
|
-
'static-variables',
|
|
353
|
-
'static-methods',
|
|
354
|
-
'instance-variables',
|
|
355
|
-
'lifecycle',
|
|
356
|
-
'/^handle.+$/',
|
|
357
|
-
'/^on.+$/',
|
|
358
|
-
'getters',
|
|
359
|
-
'setters',
|
|
360
|
-
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
|
|
361
|
-
'instance-methods',
|
|
362
|
-
'everything-else',
|
|
363
|
-
'rendering',
|
|
364
|
-
],
|
|
365
|
-
|
|
366
|
-
groups: {
|
|
367
|
-
lifecycle: [
|
|
368
|
-
'displayName',
|
|
369
|
-
'propTypes',
|
|
370
|
-
'contextTypes',
|
|
371
|
-
'childContextTypes',
|
|
372
|
-
'mixins',
|
|
373
|
-
'statics',
|
|
374
|
-
'defaultProps',
|
|
375
|
-
'constructor',
|
|
376
|
-
'getDefaultProps',
|
|
377
|
-
'getInitialState',
|
|
378
|
-
'state',
|
|
379
|
-
'getChildContext',
|
|
380
|
-
'getDerivedStateFromProps',
|
|
381
|
-
'componentWillMount',
|
|
382
|
-
'UNSAFE_componentWillMount',
|
|
383
|
-
'componentDidMount',
|
|
384
|
-
'componentWillReceiveProps',
|
|
385
|
-
'UNSAFE_componentWillReceiveProps',
|
|
386
|
-
'shouldComponentUpdate',
|
|
387
|
-
'componentWillUpdate',
|
|
388
|
-
'UNSAFE_componentWillUpdate',
|
|
389
|
-
'getSnapshotBeforeUpdate',
|
|
390
|
-
'componentDidUpdate',
|
|
391
|
-
'componentDidCatch',
|
|
392
|
-
'componentWillUnmount',
|
|
393
|
-
],
|
|
394
|
-
|
|
395
|
-
rendering: ['/^render.+$/', 'render'],
|
|
396
|
-
},
|
|
397
|
-
}],
|
|
398
|
-
|
|
399
|
-
'react/jsx-wrap-multilines': ['error', {
|
|
400
|
-
declaration: 'parens-new-line',
|
|
401
|
-
assignment: 'parens-new-line',
|
|
402
|
-
return: 'parens-new-line',
|
|
403
|
-
arrow: 'parens-new-line',
|
|
404
|
-
condition: 'parens-new-line',
|
|
405
|
-
logical: 'parens-new-line',
|
|
406
|
-
prop: 'parens-new-line',
|
|
407
|
-
}],
|
|
408
|
-
|
|
409
|
-
'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'],
|
|
410
|
-
'react/jsx-equals-spacing': ['error', 'never'],
|
|
411
|
-
'react/jsx-indent': ['error', 2],
|
|
412
|
-
|
|
413
|
-
'react/jsx-no-target-blank': ['error', {
|
|
414
|
-
enforceDynamicLinks: 'always',
|
|
415
|
-
links: true,
|
|
416
|
-
forms: false,
|
|
417
|
-
}],
|
|
418
|
-
|
|
419
|
-
'react/jsx-filename-extension': ['error', {
|
|
420
|
-
extensions: ['.jsx'],
|
|
421
|
-
}],
|
|
422
|
-
|
|
423
|
-
'react/jsx-no-comment-textnodes': ['error'],
|
|
424
|
-
'react/no-render-return-value': ['error'],
|
|
425
|
-
|
|
426
|
-
'react/require-optimization': ['off', {
|
|
427
|
-
allowDecorators: [],
|
|
428
|
-
}],
|
|
429
|
-
|
|
430
|
-
'react/no-find-dom-node': ['error'],
|
|
431
|
-
|
|
432
|
-
'react/forbid-component-props': ['off', {
|
|
433
|
-
forbid: [],
|
|
434
|
-
}],
|
|
435
|
-
|
|
436
|
-
'react/forbid-elements': ['off', {
|
|
437
|
-
forbid: [],
|
|
438
|
-
}],
|
|
439
|
-
|
|
440
|
-
'react/no-danger-with-children': ['error'],
|
|
441
|
-
|
|
442
|
-
'react/no-unused-prop-types': ['error', {
|
|
443
|
-
customValidators: [],
|
|
444
|
-
skipShapeProps: true,
|
|
445
|
-
}],
|
|
446
|
-
|
|
447
|
-
'react/style-prop-object': ['error'],
|
|
448
|
-
'react/no-unescaped-entities': ['error'],
|
|
449
|
-
'react/no-children-prop': ['error'],
|
|
450
|
-
|
|
451
|
-
'react/jsx-tag-spacing': ['error', {
|
|
452
|
-
closingSlash: 'never',
|
|
453
|
-
beforeSelfClosing: 'always',
|
|
454
|
-
afterOpening: 'never',
|
|
455
|
-
beforeClosing: 'never',
|
|
456
|
-
}],
|
|
457
|
-
|
|
458
|
-
'react/jsx-space-before-closing': ['off', 'always'],
|
|
459
|
-
|
|
460
|
-
'react/forbid-foreign-prop-types': ['warn', {
|
|
461
|
-
allowInPropTypes: true,
|
|
462
|
-
}],
|
|
463
|
-
|
|
464
|
-
'react/void-dom-elements-no-children': ['error'],
|
|
465
|
-
|
|
466
|
-
'react/default-props-match-prop-types': ['error', {
|
|
467
|
-
allowRequiredDefaults: false,
|
|
468
|
-
}],
|
|
469
|
-
|
|
470
|
-
'react/no-redundant-should-component-update': ['error'],
|
|
471
|
-
'react/no-unused-state': ['error'],
|
|
472
|
-
|
|
473
|
-
'react/boolean-prop-naming': ['off', {
|
|
474
|
-
propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'],
|
|
475
|
-
rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+',
|
|
476
|
-
message: '',
|
|
477
|
-
}],
|
|
478
|
-
|
|
479
|
-
'react/no-typos': ['error'],
|
|
480
|
-
|
|
481
|
-
'react/jsx-curly-brace-presence': ['error', {
|
|
482
|
-
props: 'never',
|
|
483
|
-
children: 'never',
|
|
484
|
-
}],
|
|
485
|
-
|
|
486
|
-
'react/destructuring-assignment': ['error', 'always'],
|
|
487
|
-
'react/no-access-state-in-setstate': ['error'],
|
|
488
|
-
|
|
489
|
-
'react/button-has-type': ['error', {
|
|
490
|
-
button: true,
|
|
491
|
-
submit: true,
|
|
492
|
-
reset: false,
|
|
493
|
-
}],
|
|
494
|
-
|
|
495
|
-
'react/jsx-child-element-spacing': ['off'],
|
|
496
|
-
'react/no-this-in-sfc': ['error'],
|
|
497
|
-
'react/jsx-max-depth': ['off'],
|
|
498
|
-
'react/jsx-props-no-multi-spaces': ['error'],
|
|
499
|
-
'react/no-unsafe': ['off'],
|
|
500
|
-
'react/jsx-fragments': ['error', 'syntax'],
|
|
501
|
-
|
|
502
|
-
'react/jsx-curly-newline': ['error', {
|
|
503
|
-
multiline: 'consistent',
|
|
504
|
-
singleline: 'consistent',
|
|
505
|
-
}],
|
|
506
|
-
|
|
507
|
-
'react/state-in-constructor': ['error', 'always'],
|
|
508
|
-
'react/static-property-placement': ['error', 'property assignment'],
|
|
509
|
-
'react/prefer-read-only-props': ['off'],
|
|
510
|
-
|
|
511
|
-
'react/jsx-no-script-url': ['error', [{
|
|
512
|
-
name: 'Link',
|
|
513
|
-
props: ['to'],
|
|
514
|
-
}]],
|
|
515
|
-
|
|
516
|
-
'react/jsx-no-useless-fragment': ['error'],
|
|
517
|
-
'react/no-adjacent-inline-elements': ['off'],
|
|
518
|
-
'react/jsx-newline': ['off'],
|
|
519
|
-
'react/jsx-no-constructed-context-values': ['error'],
|
|
520
|
-
'react/no-namespace': ['error'],
|
|
521
|
-
'react/prefer-exact-props': ['error'],
|
|
522
|
-
'react/no-arrow-function-lifecycle': ['error'],
|
|
523
|
-
'react/no-invalid-html-attribute': ['error'],
|
|
524
|
-
},
|
|
525
|
-
},
|
|
526
|
-
];
|