@newsteam/eslint-config 1.2.16 → 1.2.18

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.
Files changed (150) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -49
  4. package/dist/plugins/sort-react-dependency-arrays.d.ts +3 -2
  5. package/dist/plugins/sort-react-dependency-arrays.d.ts.map +1 -1
  6. package/dist/plugins/sort-react-dependency-arrays.js +95 -18
  7. package/dist/rules/array-function.d.ts +3 -0
  8. package/dist/rules/array-function.d.ts.map +1 -0
  9. package/dist/rules/array-function.js +56 -0
  10. package/dist/rules/css-modules.d.ts +3 -0
  11. package/dist/rules/css-modules.d.ts.map +1 -0
  12. package/dist/rules/css-modules.js +27 -0
  13. package/dist/rules/destructuring.d.ts +3 -0
  14. package/dist/rules/destructuring.d.ts.map +1 -0
  15. package/dist/rules/destructuring.js +39 -0
  16. package/dist/rules/eslint-comments.d.ts +3 -0
  17. package/dist/rules/eslint-comments.d.ts.map +1 -0
  18. package/dist/rules/eslint-comments.js +77 -0
  19. package/dist/rules/import-newlines.d.ts +3 -0
  20. package/dist/rules/import-newlines.d.ts.map +1 -0
  21. package/dist/rules/import-newlines.js +26 -0
  22. package/dist/rules/import-x.d.ts +3 -0
  23. package/dist/rules/import-x.d.ts.map +1 -0
  24. package/dist/rules/import-x.js +420 -0
  25. package/dist/{rules.d.ts → rules/index.d.ts} +1 -1
  26. package/dist/rules/index.d.ts.map +1 -0
  27. package/dist/{rules.js → rules/index.js} +51 -1
  28. package/dist/rules/next.d.ts +3 -0
  29. package/dist/rules/next.d.ts.map +1 -0
  30. package/dist/rules/next.js +140 -0
  31. package/dist/rules/no-unsanitized.d.ts +3 -0
  32. package/dist/rules/no-unsanitized.d.ts.map +1 -0
  33. package/dist/rules/no-unsanitized.js +38 -0
  34. package/dist/rules/no-useless-assign.d.ts +3 -0
  35. package/dist/rules/no-useless-assign.d.ts.map +1 -0
  36. package/dist/rules/no-useless-assign.js +20 -0
  37. package/dist/rules/node.d.ts +3 -0
  38. package/dist/rules/node.d.ts.map +1 -0
  39. package/dist/rules/node.js +305 -0
  40. package/dist/rules/perfectionist.d.ts +3 -0
  41. package/dist/rules/perfectionist.d.ts.map +1 -0
  42. package/dist/rules/perfectionist.js +94 -0
  43. package/dist/rules/promise.d.ts +3 -0
  44. package/dist/rules/promise.d.ts.map +1 -0
  45. package/dist/rules/promise.js +123 -0
  46. package/dist/rules/react-19-upgrade.d.ts +3 -0
  47. package/dist/rules/react-19-upgrade.d.ts.map +1 -0
  48. package/dist/rules/react-19-upgrade.js +20 -0
  49. package/dist/rules/react-compiler.d.ts +3 -0
  50. package/dist/rules/react-compiler.d.ts.map +1 -0
  51. package/dist/{plugins → rules}/react-compiler.js +7 -9
  52. package/dist/rules/react-hooks.d.ts +3 -0
  53. package/dist/rules/react-hooks.d.ts.map +1 -0
  54. package/dist/rules/react-hooks.js +163 -0
  55. package/dist/rules/react-perf.d.ts +3 -0
  56. package/dist/rules/react-perf.d.ts.map +1 -0
  57. package/dist/rules/react-perf.js +47 -0
  58. package/dist/rules/react-refresh.d.ts +3 -0
  59. package/dist/rules/react-refresh.d.ts.map +1 -0
  60. package/dist/rules/react-refresh.js +19 -0
  61. package/dist/rules/react.d.ts +3 -0
  62. package/dist/rules/react.d.ts.map +1 -0
  63. package/dist/rules/react.js +740 -0
  64. package/dist/rules/security.d.ts +3 -0
  65. package/dist/rules/security.d.ts.map +1 -0
  66. package/dist/rules/security.js +112 -0
  67. package/dist/rules/sort-react-dependency-arrays.d.ts +3 -0
  68. package/dist/rules/sort-react-dependency-arrays.d.ts.map +1 -0
  69. package/dist/rules/sort-react-dependency-arrays.js +12 -0
  70. package/dist/rules/stylistic.d.ts +3 -0
  71. package/dist/rules/stylistic.d.ts.map +1 -0
  72. package/dist/rules/stylistic.js +916 -0
  73. package/dist/rules/typescript.d.ts +3 -0
  74. package/dist/rules/typescript.d.ts.map +1 -0
  75. package/dist/{plugins → rules}/typescript.js +1 -1
  76. package/dist/rules/unicorn.d.ts +3 -0
  77. package/dist/rules/unicorn.d.ts.map +1 -0
  78. package/dist/rules/unicorn.js +998 -0
  79. package/dist/test/index.d.ts +2 -0
  80. package/dist/test/index.d.ts.map +1 -0
  81. package/dist/test/index.js +15 -0
  82. package/package.json +11 -13
  83. package/dist/plugins/array-function.d.ts +0 -3
  84. package/dist/plugins/array-function.d.ts.map +0 -1
  85. package/dist/plugins/array-function.js +0 -58
  86. package/dist/plugins/css-modules.d.ts +0 -3
  87. package/dist/plugins/css-modules.d.ts.map +0 -1
  88. package/dist/plugins/css-modules.js +0 -19
  89. package/dist/plugins/destructuring.d.ts +0 -3
  90. package/dist/plugins/destructuring.d.ts.map +0 -1
  91. package/dist/plugins/destructuring.js +0 -41
  92. package/dist/plugins/eslint-comments.d.ts +0 -3
  93. package/dist/plugins/eslint-comments.d.ts.map +0 -1
  94. package/dist/plugins/eslint-comments.js +0 -79
  95. package/dist/plugins/import-newlines.d.ts +0 -3
  96. package/dist/plugins/import-newlines.d.ts.map +0 -1
  97. package/dist/plugins/import-newlines.js +0 -28
  98. package/dist/plugins/import-x.d.ts +0 -3
  99. package/dist/plugins/import-x.d.ts.map +0 -1
  100. package/dist/plugins/import-x.js +0 -418
  101. package/dist/plugins/newline-destructuring.d.ts +0 -3
  102. package/dist/plugins/newline-destructuring.d.ts.map +0 -1
  103. package/dist/plugins/newline-destructuring.js +0 -26
  104. package/dist/plugins/next.d.ts +0 -3
  105. package/dist/plugins/next.d.ts.map +0 -1
  106. package/dist/plugins/next.js +0 -142
  107. package/dist/plugins/no-unsanitized.d.ts +0 -3
  108. package/dist/plugins/no-unsanitized.d.ts.map +0 -1
  109. package/dist/plugins/no-unsanitized.js +0 -40
  110. package/dist/plugins/no-useless-assign.d.ts +0 -3
  111. package/dist/plugins/no-useless-assign.d.ts.map +0 -1
  112. package/dist/plugins/no-useless-assign.js +0 -22
  113. package/dist/plugins/node.d.ts +0 -3
  114. package/dist/plugins/node.d.ts.map +0 -1
  115. package/dist/plugins/node.js +0 -307
  116. package/dist/plugins/perfectionist.d.ts +0 -3
  117. package/dist/plugins/perfectionist.d.ts.map +0 -1
  118. package/dist/plugins/perfectionist.js +0 -96
  119. package/dist/plugins/promise.d.ts +0 -3
  120. package/dist/plugins/promise.d.ts.map +0 -1
  121. package/dist/plugins/promise.js +0 -125
  122. package/dist/plugins/react-19-upgrade.d.ts +0 -3
  123. package/dist/plugins/react-19-upgrade.d.ts.map +0 -1
  124. package/dist/plugins/react-19-upgrade.js +0 -22
  125. package/dist/plugins/react-compiler.d.ts +0 -3
  126. package/dist/plugins/react-compiler.d.ts.map +0 -1
  127. package/dist/plugins/react-hooks.d.ts +0 -3
  128. package/dist/plugins/react-hooks.d.ts.map +0 -1
  129. package/dist/plugins/react-hooks.js +0 -165
  130. package/dist/plugins/react-perf.d.ts +0 -3
  131. package/dist/plugins/react-perf.d.ts.map +0 -1
  132. package/dist/plugins/react-perf.js +0 -49
  133. package/dist/plugins/react-refresh.d.ts +0 -3
  134. package/dist/plugins/react-refresh.d.ts.map +0 -1
  135. package/dist/plugins/react-refresh.js +0 -21
  136. package/dist/plugins/react.d.ts +0 -3
  137. package/dist/plugins/react.d.ts.map +0 -1
  138. package/dist/plugins/react.js +0 -738
  139. package/dist/plugins/security.d.ts +0 -3
  140. package/dist/plugins/security.d.ts.map +0 -1
  141. package/dist/plugins/security.js +0 -114
  142. package/dist/plugins/stylistic.d.ts +0 -3
  143. package/dist/plugins/stylistic.d.ts.map +0 -1
  144. package/dist/plugins/stylistic.js +0 -918
  145. package/dist/plugins/typescript.d.ts +0 -3
  146. package/dist/plugins/typescript.d.ts.map +0 -1
  147. package/dist/plugins/unicorn.d.ts +0 -3
  148. package/dist/plugins/unicorn.d.ts.map +0 -1
  149. package/dist/plugins/unicorn.js +0 -1000
  150. package/dist/rules.d.ts.map +0 -1
