@prowise/eslint-config-linting-rules 2.4.7 → 3.0.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/base.js +1 -1
- package/eslint.config.js +24 -6
- package/front-react.js +2 -2
- package/front-solid.js +0 -2
- package/next.js +2 -2
- package/package.json +1 -1
- package/rules/baseSettings.js +322 -624
- package/rules/file-progress.js +62 -0
- package/rules/jsdoc-newline-before-returns.js +48 -0
- package/rules/jsdoc-optional-param-brackets.js +351 -0
- package/rules/jsdoc-single-line.js +44 -0
- package/rules/jsx-pascal-case-rule.js +1 -1
- package/rules/plugin-import-rules.js +13 -192
- package/rules/plugin-jsdoc-rules.js +81 -116
- package/rules/plugin-jsx-a11y-rules.js +1 -1
- package/rules/plugin-next-rules.js +28 -36
- package/rules/plugin-node-rules.js +72 -36
- package/rules/plugin-react-rules.js +111 -627
- package/rules/plugin-stylistic-rules.js +128 -85
- package/rules/plugin-typescript-rules.js +90 -200
- package/rules/plugin-vitest-rules.js +209 -21
- package/eslint.back.js +0 -9
- package/rules/plugin-solid-rules.js +0 -136
- package/rules/test-rules.js +0 -331
|
@@ -6,24 +6,12 @@ export default {
|
|
|
6
6
|
},
|
|
7
7
|
|
|
8
8
|
rules: {
|
|
9
|
-
/**
|
|
10
|
-
* Enforce line breaks after opening and before closing array brackets 🔧
|
|
11
|
-
* https://eslint.style/rules/array-bracket-newline.
|
|
12
|
-
*/
|
|
13
|
-
// "style/array-bracket-newline": ["off", "consistent"], // object option alternative: { multiline: true, minItems: 3 }
|
|
14
|
-
|
|
15
9
|
/**
|
|
16
10
|
* Enforce spacing inside array brackets 🔧
|
|
17
11
|
* https://eslint.style/rules/array-bracket-spacing.
|
|
18
12
|
*/
|
|
19
13
|
"style/array-bracket-spacing": ["error", "never"],
|
|
20
14
|
|
|
21
|
-
/**
|
|
22
|
-
* Enforce line breaks between array elements 🔧
|
|
23
|
-
* https://eslint.style/rules/array-element-newline.
|
|
24
|
-
*/
|
|
25
|
-
// "style/array-element-newline": ["off", { multiline: true, minItems: 3 }],
|
|
26
|
-
|
|
27
15
|
/**
|
|
28
16
|
* Require parens in arrow function arguments 🔧
|
|
29
17
|
* https://eslint.style/rules/arrow-parens.
|
|
@@ -126,12 +114,6 @@ export default {
|
|
|
126
114
|
*/
|
|
127
115
|
"style/function-call-argument-newline": ["error", "consistent"],
|
|
128
116
|
|
|
129
|
-
/**
|
|
130
|
-
* Require line breaks inside function parentheses if there are line breaks between parameters. 🔧
|
|
131
|
-
* https://eslint.style/rules/function-paren-newline.
|
|
132
|
-
*/
|
|
133
|
-
// "style/function-paren-newline": "off",
|
|
134
|
-
|
|
135
117
|
/**
|
|
136
118
|
* Enforce the spacing around the * in generator functions 🔧
|
|
137
119
|
* https://eslint.style/rules/generator-star-spacing.
|
|
@@ -139,16 +121,82 @@ export default {
|
|
|
139
121
|
"style/generator-star-spacing": ["error", { before: false, after: true }],
|
|
140
122
|
|
|
141
123
|
/**
|
|
142
|
-
* Enforce
|
|
143
|
-
* https://eslint.style/rules/
|
|
124
|
+
* Enforce consistent indentation 🔧
|
|
125
|
+
* https://eslint.style/rules/indent.
|
|
144
126
|
*/
|
|
145
|
-
|
|
127
|
+
"style/indent": ["error", 4, { SwitchCase: 1 }],
|
|
146
128
|
|
|
147
129
|
/**
|
|
148
|
-
*
|
|
149
|
-
* https://eslint.style/rules/
|
|
130
|
+
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
|
|
131
|
+
* https://eslint.style/rules/jsx-child-element-spacing
|
|
150
132
|
*/
|
|
151
|
-
"style/
|
|
133
|
+
"style/jsx-child-element-spacing": "error",
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Enforce closing bracket location in JSX 🔧
|
|
137
|
+
* https://eslint.style/rules/jsx-closing-bracket-location
|
|
138
|
+
*/
|
|
139
|
+
"style/jsx-closing-bracket-location": ["error", "line-aligned"],
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Enforce closing tag location in JSX 🔧
|
|
143
|
+
* https://eslint.style/rules/jsx-closing-tag-location
|
|
144
|
+
*/
|
|
145
|
+
"style/jsx-closing-tag-location": ["error", "line-aligned"],
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children 🔧
|
|
149
|
+
* https://eslint.style/rules/jsx-curly-brace-presence
|
|
150
|
+
*/
|
|
151
|
+
"style/jsx-curly-brace-presence": ["error", { props: "never", children: "never" }],
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Enforce consistent linebreaks in curly braces in JSX attributes and expressions 🔧
|
|
155
|
+
* https://eslint.style/rules/jsx-curly-newline
|
|
156
|
+
*/
|
|
157
|
+
"style/jsx-curly-newline": "error",
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions 🔧
|
|
161
|
+
* https://eslint.style/rules/jsx-curly-spacing
|
|
162
|
+
*/
|
|
163
|
+
"style/jsx-curly-spacing": ["error", "never", { allowMultiline: true }],
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Enforce or disallow spaces around equal signs in JSX attributes 🔧
|
|
167
|
+
* https://eslint.style/rules/jsx-equals-spacing
|
|
168
|
+
*/
|
|
169
|
+
"style/jsx-equals-spacing": ["error", "never"],
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Enforce proper position of the first property in JSX 🔧
|
|
173
|
+
* https://eslint.style/rules/jsx-first-prop-new-line
|
|
174
|
+
*/
|
|
175
|
+
"style/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Enforce line breaks before and after JSX elements when they are used as arguments to a function. 🔧
|
|
179
|
+
* https://eslint.style/rules/jsx-first-prop-new-line
|
|
180
|
+
*/
|
|
181
|
+
"style/jsx-function-call-newline": ["error", "multiline"],
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Enforce props indentation in JSX 🔧
|
|
185
|
+
* https://eslint.style/rules/jsx-indent-props
|
|
186
|
+
*/
|
|
187
|
+
"style/jsx-indent-props": ["error", { indentMode: 4, ignoreTernaryOperator: true }],
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Enforce maximum of props on a single line in JSX 🔧
|
|
191
|
+
* https://eslint.style/rules/jsx-max-props-per-line
|
|
192
|
+
*/
|
|
193
|
+
"style/jsx-max-props-per-line": ["error", { maximum: 1, when: "multiline" }],
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Require one JSX element per line 🔧
|
|
197
|
+
* https://eslint.style/rules/jsx-one-expression-per-line
|
|
198
|
+
*/
|
|
199
|
+
"style/jsx-one-expression-per-line": "off",
|
|
152
200
|
|
|
153
201
|
/**
|
|
154
202
|
* Specify whether double or single quotes should be used in JSX attributes 🔧
|
|
@@ -156,6 +204,41 @@ export default {
|
|
|
156
204
|
*/
|
|
157
205
|
"style/jsx-quotes": ["error", "prefer-double"],
|
|
158
206
|
|
|
207
|
+
/**
|
|
208
|
+
* Disallow extra closing tags for components without children 🔧
|
|
209
|
+
* https://eslint.style/rules/jsx-self-closing-comp
|
|
210
|
+
*/
|
|
211
|
+
"style/jsx-self-closing-comp": "error",
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Enforce whitespace in and around the JSX opening and closing brackets 🔧
|
|
215
|
+
* https://eslint.style/rules/jsx-tag-spacing
|
|
216
|
+
*/
|
|
217
|
+
"style/jsx-tag-spacing": ["error",
|
|
218
|
+
{
|
|
219
|
+
closingSlash: "never",
|
|
220
|
+
beforeSelfClosing: "always",
|
|
221
|
+
afterOpening: "never",
|
|
222
|
+
beforeClosing: "never",
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Disallow missing parentheses around multiline JSX 🔧
|
|
228
|
+
* https://eslint.style/rules/jsx-wrap-multilines
|
|
229
|
+
*/
|
|
230
|
+
"style/jsx-wrap-multilines": ["error",
|
|
231
|
+
{
|
|
232
|
+
declaration: "parens-new-line",
|
|
233
|
+
assignment: "parens-new-line",
|
|
234
|
+
return: "parens-new-line",
|
|
235
|
+
arrow: "parens-new-line",
|
|
236
|
+
condition: "ignore",
|
|
237
|
+
logical: "ignore",
|
|
238
|
+
prop: "ignore",
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
|
|
159
242
|
/**
|
|
160
243
|
* Enforces spacing between keys and values in object literal properties 🔧
|
|
161
244
|
* https://eslint.style/rules/key-spacing.
|
|
@@ -179,31 +262,12 @@ export default {
|
|
|
179
262
|
},
|
|
180
263
|
],
|
|
181
264
|
|
|
182
|
-
/**
|
|
183
|
-
* Enforce position of line comments
|
|
184
|
-
* https://eslint.style/rules/line-comment-position.
|
|
185
|
-
*/
|
|
186
|
-
// "style/line-comment-position": [
|
|
187
|
-
// "off",
|
|
188
|
-
// {
|
|
189
|
-
// position: "above",
|
|
190
|
-
// ignorePattern: "",
|
|
191
|
-
// applyDefaultPatterns: true,
|
|
192
|
-
// },
|
|
193
|
-
// ],
|
|
194
|
-
|
|
195
265
|
/**
|
|
196
266
|
* Disallow mixed "LF" and "CRLF" as linebreaks 🔧
|
|
197
267
|
* https://eslint.style/rules/linebreak-style.
|
|
198
268
|
*/
|
|
199
269
|
"style/linebreak-style": ["error", "unix"],
|
|
200
270
|
|
|
201
|
-
/**
|
|
202
|
-
* Enforces empty lines around comments 🔧
|
|
203
|
-
* https://eslint.style/rules/lines-around-comment.
|
|
204
|
-
*/
|
|
205
|
-
// "style/lines-around-comment": "off",
|
|
206
|
-
|
|
207
271
|
/**
|
|
208
272
|
* Require or disallow an empty line between class members 🔧
|
|
209
273
|
* https://eslint.style/rules/lines-between-class-members.
|
|
@@ -217,7 +281,7 @@ export default {
|
|
|
217
281
|
"style/max-len": [
|
|
218
282
|
"error",
|
|
219
283
|
{
|
|
220
|
-
code:
|
|
284
|
+
code: 160,
|
|
221
285
|
tabWidth: 4,
|
|
222
286
|
ignoreUrls: true,
|
|
223
287
|
ignoreComments: true,
|
|
@@ -227,30 +291,12 @@ export default {
|
|
|
227
291
|
},
|
|
228
292
|
],
|
|
229
293
|
|
|
230
|
-
/**
|
|
231
|
-
* Restrict the number of statements per line
|
|
232
|
-
* https://eslint.style/rules/max-statements-per-line.
|
|
233
|
-
*/
|
|
234
|
-
// "style/max-statements-per-line": ["off", { max: 1 }],
|
|
235
|
-
|
|
236
294
|
/**
|
|
237
295
|
* Delimiter on multiline for Typescript interface and type
|
|
238
296
|
* https://eslint.style/rules/member-delimiter-style
|
|
239
297
|
*/
|
|
240
298
|
"style/member-delimiter-style": "error",
|
|
241
299
|
|
|
242
|
-
/**
|
|
243
|
-
* Enforce a particular style for multiline comments 🔧
|
|
244
|
-
* https://eslint.style/rules/multiline-comment-style.
|
|
245
|
-
*/
|
|
246
|
-
// "style/multiline-comment-style": ["off", "starred-block"],
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Require multiline ternary 🔧
|
|
250
|
-
* https://eslint.style/rules/multiline-ternary.
|
|
251
|
-
*/
|
|
252
|
-
// "style/multiline-ternary": ["off", "never"],
|
|
253
|
-
|
|
254
300
|
/**
|
|
255
301
|
* Disallow the omission of parentheses when invoking a constructor with no arguments 🔧
|
|
256
302
|
* https://eslint.style/rules/new-parens.
|
|
@@ -305,22 +351,6 @@ export default {
|
|
|
305
351
|
},
|
|
306
352
|
],
|
|
307
353
|
|
|
308
|
-
/**
|
|
309
|
-
* Disallow unnecessary parentheses 🔧
|
|
310
|
-
* https://eslint.style/rules/no-extra-parens.
|
|
311
|
-
*/
|
|
312
|
-
// "style/no-extra-parens": [
|
|
313
|
-
// "off",
|
|
314
|
-
// "all",
|
|
315
|
-
// {
|
|
316
|
-
// conditionalAssign: true,
|
|
317
|
-
// nestedBinaryExpressions: false,
|
|
318
|
-
// returnAssign: false,
|
|
319
|
-
// ignoreJSX: "all", // delegate to eslint-plugin-react
|
|
320
|
-
// enforceForArrowConditionals: false,
|
|
321
|
-
// },
|
|
322
|
-
// ],
|
|
323
|
-
|
|
324
354
|
/**
|
|
325
355
|
* Disallow mixed spaces and tabs for indentation ✅
|
|
326
356
|
* https://eslint.style/rules/no-mixed-spaces-and-tabs.
|
|
@@ -417,12 +447,6 @@ export default {
|
|
|
417
447
|
},
|
|
418
448
|
],
|
|
419
449
|
|
|
420
|
-
/**
|
|
421
|
-
* Require or disallow padding lines between statements 🔧
|
|
422
|
-
* https://eslint.style/rules/padding-line-between-statements.
|
|
423
|
-
*/
|
|
424
|
-
// "style/padding-line-between-statements": "off",
|
|
425
|
-
|
|
426
450
|
/**
|
|
427
451
|
* Specifies double quotes should be used 🔧
|
|
428
452
|
* https://eslint.style/rules/quotes.
|
|
@@ -526,6 +550,24 @@ export default {
|
|
|
526
550
|
*/
|
|
527
551
|
"style/template-tag-spacing": ["error", "never"],
|
|
528
552
|
|
|
553
|
+
/**
|
|
554
|
+
* Require consistent spacing around type annotations 🔧
|
|
555
|
+
* https://eslint.style/rules/type-annotation-spacing
|
|
556
|
+
*/
|
|
557
|
+
"style/type-annotation-spacing": "off",
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Enforces consistent spacing inside TypeScript type generics 🔧
|
|
561
|
+
* https://eslint.style/rules/type-generic-spacing
|
|
562
|
+
*/
|
|
563
|
+
"style/type-generic-spacing": "error",
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Expect space before the type declaration in the named tuple 🔧
|
|
567
|
+
* https://eslint.style/rules/type-named-tuple-spacing
|
|
568
|
+
*/
|
|
569
|
+
"style/type-named-tuple-spacing": "error",
|
|
570
|
+
|
|
529
571
|
/**
|
|
530
572
|
* Require immediate function invocation to be wrapped in parentheses 🔧
|
|
531
573
|
* https://eslint.style/rules/wrap-iife.
|
|
@@ -535,8 +577,9 @@ export default {
|
|
|
535
577
|
/**
|
|
536
578
|
* Require regex literals to be wrapped in parentheses 🔧
|
|
537
579
|
* https://eslint.style/rules/wrap-regex.
|
|
580
|
+
* DO NOT turn on: it breaks code!
|
|
538
581
|
*/
|
|
539
|
-
|
|
582
|
+
"style/wrap-regex": "off",
|
|
540
583
|
|
|
541
584
|
/**
|
|
542
585
|
* Enforce spacing around the * in yield* expressions 🔧
|