@prowise/eslint-config-linting-rules 2.0.4 → 2.0.5
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 +4 -0
- package/package.json +1 -1
- package/rules/baseSettings.js +131 -130
- package/rules/plugin-import-rules.js +74 -68
- package/rules/plugin-jest-rules.js +3 -3
- package/rules/plugin-jsdoc-rules.js +12 -12
- package/rules/plugin-jsx-a11y-rules.js +2 -2
- package/rules/plugin-node-rules.js +6 -6
- package/rules/plugin-prefer-arrow-rules.js +10 -6
- package/rules/plugin-react-rules.js +54 -54
- package/rules/plugin-solid-rules.js +21 -21
- package/rules/plugin-stylistic-rules.js +21 -21
- package/rules/plugin-typescript-rules.js +20 -16
- package/rules/plugin-vitest-rules.js +6 -6
- package/rules/test-rules.js +11 -11
- package/rules/plugin-react-hooks-rules.js +0 -18
|
@@ -12,17 +12,23 @@ export default {
|
|
|
12
12
|
plugins: { import: importPlugin },
|
|
13
13
|
|
|
14
14
|
rules: {
|
|
15
|
+
/**
|
|
16
|
+
* Enforce or ban the use of inline type-only markers for named imports.
|
|
17
|
+
* https://github.com/un-ts/eslint-plugin-import-x/blob/v4.5.0/docs/rules/consistent-type-specifier-style.md
|
|
18
|
+
*/
|
|
19
|
+
"import/consistent-type-specifier-style": ["error", "prefer-inline"],
|
|
20
|
+
|
|
15
21
|
/**
|
|
16
22
|
* Ensure default import coupled with default export
|
|
17
23
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/default.md.
|
|
18
24
|
*/
|
|
19
|
-
"import/default": "off",
|
|
25
|
+
// "import/default": "off",
|
|
20
26
|
|
|
21
27
|
/**
|
|
22
28
|
* Dynamic imports require a leading comment with a webpackChunkName
|
|
23
29
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/dynamic-import-chunkname.md.
|
|
24
30
|
*/
|
|
25
|
-
"import/dynamic-import-chunkname": ["off", { importFunctions: [], webpackChunknameFormat: "[0-9a-zA-Z-_/.]+" }],
|
|
31
|
+
// "import/dynamic-import-chunkname": ["off", { importFunctions: [], webpackChunknameFormat: "[0-9a-zA-Z-_/.]+" }],
|
|
26
32
|
|
|
27
33
|
/**
|
|
28
34
|
* Disallow invalid exports, e.g. Multiple defaults
|
|
@@ -34,7 +40,7 @@ export default {
|
|
|
34
40
|
* This rule enforces that all exports are declared at the bottom of the file.
|
|
35
41
|
* Https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/exports-last.md.
|
|
36
42
|
*/
|
|
37
|
-
"import/exports-last": "off",
|
|
43
|
+
// "import/exports-last": "off",
|
|
38
44
|
|
|
39
45
|
/**
|
|
40
46
|
* Ensure consistent use of file extension within the import path
|
|
@@ -42,7 +48,7 @@ export default {
|
|
|
42
48
|
*
|
|
43
49
|
* Only warn, do not error on this, certain bundlers might accept it.
|
|
44
50
|
*/
|
|
45
|
-
"import/extensions": ["off", "always", { ignorePackages: true }],
|
|
51
|
+
// "import/extensions": ["off", "always", { ignorePackages: true }],
|
|
46
52
|
|
|
47
53
|
/**
|
|
48
54
|
* Disallow non-import statements appearing before import statements
|
|
@@ -56,13 +62,13 @@ export default {
|
|
|
56
62
|
* in a single file.
|
|
57
63
|
* Https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/group-exports.md.
|
|
58
64
|
*/
|
|
59
|
-
"import/group-exports": "off",
|
|
65
|
+
// "import/group-exports": "off",
|
|
60
66
|
|
|
61
67
|
/**
|
|
62
68
|
* Forbid modules to have too many dependencies
|
|
63
69
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/group-exports.md.
|
|
64
70
|
*/
|
|
65
|
-
"import/max-dependencies": ["off", { max: 10 }],
|
|
71
|
+
// "import/max-dependencies": ["off", { max: 10 }],
|
|
66
72
|
|
|
67
73
|
/**
|
|
68
74
|
* Ensure named imports coupled with named exports
|
|
@@ -74,7 +80,7 @@ export default {
|
|
|
74
80
|
* Enforces names exist at the time they are dereferenced, when imported as a full namespace
|
|
75
81
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/namespace.md.
|
|
76
82
|
*/
|
|
77
|
-
"import/namespace": "off",
|
|
83
|
+
// "import/namespace": "off",
|
|
78
84
|
|
|
79
85
|
/**
|
|
80
86
|
* Require a newline after the last import/require in a group
|
|
@@ -98,23 +104,23 @@ export default {
|
|
|
98
104
|
* Reports if a module"s default export is unnamed
|
|
99
105
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-anonymous-default-export.md.
|
|
100
106
|
*/
|
|
101
|
-
"import/no-anonymous-default-export": [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
],
|
|
107
|
+
// "import/no-anonymous-default-export": [
|
|
108
|
+
// "off",
|
|
109
|
+
// {
|
|
110
|
+
// allowArray: false,
|
|
111
|
+
// allowArrowFunction: false,
|
|
112
|
+
// allowAnonymousClass: false,
|
|
113
|
+
// allowAnonymousFunction: false,
|
|
114
|
+
// allowLiteral: false,
|
|
115
|
+
// allowObject: false,
|
|
116
|
+
// },
|
|
117
|
+
// ],
|
|
112
118
|
|
|
113
119
|
/**
|
|
114
120
|
* Disallow require()
|
|
115
121
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-commonjs.md.
|
|
116
122
|
*/
|
|
117
|
-
"import/no-commonjs": "off",
|
|
123
|
+
// "import/no-commonjs": "off",
|
|
118
124
|
|
|
119
125
|
/**
|
|
120
126
|
* Forbid cyclical dependencies between modules
|
|
@@ -126,13 +132,13 @@ export default {
|
|
|
126
132
|
* Forbid default exports. This is a terrible rule, do not use it.
|
|
127
133
|
* Https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md.
|
|
128
134
|
*/
|
|
129
|
-
"import/no-default-export": "off",
|
|
135
|
+
// "import/no-default-export": "off",
|
|
130
136
|
|
|
131
137
|
/**
|
|
132
138
|
* Disallow use of jsdoc-marked-deprecated imports
|
|
133
139
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-deprecated.md.
|
|
134
140
|
*/
|
|
135
|
-
"import/no-deprecated": "off",
|
|
141
|
+
// "import/no-deprecated": "off",
|
|
136
142
|
|
|
137
143
|
/**
|
|
138
144
|
* Disallow duplicate imports
|
|
@@ -151,36 +157,36 @@ export default {
|
|
|
151
157
|
* paths are treated both as absolute paths, and relative to process.cwd()
|
|
152
158
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md.
|
|
153
159
|
*/
|
|
154
|
-
"import/no-extraneous-dependencies": [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
],
|
|
160
|
+
// "import/no-extraneous-dependencies": [
|
|
161
|
+
// "off",
|
|
162
|
+
// {
|
|
163
|
+
// devDependencies: [
|
|
164
|
+
// "test/**", // tape, common npm pattern
|
|
165
|
+
// "tests/**", // also common npm pattern
|
|
166
|
+
// "spec/**", // mocha, rspec-like pattern
|
|
167
|
+
// "**/__tests__/**", // jest pattern
|
|
168
|
+
// "**/__mocks__/**", // jest pattern
|
|
169
|
+
// "test.{js,jsx}", // repos with a single test file
|
|
170
|
+
// "test-*.{js,jsx}", // repos with multiple top-level test files
|
|
171
|
+
// "**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
|
|
172
|
+
// "**/jest.config.js", // jest config
|
|
173
|
+
// "**/jest.setup.js", // jest setup
|
|
174
|
+
// "**/vue.config.js", // vue-cli config
|
|
175
|
+
// "**/webpack.config.js", // webpack config
|
|
176
|
+
// "**/webpack.config.*.js", // webpack config
|
|
177
|
+
// "**/rollup.config.js", // rollup config
|
|
178
|
+
// "**/rollup.config.*.js", // rollup config
|
|
179
|
+
// "**/gulpfile.js", // gulp config
|
|
180
|
+
// "**/gulpfile.*.js", // gulp config
|
|
181
|
+
// "**/Gruntfile{,.js}", // grunt config
|
|
182
|
+
// "**/protractor.conf.js", // protractor config
|
|
183
|
+
// "**/protractor.conf.*.js", // protractor config
|
|
184
|
+
// "**/karma.conf.js", // karma config
|
|
185
|
+
// "**/.eslintrc.js", // eslint config
|
|
186
|
+
// ],
|
|
187
|
+
// optionalDependencies: false,
|
|
188
|
+
// },
|
|
189
|
+
// ],
|
|
184
190
|
|
|
185
191
|
/**
|
|
186
192
|
* Reports the use of import declarations with CommonJS exports in any module except for the main module.
|
|
@@ -192,7 +198,7 @@ export default {
|
|
|
192
198
|
* Prevent importing the submodules of other modules
|
|
193
199
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-internal-modules.md.
|
|
194
200
|
*/
|
|
195
|
-
"import/no-internal-modules": ["off", { allow: [] }],
|
|
201
|
+
// "import/no-internal-modules": ["off", { allow: [] }],
|
|
196
202
|
|
|
197
203
|
/**
|
|
198
204
|
* Forbid mutable exports
|
|
@@ -222,19 +228,19 @@ export default {
|
|
|
222
228
|
* Prohibit named exports. This is a terrible rule, do not use it.
|
|
223
229
|
* Https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-export.md.
|
|
224
230
|
*/
|
|
225
|
-
"import/no-named-export": "off",
|
|
231
|
+
// "import/no-named-export": "off",
|
|
226
232
|
|
|
227
233
|
/**
|
|
228
234
|
* Disallow namespace imports
|
|
229
235
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-namespace.md.
|
|
230
236
|
*/
|
|
231
|
-
"import/no-namespace": "off",
|
|
237
|
+
// "import/no-namespace": "off",
|
|
232
238
|
|
|
233
239
|
/**
|
|
234
240
|
* No Node.js builtin modules
|
|
235
241
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-nodejs-modules.md.
|
|
236
242
|
*/
|
|
237
|
-
"import/no-nodejs-modules": "off",
|
|
243
|
+
// "import/no-nodejs-modules": "off",
|
|
238
244
|
|
|
239
245
|
/**
|
|
240
246
|
* Use this rule to prevent importing packages through relative paths.
|
|
@@ -246,13 +252,13 @@ export default {
|
|
|
246
252
|
* Use this rule to prevent imports to folders in relative parent paths.
|
|
247
253
|
* Https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-parent-imports.md.
|
|
248
254
|
*/
|
|
249
|
-
"import/no-relative-parent-imports": "off",
|
|
255
|
+
// "import/no-relative-parent-imports": "off",
|
|
250
256
|
|
|
251
257
|
/**
|
|
252
258
|
* Restrict which files can be imported in a given folder
|
|
253
259
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-restricted-paths.md.
|
|
254
260
|
*/
|
|
255
|
-
"import/no-restricted-paths": "off",
|
|
261
|
+
// "import/no-restricted-paths": "off",
|
|
256
262
|
|
|
257
263
|
/**
|
|
258
264
|
* Forbid a module from importing itself
|
|
@@ -265,7 +271,7 @@ export default {
|
|
|
265
271
|
* importing for side effects is perfectly acceptable, if you need side effects.
|
|
266
272
|
* Https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unassigned-import.md.
|
|
267
273
|
*/
|
|
268
|
-
"import/no-unassigned-import": "off",
|
|
274
|
+
// "import/no-unassigned-import": "off",
|
|
269
275
|
|
|
270
276
|
/**
|
|
271
277
|
* Ensure imports point to files/modules that can be resolved
|
|
@@ -278,14 +284,14 @@ export default {
|
|
|
278
284
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.md
|
|
279
285
|
* TODO: enable once it supports CJS.
|
|
280
286
|
*/
|
|
281
|
-
"import/no-unused-modules": [
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
],
|
|
287
|
+
// "import/no-unused-modules": [
|
|
288
|
+
// "off",
|
|
289
|
+
// {
|
|
290
|
+
// ignoreExports: [],
|
|
291
|
+
// missingExports: true,
|
|
292
|
+
// unusedExports: true,
|
|
293
|
+
// },
|
|
294
|
+
// ],
|
|
289
295
|
|
|
290
296
|
/**
|
|
291
297
|
* Ensures that there are no useless path segments
|
|
@@ -322,7 +328,7 @@ export default {
|
|
|
322
328
|
* Require modules with a single export to use a default export
|
|
323
329
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md.
|
|
324
330
|
*/
|
|
325
|
-
"import/prefer-default-export": "off",
|
|
331
|
+
// "import/prefer-default-export": "off",
|
|
326
332
|
|
|
327
333
|
/**
|
|
328
334
|
* Warn if a module could be mistakenly parsed as a script by a consumer
|
|
@@ -331,6 +337,6 @@ export default {
|
|
|
331
337
|
* this should not be enabled until this proposal has at least been *presented* to TC39.
|
|
332
338
|
* At the moment, it"s not a thing.
|
|
333
339
|
*/
|
|
334
|
-
"import/unambiguous": "off",
|
|
340
|
+
// "import/unambiguous": "off",
|
|
335
341
|
},
|
|
336
342
|
};
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
* Disallow confusing usages of jest.setTimeout
|
|
19
19
|
* https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-confusing-set-timeout.md
|
|
20
20
|
*/
|
|
21
|
-
"jest/no-confusing-set-timeout": "off",
|
|
21
|
+
// "jest/no-confusing-set-timeout": "off",
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Disallow use of deprecated functions ✅ 🔧
|
|
@@ -48,13 +48,13 @@ export default {
|
|
|
48
48
|
* Disallow specific jest. methods
|
|
49
49
|
* https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-restricted-jest-methods.md
|
|
50
50
|
*/
|
|
51
|
-
"jest/no-restricted-jest-methods": "off",
|
|
51
|
+
// "jest/no-restricted-jest-methods": "off",
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Disallow using jest.mock() factories without an explicit type parameter
|
|
55
55
|
* https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-untyped-mock-factory.md
|
|
56
56
|
*/
|
|
57
|
-
"jest/no-untyped-mock-factory": "off",
|
|
57
|
+
// "jest/no-untyped-mock-factory": "off",
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Require promises that have expectations in their chain to be valid ✅
|
|
@@ -28,19 +28,19 @@ export default {
|
|
|
28
28
|
* Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules
|
|
29
29
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-examples.
|
|
30
30
|
*/
|
|
31
|
-
"jsdoc/check-examples": "off",
|
|
31
|
+
// "jsdoc/check-examples": "off",
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Reports invalid padding inside JSDoc blocks
|
|
35
35
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-indentation.
|
|
36
36
|
*/
|
|
37
|
-
"jsdoc/check-indentation": "off",
|
|
37
|
+
// "jsdoc/check-indentation": "off",
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Reports invalid alignment of JSDoc block lines
|
|
41
41
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-line-alignment.
|
|
42
42
|
*/
|
|
43
|
-
"jsdoc/check-line-alignment": "off",
|
|
43
|
+
// "jsdoc/check-line-alignment": "off",
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Ensures that parameter names in JSDoc match those in the function declaration ✅
|
|
@@ -146,7 +146,7 @@ export default {
|
|
|
146
146
|
* Reports when certain comment structures are always expected
|
|
147
147
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-no-missing-syntax.
|
|
148
148
|
*/
|
|
149
|
-
"jsdoc/no-missing-syntax": "off",
|
|
149
|
+
// "jsdoc/no-missing-syntax": "off",
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* ✅
|
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
* Reports when certain comment structures are present
|
|
159
159
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-no-restricted-syntax.
|
|
160
160
|
*/
|
|
161
|
-
"jsdoc/no-restricted-syntax": "off",
|
|
161
|
+
// "jsdoc/no-restricted-syntax": "off",
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
164
|
* This rule reports types being used on `@param` or `@returns`
|
|
@@ -204,25 +204,25 @@ export default {
|
|
|
204
204
|
*
|
|
205
205
|
* If you cannot do that, PR reviewers should call you out on it.
|
|
206
206
|
*/
|
|
207
|
-
"jsdoc/require-description-complete-sentence": "off",
|
|
207
|
+
// "jsdoc/require-description-complete-sentence": "off",
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
210
|
* Requires that all functions have examples
|
|
211
211
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-example.
|
|
212
212
|
*/
|
|
213
|
-
"jsdoc/require-example": "off",
|
|
213
|
+
// "jsdoc/require-example": "off",
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
216
|
* Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file
|
|
217
217
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-file-overview.
|
|
218
218
|
*/
|
|
219
|
-
"jsdoc/require-file-overview": "off",
|
|
219
|
+
// "jsdoc/require-file-overview": "off",
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
222
|
* Requires a hyphen before the `@param` description
|
|
223
223
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-hyphen-before-param-description.
|
|
224
224
|
*/
|
|
225
|
-
"jsdoc/require-hyphen-before-param-description": "off",
|
|
225
|
+
// "jsdoc/require-hyphen-before-param-description": "off",
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* Require JSDoc comments ✅
|
|
@@ -277,14 +277,14 @@ export default {
|
|
|
277
277
|
* Requires that each `@param` tag has a `type` value ✅
|
|
278
278
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-type.
|
|
279
279
|
*/
|
|
280
|
-
"jsdoc/require-param-type": "off",
|
|
280
|
+
// "jsdoc/require-param-type": "off",
|
|
281
281
|
|
|
282
282
|
/**
|
|
283
283
|
* Requires that all `@typedef` and `@namespace` tags have `@property` when their type ✅
|
|
284
284
|
* is a plain `object`, `Object`, or `PlainObject
|
|
285
285
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-property.
|
|
286
286
|
*/
|
|
287
|
-
"jsdoc/require-property": "off",
|
|
287
|
+
// "jsdoc/require-property": "off",
|
|
288
288
|
|
|
289
289
|
/**
|
|
290
290
|
* Requires that each `@property` tag has a `description` value ✅
|
|
@@ -326,7 +326,7 @@ export default {
|
|
|
326
326
|
* Requires that `@returns` tag has `type` value ✅
|
|
327
327
|
* https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-returns-type.
|
|
328
328
|
*/
|
|
329
|
-
"jsdoc/require-returns-type": "off",
|
|
329
|
+
// "jsdoc/require-returns-type": "off",
|
|
330
330
|
|
|
331
331
|
/**
|
|
332
332
|
* Requires that throw statements are documented
|
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
* Enforce <a> text to not exactly match "click here", "here", "link", or "a link".
|
|
40
40
|
* Https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-ambiguous-text.md.
|
|
41
41
|
*/
|
|
42
|
-
"jsx-a11y/anchor-ambiguous-text": "off",
|
|
42
|
+
// "jsx-a11y/anchor-ambiguous-text": "off",
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* Enforce that anchors have content. ✅ 🔒
|
|
@@ -95,7 +95,7 @@ export default {
|
|
|
95
95
|
* Ensure the autocomplete attribute is correct and suitable for the form field it is used with. ✅ 🔒
|
|
96
96
|
* https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/29c68596b15c4ff0a40daae6d4a2670e36e37d35/docs/rules/autocomplete-valid.md.
|
|
97
97
|
*/
|
|
98
|
-
"jsx-a11y/autocomplete-valid": ["
|
|
98
|
+
"jsx-a11y/autocomplete-valid": ["error", { inputComponents: ["Input", "FormField"] }],
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* Require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress. ✅ 🔒
|
|
@@ -25,13 +25,13 @@ export default {
|
|
|
25
25
|
* Enforce return after a callback.
|
|
26
26
|
* https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/callback-return.md.
|
|
27
27
|
*/
|
|
28
|
-
"node/callback-return": "off",
|
|
28
|
+
// "node/callback-return": "off",
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Enforce either module.exports or exports.
|
|
32
32
|
* https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/exports-style.md.
|
|
33
33
|
*/
|
|
34
|
-
"node/exports-style": "off",
|
|
34
|
+
// "node/exports-style": "off",
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Enforce file extensions in import declarations (ignores packages by default).
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
* Enforces error handling in callbacks (node environment)
|
|
50
50
|
* https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/handle-callback-err.md.
|
|
51
51
|
*/
|
|
52
|
-
"node/handle-callback-err": "off",
|
|
52
|
+
// "node/handle-callback-err": "off",
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Require correct usage of hashbang.
|
|
@@ -61,7 +61,7 @@ export default {
|
|
|
61
61
|
* Disallow mixing regular variable and require declarations
|
|
62
62
|
* https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-mixed-requires.md.
|
|
63
63
|
*/
|
|
64
|
-
"node/no-mixed-requires": ["off", false],
|
|
64
|
+
// "node/no-mixed-requires": ["off", false],
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Disallow use of new operator with the require function
|
|
@@ -79,13 +79,13 @@ export default {
|
|
|
79
79
|
* Disallow use of process.env
|
|
80
80
|
* https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-process-env.md.
|
|
81
81
|
*/
|
|
82
|
-
"/node/no-process-env": "off",
|
|
82
|
+
// "/node/no-process-env": "off",
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* Disallow process.exit()
|
|
86
86
|
* https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-process-exit.md.
|
|
87
87
|
*/
|
|
88
|
-
"node/no-process-exit": "off",
|
|
88
|
+
// "node/no-process-exit": "off",
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Disallow use of the Buffer() constructor
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import preferArrowPlugin from "eslint-plugin-prefer-arrow";
|
|
1
|
+
import preferArrowPlugin from "eslint-plugin-prefer-arrow-functions";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
plugins: { "prefer-arrow": preferArrowPlugin },
|
|
4
|
+
plugins: { "prefer-arrow-functions": preferArrowPlugin },
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* See https://www.npmjs.com/package/eslint-plugin-prefer-arrow-functions
|
|
8
|
+
*/
|
|
6
9
|
rules: {
|
|
7
|
-
"prefer-arrow/prefer-arrow-functions": [
|
|
10
|
+
"prefer-arrow-functions/prefer-arrow-functions": [
|
|
8
11
|
"warn",
|
|
9
12
|
{
|
|
10
|
-
|
|
11
|
-
singleReturnOnly: false,
|
|
13
|
+
allowNamedFunctions: true,
|
|
12
14
|
classPropertiesAllowed: false,
|
|
13
|
-
|
|
15
|
+
disallowPrototype: false,
|
|
16
|
+
returnStyle: "unchanged",
|
|
17
|
+
singleReturnOnly: false,
|
|
14
18
|
},
|
|
15
19
|
],
|
|
16
20
|
},
|