@@ -1,918 +0,0 @@
1
- import stylistic from "@stylistic/eslint-plugin";
2
- import { INDENT_SPACES, MAXIMUM_LINE_LENGTH, } from "../settings.js";
3
- /*
4
- * Stylistic rules for ESLint, works for both JavaScript and TypeScript.
5
- *
6
- * https://www.npmjs.com/package/@stylistic/eslint-plugin
7
- */
8
- export const stylisticPlugin = [
9
- {
10
- plugins: {
11
- "@stylistic": stylistic,
12
- },
13
- rules: {
14
- /*
15
- * Enforce linebreaks after opening and before closing array brackets
16
- *
17
- * https://eslint.style/rules/default/array-bracket-newline
18
- */
19
- "@stylistic/array-bracket-newline": [
20
- "warn",
21
- "consistent",
22
- ],
23
- /*
24
- * Enforce consistent spacing inside array brackets
25
- *
26
- * https://eslint.style/rules/default/array-bracket-spacing
27
- */
28
- "@stylistic/array-bracket-spacing": "warn",
29
- /*
30
- * Enforce line breaks after each array element
31
- *
32
- * https://eslint.style/rules/default/array-element-newline
33
- */
34
- "@stylistic/array-element-newline": [
35
- "warn",
36
- "consistent",
37
- ],
38
- /*
39
- * Require parentheses around arrow function arguments
40
- *
41
- * https://eslint.style/rules/default/arrow-parens
42
- */
43
- "@stylistic/arrow-parens": "warn",
44
- /*
45
- * Enforce consistent spacing before and after the arrow in arrow functions
46
- *
47
- * https://eslint.style/rules/default/arrow-spacing
48
- */
49
- "@stylistic/arrow-spacing": "warn",
50
- /*
51
- * Disallow or enforce spaces inside of blocks after opening block and
52
- * before closing block
53
- *
54
- * https://eslint.style/rules/default/block-spacing
55
- */
56
- "@stylistic/block-spacing": "warn",
57
- /*
58
- * Enforce consistent brace style for blocks
59
- *
60
- * https://eslint.style/rules/default/brace-style
61
- */
62
- "@stylistic/brace-style": "warn",
63
- /*
64
- * Require or disallow trailing commas
65
- *
66
- * https://eslint.style/rules/default/comma-dangle
67
- */
68
- "@stylistic/comma-dangle": [
69
- "warn",
70
- {
71
- arrays: "always-multiline",
72
- enums: "always-multiline",
73
- exports: "always-multiline",
74
- functions: "always-multiline",
75
- generics: "always-multiline",
76
- imports: "always-multiline",
77
- objects: "always-multiline",
78
- tuples: "always-multiline",
79
- },
80
- ],
81
- /*
82
- * Enforce consistent spacing before and after commas
83
- *
84
- * https://eslint.style/rules/default/comma-spacing
85
- */
86
- "@stylistic/comma-spacing": "warn",
87
- /*
88
- * Enforce consistent comma style
89
- *
90
- * https://eslint.style/rules/default/comma-style
91
- */
92
- "@stylistic/comma-style": "warn",
93
- /*
94
- * Enforce consistent spacing inside computed property brackets
95
- *
96
- * https://eslint.style/rules/default/computed-property-spacing
97
- */
98
- "@stylistic/computed-property-spacing": "warn",
99
- /*
100
- *
101
- *
102
- * https://eslint.style/rules/default/curly-newline
103
- */
104
- "@stylistic/curly-newline": [
105
- "warn",
106
- {
107
- ArrowFunctionExpression: "always",
108
- BlockStatement: "always",
109
- ClassBody: "always",
110
- DoWhileStatement: "always",
111
- ForInStatement: "always",
112
- ForOfStatement: "always",
113
- ForStatement: "always",
114
- FunctionDeclaration: "always",
115
- FunctionExpression: "always",
116
- IfStatementAlternative: "always",
117
- IfStatementConsequent: "always",
118
- Property: "always",
119
- StaticBlock: "always",
120
- SwitchCase: "always",
121
- SwitchStatement: "always",
122
- TryStatementBlock: {
123
- consistent: true,
124
- minElements: 1,
125
- multiline: true,
126
- },
127
- TryStatementFinalizer: {
128
- consistent: true,
129
- minElements: 1,
130
- multiline: true,
131
- },
132
- TryStatementHandler: {
133
- consistent: true,
134
- minElements: 1,
135
- multiline: true,
136
- },
137
- TSModuleBlock: "always",
138
- WhileStatement: "always",
139
- WithStatement: "always",
140
- },
141
- ],
142
- /*
143
- * Enforce consistent newlines before and after dots
144
- *
145
- * https://eslint.style/rules/default/dot-location
146
- */
147
- "@stylistic/dot-location": [
148
- "warn",
149
- "property",
150
- ],
151
- /*
152
- * Require or disallow newline at the end of files
153
- *
154
- * https://eslint.style/rules/default/eol-last
155
- */
156
- "@stylistic/eol-last": "warn",
157
- /*
158
- * Enforce consistent line break styles for JSX props. (experimental)
159
- *
160
- * https://eslint.style/rules/default/jsx-props-style
161
- */
162
- "@stylistic/exp-jsx-props-style": [
163
- "off",
164
- {
165
- multiLine: {
166
- maxItemsPerLine: 1,
167
- minItems: 0,
168
- },
169
- singleLine: {
170
- maxItems: 1,
171
- },
172
- },
173
- ],
174
- /*
175
- * Enforce consistent spacing and line break styles inside brackets. (experimental)
176
- *
177
- * https://eslint.style/rules/default/list-style
178
- */
179
- "@stylistic/exp-list-style": [
180
- "warn",
181
- {
182
- multiLine: {
183
- minItems: 0,
184
- },
185
- overrides: {
186
- "{}": { singleLine: { spacing: "always" } },
187
- TSTypeLiteral: {
188
- singleLine: {
189
- maxItems: 1,
190
- spacing: "always",
191
- },
192
- },
193
- },
194
- singleLine: {
195
- maxItems: Number.POSITIVE_INFINITY,
196
- spacing: "never",
197
- },
198
- },
199
- ],
200
- /*
201
- * Enforce line breaks between arguments of a function call
202
- *
203
- * https://eslint.style/rules/default/function-call-argument-newline
204
- */
205
- "@stylistic/function-call-argument-newline": [
206
- "warn",
207
- "consistent",
208
- ],
209
- /*
210
- * Require or disallow spacing between function identifiers and their
211
- * invocations
212
- *
213
- * https://eslint.style/rules/default/function-call-spacing
214
- */
215
- "@stylistic/function-call-spacing": "warn",
216
- /*
217
- * Enforce consistent line breaks inside function parentheses
218
- *
219
- * https://eslint.style/rules/default/function-paren-newline
220
- */
221
- "@stylistic/function-paren-newline": ["warn", "consistent"],
222
- /*
223
- * Enforce consistent spacing around * operators in generator functions
224
- *
225
- * https://eslint.style/rules/default/generator-star-spacing
226
- */
227
- "@stylistic/generator-star-spacing": "warn",
228
- /*
229
- * Enforce the location of arrow function bodies
230
- *
231
- * https://eslint.style/rules/default/implicit-arrow-linebreak
232
- */
233
- "@stylistic/implicit-arrow-linebreak": "warn",
234
- /*
235
- * Enforce consistent indentation
236
- *
237
- * https://eslint.style/rules/default/indent
238
- */
239
- "@stylistic/indent": [
240
- "warn",
241
- INDENT_SPACES,
242
- {
243
- MemberExpression: 0,
244
- SwitchCase: 1,
245
- },
246
- ],
247
- /*
248
- * Enforce consistent indentation
249
- *
250
- * https://eslint.style/rules/default/indent-binary-ops
251
- */
252
- "@stylistic/indent-binary-ops": [
253
- "warn",
254
- INDENT_SPACES,
255
- ],
256
- /*
257
- * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
258
- *
259
- * https://eslint.style/rules/default/jsx-child-element-spacing
260
- */
261
- "@stylistic/jsx-child-element-spacing": "warn",
262
- /*
263
- * Validate closing bracket location in JSX (fixable)
264
- *
265
- * https://eslint.style/rules/default/jsx-closing-bracket-location
266
- */
267
- "@stylistic/jsx-closing-bracket-location": "warn",
268
- /*
269
- * Validate closing tag location in JSX (fixable)
270
- *
271
- * https://eslint.style/rules/default/jsx-closing-tag-location
272
- */
273
- "@stylistic/jsx-closing-tag-location": "warn",
274
- /*
275
- * Enforce curly braces or disallow unnecessary curly braces in JSX
276
- *
277
- * This conflicts with react/jsx-no-literals. Leaving off for now.
278
- *
279
- * https://eslint.style/rules/default/jsx-curly-brace-presence
280
- */
281
- "@stylistic/jsx-curly-brace-presence": "off",
282
- /*
283
- * Enforce linebreaks in curly braces in JSX attributes and expressions. (fixable)
284
- *
285
- * https://eslint.style/rules/default/jsx-curly-newline
286
- */
287
- "@stylistic/jsx-curly-newline": ["warn", "consistent"],
288
- /*
289
- * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions (fixable)
290
- *
291
- * https://eslint.style/rules/default/jsx-curly-spacing
292
- */
293
- "@stylistic/jsx-curly-spacing": [
294
- "warn",
295
- {
296
- children: { when: "always" },
297
- when: "always",
298
- },
299
- ],
300
- /*
301
- * Enforce or disallow spaces around equal signs in JSX attributes (fixable)
302
- *
303
- * https://eslint.style/rules/default/jsx-equals-spacing
304
- */
305
- "@stylistic/jsx-equals-spacing": "warn",
306
- /*
307
- * Enforce position of the first prop in JSX (fixable)
308
- *
309
- * https://eslint.style/rules/default/jsx-first-prop-new-line
310
- */
311
- "@stylistic/jsx-first-prop-new-line": "warn",
312
- /*
313
- * Enforce line breaks before and after JSX elements when they are used as arguments to a function.
314
- *
315
- * https://eslint.style/rules/default/jsx-function-call-newline
316
- */
317
- "@stylistic/jsx-function-call-newline": ["warn", "multiline"],
318
- /*
319
- * Validate props indentation in JSX (fixable)
320
- *
321
- * https://eslint.style/rules/default/jsx-indent-props
322
- */
323
- "@stylistic/jsx-indent-props": "warn",
324
- /*
325
- * Limit maximum of props on a single line in JSX (fixable)
326
- *
327
- * This is off for now because it causes --fix to get into a fight with
328
- * 'react/jsx-indent', causing an infinite loop of fixing
329
- *
330
- * https://eslint.style/rules/default/jsx-max-props-per-line
331
- */
332
- "@stylistic/jsx-max-props-per-line": [
333
- "warn",
334
- { maximum: 1 },
335
- ],
336
- /*
337
- * Enforce a new line after jsx elements and expressions (fixable)
338
- *
339
- * This is off for now because it this would make too much empty space
340
- *
341
- * https://eslint.style/rules/default/jsx-newline
342
- */
343
- "@stylistic/jsx-newline": "off",
344
- /*
345
- * Limit to one expression per line in JSX
346
- *
347
- * https://eslint.style/rules/default/jsx-one-expression-per-line
348
- */
349
- "@stylistic/jsx-one-expression-per-line": "warn",
350
- /*
351
- * Enforces coding style that user-defined JSX components are defined and referenced in PascalCase.
352
- *
353
- * https://eslint.style/rules/default/jsx-pascal-case
354
- */
355
- "@stylistic/jsx-pascal-case": "warn",
356
- /*
357
- * Enforce the consistent use of either double or single quotes in JSX attributes
358
- *
359
- * https://eslint.style/rules/default/jsx-quotes
360
- */
361
- "@stylistic/jsx-quotes": "warn",
362
- /*
363
- * Prevent extra closing tags for components without children (fixable)
364
- *
365
- * https://eslint.style/rules/default/self-closing-comp
366
- */
367
- "@stylistic/jsx-self-closing-comp": "warn",
368
- /*
369
- * Enforce props alphabetical sorting (fixable)
370
- *
371
- * Handled by eslint-plugin-perfectionst
372
- *
373
- * https://eslint.style/rules/default/jsx-sort-props
374
- */
375
- "@stylistic/jsx-sort-props": [
376
- "off",
377
- {
378
- ignoreCase: true,
379
- },
380
- ],
381
- /*
382
- * Validate whitespace in and around the JSX opening and closing brackets (fixable)
383
- *
384
- * https://eslint.style/rules/default/jsx-tag-spacing
385
- */
386
- "@stylistic/jsx-tag-spacing": "warn",
387
- /*
388
- * Prevent missing parentheses around multilines JSX (fixable)
389
- *
390
- * https://eslint.style/rules/default/jsx-wrap-multilines
391
- */
392
- "@stylistic/jsx-wrap-multilines": "warn",
393
- /*
394
- * Enforce consistent spacing between keys and values in object literal properties
395
- *
396
- * https://eslint.style/rules/default/key-spacing
397
- */
398
- "@stylistic/key-spacing": [
399
- "warn",
400
- {
401
- afterColon: true,
402
- beforeColon: false,
403
- mode: "strict",
404
- },
405
- ],
406
- /*
407
- * Enforce consistent spacing before and after keywords
408
- *
409
- * https://eslint.style/rules/default/keyword-spacing
410
- */
411
- "@stylistic/keyword-spacing": [
412
- "warn",
413
- {
414
- after: true,
415
- before: true,
416
- overrides: {
417
- case: {
418
- before: false,
419
- },
420
- catch: {
421
- after: false,
422
- before: false,
423
- },
424
- class: {
425
- after: false,
426
- before: false,
427
- },
428
- const: {
429
- before: false,
430
- },
431
- else: {
432
- after: false,
433
- before: false,
434
- },
435
- export: {
436
- before: false,
437
- },
438
- finally: {
439
- after: false,
440
- before: false,
441
- },
442
- for: {
443
- after: false,
444
- },
445
- if: {
446
- after: false,
447
- },
448
- import: {
449
- before: false,
450
- },
451
- let: {
452
- before: false,
453
- },
454
- return: {
455
- before: false,
456
- },
457
- switch: {
458
- after: false,
459
- },
460
- this: {
461
- after: false,
462
- },
463
- try: {
464
- after: false,
465
- },
466
- while: {
467
- after: false,
468
- },
469
- },
470
- },
471
- ],
472
- /*
473
- * Line comments can be positioned above or beside code. This rule helps teams maintain a consistent style.
474
- *
475
- * https://eslint.style/rules/default/line-comment-position
476
- */
477
- "@stylistic/line-comment-position": "warn",
478
- /*
479
- * Enforce consistent linebreak style
480
- *
481
- * https://eslint.style/rules/default/linebreak-style
482
- */
483
- "@stylistic/linebreak-style": "warn",
484
- /*
485
- * Require empty lines around comments
486
- *
487
- * https://eslint.style/rules/default/lines-around-comment
488
- */
489
- "@stylistic/lines-around-comment": "warn",
490
- /*
491
- * Require or disallow an empty line between class members
492
- *
493
- * https://eslint.style/rules/default/lines-between-class-members
494
- */
495
- "@stylistic/lines-between-class-members": [
496
- "warn",
497
- "always",
498
- {
499
- exceptAfterSingleLine: true,
500
- },
501
- ],
502
- /*
503
- * Enforce a maximum line length
504
- *
505
- * https://eslint.style/rules/default/max-len
506
- */
507
- "@stylistic/max-len": [
508
- "warn",
509
- {
510
- code: MAXIMUM_LINE_LENGTH,
511
- ignoreComments: true,
512
- },
513
- ],
514
- /*
515
- * Enforce a maximum number of statements allowed per line
516
- *
517
- * https://eslint.style/rules/default/max-statements-per-line
518
- */
519
- "@stylistic/max-statements-per-line": [
520
- "warn",
521
- {
522
- max: 1,
523
- },
524
- ],
525
- /*
526
- * Require a specific member delimiter style for interfaces and type literals
527
- *
528
- * https://eslint.style/rules/default/member-delimiter-style
529
- */
530
- "@stylistic/member-delimiter-style": "warn",
531
- /*
532
- * Many style guides require a particular style for comments that span multiple lines.
533
- * For example, some style guides prefer the use of a single block comment for multiline
534
- * comments, whereas other style guides prefer consecutive line comments.
535
- *
536
- * Off because it's annoying
537
- *
538
- * https://eslint.style/rules/default/multiline-comment-style
539
- */
540
- "@stylistic/multiline-comment-style": "off",
541
- /*
542
- * Enforce newlines between operands of ternary expressions
543
- *
544
- * https://eslint.style/rules/default/multiline-ternary
545
- */
546
- "@stylistic/multiline-ternary": ["warn", "always-multiline"],
547
- /*
548
- * Require parentheses when invoking a constructor with no arguments
549
- *
550
- * https://eslint.style/rules/default/new-parens
551
- */
552
- "@stylistic/new-parens": "warn",
553
- /*
554
- * Require a newline after each call in a method chain
555
- *
556
- * https://eslint.style/rules/default/newline-per-chained-call
557
- */
558
- "@stylistic/newline-per-chained-call": [
559
- "warn",
560
- {
561
- ignoreChainWithDepth: 3,
562
- },
563
- ],
564
- /*
565
- * Disallow arrow functions where they could be confused with comparisons
566
- *
567
- * Off for now because I believe in myself
568
- *
569
- * https://eslint.style/rules/default/no-confusing-arrow
570
- */
571
- "@stylistic/no-confusing-arrow": "off",
572
- /*
573
- * Disallow unnecessary parentheses
574
- *
575
- * https://eslint.style/rules/default/no-extra-parens
576
- */
577
- "@stylistic/no-extra-parens": [
578
- "warn",
579
- "all",
580
- {
581
- ignoreJSX: "multi-line",
582
- nestedConditionalExpressions: false,
583
- ternaryOperandBinaryExpressions: false,
584
- },
585
- ],
586
- /*
587
- * Disallow unnecessary semicolons
588
- *
589
- * https://eslint.style/rules/default/no-extra-semi
590
- */
591
- "@stylistic/no-extra-semi": "warn",
592
- /*
593
- * Disallow leading or trailing decimal points in numeric literals
594
- *
595
- * https://eslint.style/rules/default/no-floating-decimal
596
- */
597
- "@stylistic/no-floating-decimal": "warn",
598
- /*
599
- * Disallow mixed binary operators
600
- *
601
- * Using mixed operators is chilled
602
- *
603
- * https://eslint.style/rules/default/no-mixed-operators
604
- */
605
- "@stylistic/no-mixed-operators": "off",
606
- /*
607
- * Disallow mixed spaces and tabs for indentation
608
- *
609
- * https://eslint.style/rules/default/no-mixed-spaces-and-tabs
610
- */
611
- "@stylistic/no-mixed-spaces-and-tabs": "warn",
612
- /*
613
- * Disallow multiple spaces
614
- *
615
- * https://eslint.style/rules/default/no-multi-spaces
616
- */
617
- "@stylistic/no-multi-spaces": "warn",
618
- /*
619
- * Disallow multiple empty lines
620
- *
621
- * https://eslint.style/rules/default/no-multiple-empty-lines
622
- */
623
- "@stylistic/no-multiple-empty-lines": "warn",
624
- /*
625
- * Disallow all tabs
626
- *
627
- * https://eslint.style/rules/default/no-tabs
628
- */
629
- "@stylistic/no-tabs": "warn",
630
- /*
631
- * Disallow trailing whitespace at the end of lines
632
- *
633
- * https://eslint.style/rules/default/no-trailing-spaces
634
- */
635
- "@stylistic/no-trailing-spaces": "warn",
636
- /*
637
- * Disallow whitespace before properties
638
- *
639
- * https://eslint.style/rules/default/no-whitespace-before-property
640
- */
641
- "@stylistic/no-whitespace-before-property": "warn",
642
- /*
643
- * Enforce the location of single-line statements
644
- *
645
- * https://eslint.style/rules/default/nonblock-statement-body-position
646
- */
647
- "@stylistic/nonblock-statement-body-position": "warn",
648
- /*
649
- * Enforce consistent line breaks inside braces
650
- *
651
- * https://eslint.style/rules/default/object-curly-newline
652
- */
653
- "@stylistic/object-curly-newline": [
654
- "warn",
655
- {
656
- ExportDeclaration: {
657
- consistent: true,
658
- minProperties: 2,
659
- multiline: true,
660
- },
661
- ImportDeclaration: {
662
- consistent: true,
663
- minProperties: 2,
664
- multiline: true,
665
- },
666
- ObjectExpression: {
667
- consistent: true,
668
- minProperties: 2,
669
- multiline: true,
670
- },
671
- ObjectPattern: {
672
- consistent: true,
673
- minProperties: 2,
674
- multiline: true,
675
- },
676
- },
677
- ],
678
- /*
679
- * Enforce consistent spacing inside braces
680
- *
681
- * https://eslint.style/rules/default/object-curly-spacing
682
- */
683
- "@stylistic/object-curly-spacing": ["warn", "always"],
684
- /*
685
- * Enforce placing object properties on separate lines
686
- *
687
- * https://eslint.style/rules/default/object-property-newline
688
- */
689
- "@stylistic/object-property-newline": [
690
- "warn",
691
- {
692
- allowAllPropertiesOnSameLine: false,
693
- },
694
- ],
695
- /*
696
- * Require or disallow newlines around variable declarations
697
- *
698
- * https://eslint.style/rules/default/one-var-declaration-per-line
699
- */
700
- "@stylistic/one-var-declaration-per-line": "warn",
701
- /*
702
- * Enforce consistent linebreak style for operators
703
- *
704
- * https://eslint.style/rules/default/operator-linebreak
705
- */
706
- "@stylistic/operator-linebreak": [
707
- "warn",
708
- "before",
709
- {
710
- overrides: { "=": "after" },
711
- },
712
- ],
713
- /*
714
- * Require or disallow padding within blocks
715
- *
716
- * https://eslint.style/rules/default/padded-blocks
717
- */
718
- "@stylistic/padded-blocks": [
719
- "warn",
720
- {
721
- blocks: "always",
722
- classes: "always",
723
- switches: "always",
724
- },
725
- {
726
- allowSingleLineBlocks: true,
727
- },
728
- ],
729
- /*
730
- * Require or disallow padding lines between statements
731
- *
732
- * https://eslint.style/rules/default/padding-line-between-statements
733
- */
734
- "@stylistic/padding-line-between-statements": [
735
- "warn",
736
- {
737
- blankLine: "always",
738
- next: [
739
- "const",
740
- "directive",
741
- "export",
742
- "let",
743
- "multiline-block-like",
744
- "return",
745
- "var",
746
- ],
747
- prev: [
748
- "directive",
749
- "multiline-block-like",
750
- "return",
751
- ],
752
- },
753
- {
754
- blankLine: "always",
755
- next: "if",
756
- prev: "*",
757
- },
758
- {
759
- blankLine: "always",
760
- next: "return",
761
- prev: "*",
762
- },
763
- ],
764
- /*
765
- * Require quotes around object literal property names
766
- *
767
- * https://eslint.style/rules/default/quote-props
768
- */
769
- "@stylistic/quote-props": ["warn", "as-needed"],
770
- /*
771
- * Enforce the consistent use of either backticks, double, or single quotes
772
- *
773
- * https://eslint.style/rules/default/quotes
774
- */
775
- "@stylistic/quotes": "warn",
776
- /*
777
- * Enforce spacing between rest and spread operators and their expressions
778
- *
779
- * https://eslint.style/rules/default/rest-spread-spacing
780
- */
781
- "@stylistic/rest-spread-spacing": "warn",
782
- /*
783
- * Require or disallow semicolons instead of ASI
784
- *
785
- * https://eslint.style/rules/default/semi
786
- */
787
- "@stylistic/semi": "warn",
788
- /*
789
- * Enforce consistent spacing before and after semicolons
790
- *
791
- * https://eslint.style/rules/default/semi-spacing
792
- */
793
- "@stylistic/semi-spacing": "warn",
794
- /*
795
- * Enforce location of semicolons
796
- *
797
- * https://eslint.style/rules/default/semi-style
798
- */
799
- "@stylistic/semi-style": [
800
- "warn",
801
- "last",
802
- ],
803
- /*
804
- * Enforce consistent spacing before blocks
805
- *
806
- * https://eslint.style/rules/default/space-before-blocks
807
- */
808
- "@stylistic/space-before-blocks": [
809
- "warn",
810
- {
811
- classes: "never",
812
- functions: "never",
813
- keywords: "never",
814
- },
815
- ],
816
- /*
817
- * Enforce consistent spacing before function definition opening parenthesis
818
- *
819
- * https://eslint.style/rules/default/space-before-function-paren
820
- */
821
- "@stylistic/space-before-function-paren": [
822
- "warn",
823
- {
824
- anonymous: "never",
825
- asyncArrow: "always",
826
- named: "never",
827
- },
828
- ],
829
- /*
830
- * Enforce consistent spacing inside parentheses
831
- *
832
- * https://eslint.style/rules/default/space-in-parens
833
- */
834
- "@stylistic/space-in-parens": ["warn", "never"],
835
- /*
836
- * Require spacing around infix operators
837
- *
838
- * https://eslint.style/rules/default/space-infix-ops
839
- */
840
- "@stylistic/space-infix-ops": "warn",
841
- /*
842
- * Enforce consistent spacing before or after unary operators
843
- *
844
- * https://eslint.style/rules/default/space-unary-ops
845
- */
846
- "@stylistic/space-unary-ops": "warn",
847
- /*
848
- * Enforce consistent spacing after the // or /* in a comment
849
- *
850
- * https://eslint.style/rules/default/spaced-comment
851
- */
852
- "@stylistic/spaced-comment": "warn",
853
- /*
854
- * Enforce spacing around colons of switch statements
855
- *
856
- * https://eslint.style/rules/default/switch-colon-spacing
857
- */
858
- "@stylistic/switch-colon-spacing": [
859
- "warn",
860
- {
861
- after: false,
862
- before: true,
863
- },
864
- ],
865
- /*
866
- * Require or disallow spacing around embedded expressions of template strings
867
- *
868
- * https://eslint.style/rules/default/template-curly-spacing
869
- */
870
- "@stylistic/template-curly-spacing": [
871
- "warn",
872
- "always",
873
- ],
874
- /*
875
- * Require or disallow spacing between template tags and their literals
876
- *
877
- * https://eslint.style/rules/default/template-tag-spacing
878
- */
879
- "@stylistic/template-tag-spacing": "warn",
880
- /*
881
- * Require consistent spacing around type annotations
882
- *
883
- * https://eslint.style/rules/default/type-annotation-spacing
884
- */
885
- "@stylistic/type-annotation-spacing": "warn",
886
- /*
887
- * Enforces consistent spacing inside TypeScript type generics.
888
- *
889
- * https://eslint.style/rules/default/type-generic-spacing
890
- */
891
- "@stylistic/type-generic-spacing": "warn",
892
- /*
893
- * Expect space before the type declaration in the named tuple.
894
- *
895
- * https://eslint.style/rules/default/type-named-tuple-spacing
896
- */
897
- "@stylistic/type-named-tuple-spacing": "warn",
898
- /*
899
- * Require parentheses around immediate function invocations
900
- *
901
- * https://eslint.style/rules/default/wrap-iife
902
- */
903
- "@stylistic/wrap-iife": "warn",
904
- /*
905
- * Require parenthesis around regex literals
906
- *
907
- * https://eslint.style/rules/default/wrap-regex
908
- */
909
- "@stylistic/wrap-regex": "warn",
910
- /*
911
- * Require or disallow spacing around the * in yield* Expressions
912
- *
913
- * https://eslint.style/rules/default/yield-star-spacing
914
- */
915
- "@stylistic/yield-star-spacing": "warn",
916
- },
917
- },
918
- ];