@prowise/eslint-config-linting-rules 2.2.1 → 2.3.1
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@prowise/eslint-config-linting-rules","version":"2.
|
|
1
|
+
{"name":"@prowise/eslint-config-linting-rules","version":"2.3.1","description":"Default Prowise linting rules for npm packages.","main":"index.js","type":"module","exports":{"./typescript":"./typescript.js","./backend":"./backend.js","./front-react":"./front-react.js","./front-solid":"./front-solid.js","./next":"./next.js"},"scripts":{"lint":"eslint","test":"node tests/jsx-pascal-case-rule.test.js","inspect":"eslint --inspect-config"},"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/prowise/npm-linting-rules.git"},"author":"Prowise B.V.","license":"UNLICENSED","homepage":"https://bitbucket.org/prowise/npm-linting-rules#readme","dependencies":{"@next/eslint-plugin-next":"^15.3.4","@stylistic/eslint-plugin":"^5.1.0","@vitest/eslint-plugin":"^1.3.4","confusing-browser-globals":"^1.0.11","eslint":"^9.30.1","eslint-import-resolver-typescript":"^4.4.4","eslint-plugin-file-progress":"^3.0.2","eslint-plugin-import-x":"^4.16.1","eslint-plugin-jsdoc":"^51.3.3","eslint-plugin-jsx-a11y":"^6.10.2","eslint-plugin-n":"^17.20.0","eslint-plugin-prefer-arrow-functions":"^3.6.2","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","eslint-plugin-solid":"^0.14.5","globals":"^16.3.0","typescript-eslint":"^8.35.1"},"devDependencies":{"@eslint/config-inspector":"^1.1.0"}}
|
|
@@ -126,7 +126,7 @@ export default {
|
|
|
126
126
|
* Forbid cyclical dependencies between modules
|
|
127
127
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md.
|
|
128
128
|
*/
|
|
129
|
-
"import/no-cycle": ["error", {
|
|
129
|
+
"import/no-cycle": ["error", { ignoreExternal: true }],
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
* Forbid default exports. This is a terrible rule, do not use it.
|
|
@@ -8,49 +8,49 @@ export default {
|
|
|
8
8
|
rules: {
|
|
9
9
|
/**
|
|
10
10
|
* Enforce line breaks after opening and before closing array brackets 🔧
|
|
11
|
-
* https://eslint.
|
|
11
|
+
* https://eslint.style/rules/array-bracket-newline.
|
|
12
12
|
*/
|
|
13
13
|
// "style/array-bracket-newline": ["off", "consistent"], // object option alternative: { multiline: true, minItems: 3 }
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Enforce spacing inside array brackets 🔧
|
|
17
|
-
* https://eslint.
|
|
17
|
+
* https://eslint.style/rules/array-bracket-spacing.
|
|
18
18
|
*/
|
|
19
19
|
"style/array-bracket-spacing": ["error", "never"],
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Enforce line breaks between array elements 🔧
|
|
23
|
-
* https://eslint.
|
|
23
|
+
* https://eslint.style/rules/array-element-newline.
|
|
24
24
|
*/
|
|
25
25
|
// "style/array-element-newline": ["off", { multiline: true, minItems: 3 }],
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Require parens in arrow function arguments 🔧
|
|
29
|
-
* https://eslint.
|
|
29
|
+
* https://eslint.style/rules/arrow-parens.
|
|
30
30
|
*/
|
|
31
31
|
"style/arrow-parens": ["error", "always"],
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Require space before/after arrow function"s arrow 🔧
|
|
35
|
-
* https://eslint.
|
|
35
|
+
* https://eslint.style/rules/arrow-spacing.
|
|
36
36
|
*/
|
|
37
37
|
"style/arrow-spacing": ["error", { before: true, after: true }],
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Enforce spacing inside single-line blocks 🔧
|
|
41
|
-
* https://eslint.
|
|
41
|
+
* https://eslint.style/rules/block-spacing.
|
|
42
42
|
*/
|
|
43
43
|
"style/block-spacing": ["error", "always"],
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Enforce one true brace style 🔧
|
|
47
|
-
* https://eslint.
|
|
47
|
+
* https://eslint.style/rules/brace-style.
|
|
48
48
|
*/
|
|
49
49
|
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Require trailing commas in multiline object literals 🔧
|
|
53
|
-
* https://eslint.
|
|
53
|
+
* https://eslint.style/rules/comma-dangle.
|
|
54
54
|
*/
|
|
55
55
|
"style/comma-dangle": [
|
|
56
56
|
"error",
|
|
@@ -68,13 +68,13 @@ export default {
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Enforce spacing before and after comma 🔧
|
|
71
|
-
* https://eslint.
|
|
71
|
+
* https://eslint.style/rules/comma-spacing.
|
|
72
72
|
*/
|
|
73
73
|
"style/comma-spacing": ["error", { before: false, after: true }],
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Enforce one true comma style 🔧
|
|
77
|
-
* https://eslint.
|
|
77
|
+
* https://eslint.style/rules/comma-style.
|
|
78
78
|
*/
|
|
79
79
|
"style/comma-style": [
|
|
80
80
|
"error",
|
|
@@ -98,73 +98,73 @@ export default {
|
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* Disallow padding inside computed properties 🔧
|
|
101
|
-
* https://eslint.
|
|
101
|
+
* https://eslint.style/rules/computed-property-spacing.
|
|
102
102
|
*/
|
|
103
103
|
"style/computed-property-spacing": ["error", "never"],
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Enforces consistent newlines before or after dots 🔧
|
|
107
|
-
* https://eslint.
|
|
107
|
+
* https://eslint.style/rules/dot-location.
|
|
108
108
|
*/
|
|
109
109
|
"style/dot-location": ["error", "property"],
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
112
|
* Enforce newline at the end of file, with no multiple empty lines 🔧
|
|
113
|
-
* https://eslint.
|
|
113
|
+
* https://eslint.style/rules/eol-last.
|
|
114
114
|
*/
|
|
115
115
|
"style/eol-last": ["error", "always"],
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
118
|
* Enforce spacing between functions and their invocations 🔧
|
|
119
|
-
* https://eslint.
|
|
119
|
+
* https://eslint.style/rules/function-call-spacing.
|
|
120
120
|
*/
|
|
121
|
-
"style/
|
|
121
|
+
"style/function-call-spacing": ["error", "never"],
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* Enforce line breaks between arguments of a function call 🔧
|
|
125
|
-
* https://eslint.
|
|
125
|
+
* https://eslint.style/rules/function-call-argument-newline.
|
|
126
126
|
*/
|
|
127
127
|
"style/function-call-argument-newline": ["error", "consistent"],
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* Require line breaks inside function parentheses if there are line breaks between parameters. 🔧
|
|
131
|
-
* https://eslint.
|
|
131
|
+
* https://eslint.style/rules/function-paren-newline.
|
|
132
132
|
*/
|
|
133
133
|
// "style/function-paren-newline": "off",
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Enforce the spacing around the * in generator functions 🔧
|
|
137
|
-
* https://eslint.
|
|
137
|
+
* https://eslint.style/rules/generator-star-spacing.
|
|
138
138
|
*/
|
|
139
139
|
"style/generator-star-spacing": ["error", { before: false, after: true }],
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
142
|
* Enforce the location of arrow function bodies with implicit returns 🔧
|
|
143
|
-
* https://eslint.
|
|
143
|
+
* https://eslint.style/rules/implicit-arrow-linebreak.
|
|
144
144
|
*/
|
|
145
145
|
// "style/implicit-arrow-linebreak": "off",
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
* This option sets a specific tab width for your code 🔧
|
|
149
|
-
* https://eslint.
|
|
149
|
+
* https://eslint.style/rules/indent.
|
|
150
150
|
*/
|
|
151
151
|
"style/indent": ["error", 4, { SwitchCase: 1 }],
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* Specify whether double or single quotes should be used in JSX attributes 🔧
|
|
155
|
-
* https://eslint.
|
|
155
|
+
* https://eslint.style/rules/jsx-quotes.
|
|
156
156
|
*/
|
|
157
157
|
"style/jsx-quotes": ["error", "prefer-double"],
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* Enforces spacing between keys and values in object literal properties 🔧
|
|
161
|
-
* https://eslint.
|
|
161
|
+
* https://eslint.style/rules/key-spacing.
|
|
162
162
|
*/
|
|
163
163
|
"style/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
166
|
* Require a space before & after certain keywords 🔧
|
|
167
|
-
* https://eslint.
|
|
167
|
+
* https://eslint.style/rules/keyword-spacing.
|
|
168
168
|
*/
|
|
169
169
|
"style/keyword-spacing": [
|
|
170
170
|
"error",
|
|
@@ -181,7 +181,7 @@ export default {
|
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
183
|
* Enforce position of line comments
|
|
184
|
-
* https://eslint.
|
|
184
|
+
* https://eslint.style/rules/line-comment-position.
|
|
185
185
|
*/
|
|
186
186
|
// "style/line-comment-position": [
|
|
187
187
|
// "off",
|
|
@@ -194,25 +194,25 @@ export default {
|
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
196
|
* Disallow mixed "LF" and "CRLF" as linebreaks 🔧
|
|
197
|
-
* https://eslint.
|
|
197
|
+
* https://eslint.style/rules/linebreak-style.
|
|
198
198
|
*/
|
|
199
199
|
"style/linebreak-style": ["error", "unix"],
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
202
|
* Enforces empty lines around comments 🔧
|
|
203
|
-
* https://eslint.
|
|
203
|
+
* https://eslint.style/rules/lines-around-comment.
|
|
204
204
|
*/
|
|
205
205
|
// "style/lines-around-comment": "off",
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
208
|
* Require or disallow an empty line between class members 🔧
|
|
209
|
-
* https://eslint.
|
|
209
|
+
* https://eslint.style/rules/lines-between-class-members.
|
|
210
210
|
*/
|
|
211
211
|
"style/lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* Specify the maximum length of a line in your program
|
|
215
|
-
* https://eslint.
|
|
215
|
+
* https://eslint.style/rules/max-len.
|
|
216
216
|
*/
|
|
217
217
|
"style/max-len": [
|
|
218
218
|
"error",
|
|
@@ -229,55 +229,55 @@ export default {
|
|
|
229
229
|
|
|
230
230
|
/**
|
|
231
231
|
* Restrict the number of statements per line
|
|
232
|
-
* https://eslint.
|
|
232
|
+
* https://eslint.style/rules/max-statements-per-line.
|
|
233
233
|
*/
|
|
234
234
|
// "style/max-statements-per-line": ["off", { max: 1 }],
|
|
235
235
|
|
|
236
236
|
/**
|
|
237
237
|
* Enforce a particular style for multiline comments 🔧
|
|
238
|
-
* https://eslint.
|
|
238
|
+
* https://eslint.style/rules/multiline-comment-style.
|
|
239
239
|
*/
|
|
240
240
|
// "style/multiline-comment-style": ["off", "starred-block"],
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
243
|
* Require multiline ternary 🔧
|
|
244
|
-
* https://eslint.
|
|
244
|
+
* https://eslint.style/rules/multiline-ternary.
|
|
245
245
|
*/
|
|
246
246
|
// "style/multiline-ternary": ["off", "never"],
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
249
|
* Disallow the omission of parentheses when invoking a constructor with no arguments 🔧
|
|
250
|
-
* https://eslint.
|
|
250
|
+
* https://eslint.style/rules/new-parens.
|
|
251
251
|
*/
|
|
252
252
|
"style/new-parens": "error",
|
|
253
253
|
|
|
254
254
|
/**
|
|
255
255
|
* Enforces new line after each method call in the chain to make it more readable and easy to maintain 🔧
|
|
256
|
-
* https://eslint.
|
|
256
|
+
* https://eslint.style/rules/newline-per-chained-call.
|
|
257
257
|
*/
|
|
258
258
|
"style/newline-per-chained-call": ["error", { ignoreChainWithDepth: 3 }],
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
261
|
* Disallow arrow functions where they could be confused with comparisons 🔧
|
|
262
|
-
* https://eslint.
|
|
262
|
+
* https://eslint.style/rules/no-confusing-arrow.
|
|
263
263
|
*/
|
|
264
264
|
"style/no-confusing-arrow": "warn",
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
267
|
* Disallow unnecessary semicolons ✅ 🔧
|
|
268
|
-
* https://eslint.
|
|
268
|
+
* https://eslint.style/rules/no-extra-semi.
|
|
269
269
|
*/
|
|
270
270
|
"style/no-extra-semi": "error",
|
|
271
271
|
|
|
272
272
|
/**
|
|
273
273
|
* Disallow the use of leading or trailing decimal points in numeric literals 🔧
|
|
274
|
-
* https://eslint.
|
|
274
|
+
* https://eslint.style/rules/no-floating-decimal.
|
|
275
275
|
*/
|
|
276
276
|
"style/no-floating-decimal": "error",
|
|
277
277
|
|
|
278
278
|
/**
|
|
279
279
|
* Disallow un-paren"d mixes of different operators
|
|
280
|
-
* https://eslint.
|
|
280
|
+
* https://eslint.style/rules/no-mixed-operators.
|
|
281
281
|
*/
|
|
282
282
|
"style/no-mixed-operators": [
|
|
283
283
|
"error",
|
|
@@ -301,7 +301,7 @@ export default {
|
|
|
301
301
|
|
|
302
302
|
/**
|
|
303
303
|
* Disallow unnecessary parentheses 🔧
|
|
304
|
-
* https://eslint.
|
|
304
|
+
* https://eslint.style/rules/no-extra-parens.
|
|
305
305
|
*/
|
|
306
306
|
// "style/no-extra-parens": [
|
|
307
307
|
// "off",
|
|
@@ -317,55 +317,55 @@ export default {
|
|
|
317
317
|
|
|
318
318
|
/**
|
|
319
319
|
* Disallow mixed spaces and tabs for indentation ✅
|
|
320
|
-
* https://eslint.
|
|
320
|
+
* https://eslint.style/rules/no-mixed-spaces-and-tabs.
|
|
321
321
|
*/
|
|
322
322
|
"style/no-mixed-spaces-and-tabs": "error",
|
|
323
323
|
|
|
324
324
|
/**
|
|
325
325
|
* Disallow use of multiple spaces 🔧
|
|
326
|
-
* https://eslint.
|
|
326
|
+
* https://eslint.style/rules/no-multi-spaces.
|
|
327
327
|
*/
|
|
328
328
|
"style/no-multi-spaces": ["error", { ignoreEOLComments: false }],
|
|
329
329
|
|
|
330
330
|
/**
|
|
331
331
|
* Disallow multiple empty lines, only one newline at the end, and no new lines at the beginning 🔧
|
|
332
|
-
* https://eslint.
|
|
332
|
+
* https://eslint.style/rules/no-multiple-empty-lines.
|
|
333
333
|
*/
|
|
334
334
|
"style/no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
337
|
* Disallow tab characters entirely
|
|
338
|
-
* https://eslint.
|
|
338
|
+
* https://eslint.style/rules/no-tabs.
|
|
339
339
|
*/
|
|
340
340
|
"style/no-tabs": "error",
|
|
341
341
|
|
|
342
342
|
/**
|
|
343
343
|
* Disallow trailing whitespace at the end of lines 🔧
|
|
344
|
-
* https://eslint.
|
|
344
|
+
* https://eslint.style/rules/no-trailing-spaces.
|
|
345
345
|
*/
|
|
346
346
|
"style/no-trailing-spaces": ["error", { skipBlankLines: false, ignoreComments: false }],
|
|
347
347
|
|
|
348
348
|
/**
|
|
349
349
|
* Disallow whitespace before properties 🔧
|
|
350
|
-
* https://eslint.
|
|
350
|
+
* https://eslint.style/rules/no-whitespace-before-property.
|
|
351
351
|
*/
|
|
352
352
|
"style/no-whitespace-before-property": "error",
|
|
353
353
|
|
|
354
354
|
/**
|
|
355
355
|
* Enforce the location of single-line statements 🔧
|
|
356
|
-
* https://eslint.
|
|
356
|
+
* https://eslint.style/rules/nonblock-statement-body-position.
|
|
357
357
|
*/
|
|
358
358
|
"style/nonblock-statement-body-position": ["error", "any", { overrides: {} }],
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* Require a newline around variable declaration 🔧
|
|
362
|
-
* https://eslint.
|
|
362
|
+
* https://eslint.style/rules/one-var-declaration-per-line.
|
|
363
363
|
*/
|
|
364
364
|
"style/one-var-declaration-per-line": ["error", "always"],
|
|
365
365
|
|
|
366
366
|
/**
|
|
367
367
|
* Enforce line breaks between braces. 🔧
|
|
368
|
-
* https://eslint.
|
|
368
|
+
* https://eslint.style/rules/object-curly-newline.
|
|
369
369
|
*/
|
|
370
370
|
"style/object-curly-newline": [
|
|
371
371
|
"error",
|
|
@@ -379,25 +379,25 @@ export default {
|
|
|
379
379
|
|
|
380
380
|
/**
|
|
381
381
|
* Require padding inside curly braces 🔧
|
|
382
|
-
* https://eslint.
|
|
382
|
+
* https://eslint.style/rules/object-curly-spacing.
|
|
383
383
|
*/
|
|
384
384
|
"style/object-curly-spacing": ["error", "always"],
|
|
385
385
|
|
|
386
386
|
/**
|
|
387
387
|
* Enforce "same line" or "multiple line" on object properties. 🔧
|
|
388
|
-
* https://eslint.
|
|
388
|
+
* https://eslint.style/rules/object-property-newline.
|
|
389
389
|
*/
|
|
390
390
|
"style/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
391
391
|
|
|
392
392
|
/**
|
|
393
393
|
* Requires operator at the beginning of the line in multiline statements 🔧
|
|
394
|
-
* https://eslint.
|
|
394
|
+
* https://eslint.style/rules/operator-linebreak.
|
|
395
395
|
*/
|
|
396
396
|
"style/operator-linebreak": ["error", "after", { overrides: { "?": "before", ":": "before" } }],
|
|
397
397
|
|
|
398
398
|
/**
|
|
399
399
|
* Disallow padding within blocks 🔧
|
|
400
|
-
* https://eslint.
|
|
400
|
+
* https://eslint.style/rules/padded-blocks.
|
|
401
401
|
*/
|
|
402
402
|
"style/padded-blocks": [
|
|
403
403
|
"error",
|
|
@@ -413,25 +413,25 @@ export default {
|
|
|
413
413
|
|
|
414
414
|
/**
|
|
415
415
|
* Require or disallow padding lines between statements 🔧
|
|
416
|
-
* https://eslint.
|
|
416
|
+
* https://eslint.style/rules/padding-line-between-statements.
|
|
417
417
|
*/
|
|
418
418
|
// "style/padding-line-between-statements": "off",
|
|
419
419
|
|
|
420
420
|
/**
|
|
421
421
|
* Specifies double quotes should be used 🔧
|
|
422
|
-
* https://eslint.
|
|
422
|
+
* https://eslint.style/rules/quotes.
|
|
423
423
|
*/
|
|
424
424
|
"style/quotes": ["error", "double", { avoidEscape: true }],
|
|
425
425
|
|
|
426
426
|
/**
|
|
427
427
|
* Require quotes around object literal property names 🔧
|
|
428
|
-
* https://eslint.
|
|
428
|
+
* https://eslint.style/rules/quote-props.
|
|
429
429
|
*/
|
|
430
430
|
"style/quote-props": ["error", "consistent-as-needed", { keywords: false, unnecessary: true, numbers: false }],
|
|
431
431
|
|
|
432
432
|
/**
|
|
433
433
|
* Enforce spacing between object rest-spread 🔧
|
|
434
|
-
* https://eslint.
|
|
434
|
+
* https://eslint.style/rules/rest-spread-spacing.
|
|
435
435
|
*/
|
|
436
436
|
"style/rest-spread-spacing": ["error", "never"],
|
|
437
437
|
|
|
@@ -442,49 +442,49 @@ export default {
|
|
|
442
442
|
|
|
443
443
|
/**
|
|
444
444
|
* Enforce spacing before and after semicolons 🔧
|
|
445
|
-
* https://eslint.
|
|
445
|
+
* https://eslint.style/rules/semi-spacing.
|
|
446
446
|
*/
|
|
447
447
|
"style/semi-spacing": ["error", { before: false, after: true }],
|
|
448
448
|
|
|
449
449
|
/**
|
|
450
450
|
* Enforce location of semicolons 🔧
|
|
451
|
-
* https://eslint.
|
|
451
|
+
* https://eslint.style/rules/semi-style.
|
|
452
452
|
*/
|
|
453
453
|
"style/semi-style": ["error", "last"],
|
|
454
454
|
|
|
455
455
|
/**
|
|
456
456
|
* Require or disallow space before blocks 🔧
|
|
457
|
-
* https://eslint.
|
|
457
|
+
* https://eslint.style/rules/space-before-blocks.
|
|
458
458
|
*/
|
|
459
459
|
"style/space-before-blocks": "error",
|
|
460
460
|
|
|
461
461
|
/**
|
|
462
462
|
* Require or disallow space before function opening parenthesis 🔧
|
|
463
|
-
* https://eslint.
|
|
463
|
+
* https://eslint.style/rules/space-before-function-paren.
|
|
464
464
|
*/
|
|
465
465
|
"style/space-before-function-paren": ["error", { anonymous: "always", named: "never", asyncArrow: "always" }],
|
|
466
466
|
|
|
467
467
|
/**
|
|
468
468
|
* Require or disallow spaces inside parentheses 🔧
|
|
469
|
-
* https://eslint.
|
|
469
|
+
* https://eslint.style/rules/space-in-parens.
|
|
470
470
|
*/
|
|
471
471
|
"style/space-in-parens": ["error", "never"],
|
|
472
472
|
|
|
473
473
|
/**
|
|
474
474
|
* Require spacing around infix operators 🔧
|
|
475
|
-
* https://eslint.
|
|
475
|
+
* https://eslint.style/rules/space-infix-ops.
|
|
476
476
|
*/
|
|
477
477
|
"style/space-infix-ops": ["error", { int32Hint: false }],
|
|
478
478
|
|
|
479
479
|
/**
|
|
480
480
|
* Require or disallow spaces before/after unary operators 🔧
|
|
481
|
-
* https://eslint.
|
|
481
|
+
* https://eslint.style/rules/space-unary-ops.
|
|
482
482
|
*/
|
|
483
483
|
"style/space-unary-ops": ["error", { words: true, nonwords: false, overrides: {} }],
|
|
484
484
|
|
|
485
485
|
/**
|
|
486
486
|
* Require or disallow a space immediately following the // or /* in a comment 🔧
|
|
487
|
-
* https://eslint.
|
|
487
|
+
* https://eslint.style/rules/spaced-comment.
|
|
488
488
|
*/
|
|
489
489
|
"style/spaced-comment": [
|
|
490
490
|
"error",
|
|
@@ -504,37 +504,37 @@ export default {
|
|
|
504
504
|
|
|
505
505
|
/**
|
|
506
506
|
* Enforce spacing around colons of switch statements 🔧
|
|
507
|
-
* https://eslint.
|
|
507
|
+
* https://eslint.style/rules/switch-colon-spacing.
|
|
508
508
|
*/
|
|
509
509
|
"style/switch-colon-spacing": ["error", { after: true, before: false }],
|
|
510
510
|
|
|
511
511
|
/**
|
|
512
512
|
* Enforce usage of spacing in template strings 🔧
|
|
513
|
-
* https://eslint.
|
|
513
|
+
* https://eslint.style/rules/template-curly-spacing.
|
|
514
514
|
*/
|
|
515
515
|
"style/template-curly-spacing": "error",
|
|
516
516
|
|
|
517
517
|
/**
|
|
518
518
|
* Require or disallow spacing between template tags and their literals 🔧
|
|
519
|
-
* https://eslint.
|
|
519
|
+
* https://eslint.style/rules/template-tag-spacing.
|
|
520
520
|
*/
|
|
521
521
|
"style/template-tag-spacing": ["error", "never"],
|
|
522
522
|
|
|
523
523
|
/**
|
|
524
524
|
* Require immediate function invocation to be wrapped in parentheses 🔧
|
|
525
|
-
* https://eslint.
|
|
525
|
+
* https://eslint.style/rules/wrap-iife.
|
|
526
526
|
*/
|
|
527
527
|
"style/wrap-iife": ["error", "inside", { functionPrototypeMethods: false }],
|
|
528
528
|
|
|
529
529
|
/**
|
|
530
530
|
* Require regex literals to be wrapped in parentheses 🔧
|
|
531
|
-
* https://eslint.
|
|
531
|
+
* https://eslint.style/rules/wrap-regex.
|
|
532
532
|
*/
|
|
533
533
|
// "style/wrap-regex": "off",
|
|
534
534
|
|
|
535
535
|
/**
|
|
536
536
|
* Enforce spacing around the * in yield* expressions 🔧
|
|
537
|
-
* https://eslint.
|
|
537
|
+
* https://eslint.style/rules/yield-star-spacing.
|
|
538
538
|
*/
|
|
539
539
|
"style/yield-star-spacing": ["error", "after"],
|
|
540
540
|
},
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line import/no-unresolved
|
|
2
1
|
import typescriptPlugin from "typescript-eslint";
|
|
3
2
|
import baseRules from "./baseSettings.js";
|
|
4
3
|
import importRules from "./plugin-import-rules.js";
|
|
@@ -18,7 +17,10 @@ export default {
|
|
|
18
17
|
languageOptions: {
|
|
19
18
|
parser: typescriptPlugin.parser,
|
|
20
19
|
parserOptions: {
|
|
21
|
-
|
|
20
|
+
ecmaVersion: "latest",
|
|
21
|
+
sourceType: "module",
|
|
22
|
+
projectService: true,
|
|
23
|
+
tsconfigRootDir: import.meta.dirname,
|
|
22
24
|
},
|
|
23
25
|
},
|
|
24
26
|
|
|
@@ -706,12 +708,6 @@ export default {
|
|
|
706
708
|
},
|
|
707
709
|
],
|
|
708
710
|
|
|
709
|
-
/**
|
|
710
|
-
* Require type annotations in certain places
|
|
711
|
-
* https://typescript-eslint.io/rules/typedef.
|
|
712
|
-
*/
|
|
713
|
-
"@typescript-eslint/typedef": "warn",
|
|
714
|
-
|
|
715
711
|
/**
|
|
716
712
|
* Enforce unbound methods are called with their expected scope ✅ 💭
|
|
717
713
|
* While this rule should be enabled, it gives to many problems with external libraries
|
|
@@ -744,20 +740,5 @@ export default {
|
|
|
744
740
|
tsx: "never",
|
|
745
741
|
},
|
|
746
742
|
],
|
|
747
|
-
|
|
748
|
-
// "import/no-extraneous-dependencies": [
|
|
749
|
-
// importRules.rules["import/no-extraneous-dependencies"][0],
|
|
750
|
-
// {
|
|
751
|
-
// ...importRules.rules["import/no-extraneous-dependencies"][1],
|
|
752
|
-
// devDependencies: importRules.rules["import/no-extraneous-dependencies"][1].devDependencies.reduce(
|
|
753
|
-
// (result, devDep) => {
|
|
754
|
-
// const toAppend = [devDep];
|
|
755
|
-
// const devDepWithTs = devDep.replace(/\bjs(x?)\b/g, "ts$1");
|
|
756
|
-
// if (devDepWithTs !== devDep) toAppend.push(devDepWithTs);
|
|
757
|
-
// return [...result, ...toAppend];
|
|
758
|
-
// },
|
|
759
|
-
// ),
|
|
760
|
-
// },
|
|
761
|
-
// ],
|
|
762
743
|
},
|
|
763
744
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import vitestPlugin from "eslint-plugin
|
|
1
|
+
import vitestPlugin from "@vitest/eslint-plugin";
|
|
2
2
|
import { commonRules } from "./test-rules.js";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -29,49 +29,49 @@ export default {
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Forbidden test file pattern: default only "test" accepted
|
|
32
|
-
* https://github.com/
|
|
32
|
+
* https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
33
33
|
*/
|
|
34
34
|
"vitest/consistent-test-filename": ["warn", { pattern: ".*\\.test\\.[tj]sx?$" }],
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Do not use conditionals to run tests
|
|
38
|
-
* https://github.com/
|
|
38
|
+
* https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-tests.md
|
|
39
39
|
*/
|
|
40
40
|
// "vitest/no-conditional-tests": "off",
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Disallow importing node:test ✅ 🔧
|
|
44
|
-
* https://github.com/
|
|
44
|
+
* https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-import-node-test.md
|
|
45
45
|
*/
|
|
46
46
|
"vitest/no-import-node-test": "error",
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Disallow specific vi. methods
|
|
50
|
-
* https://github.com/
|
|
50
|
+
* https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md
|
|
51
51
|
*/
|
|
52
52
|
// "vitest/no-restricted-vi-methods": "off",
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Suggest using toBeFalsy() 🔧
|
|
56
|
-
* https://github.com/
|
|
56
|
+
* https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-falsy.md
|
|
57
57
|
*/
|
|
58
58
|
// "vitest/prefer-to-be-falsy)": "off",
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Prefer toBeObject() 🔧
|
|
62
|
-
* https://github.com/
|
|
62
|
+
* https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-object.md
|
|
63
63
|
*/
|
|
64
64
|
// "vitest/prefer-to-be-object": "off",
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Suggest using toBeTruthy 🔧
|
|
68
|
-
* https://github.com/
|
|
68
|
+
* https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-truthy.md
|
|
69
69
|
*/
|
|
70
70
|
// "vitest/prefer-to-be-truthy": "off",
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* Require local Test Context for concurrent snapshot tests ✅
|
|
74
|
-
* https://github.com/
|
|
74
|
+
* https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
|
|
75
75
|
*/
|
|
76
76
|
"vitest/require-local-test-context-for-concurrent-snapshots": "error",
|
|
77
77
|
},
|