@newsteam/eslint-config 1.2.15 → 1.2.17

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