linted 16.12.2-rc.0 → 16.12.2-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. package/dist/rules/html/{_enable.d.ts → enable.d.ts} +1 -1
  2. package/dist/rules/html/enable.d.ts.map +1 -0
  3. package/dist/rules/html/enable.js +15 -0
  4. package/dist/rules/html/enable.js.map +1 -0
  5. package/dist/rules/{mocha/_recommended.d.ts → html/enable_recommended.d.ts} +1 -1
  6. package/dist/rules/html/enable_recommended.d.ts.map +1 -0
  7. package/dist/rules/html/enable_recommended.js +8 -0
  8. package/dist/rules/html/enable_recommended.js.map +1 -0
  9. package/dist/rules/{_html.d.ts → html.d.ts} +1 -1
  10. package/dist/rules/html.d.ts.map +1 -0
  11. package/dist/rules/html.js +4 -0
  12. package/dist/rules/html.js.map +1 -0
  13. package/dist/rules/js/{_enable.d.ts → enable.d.ts} +1 -1
  14. package/dist/rules/js/{_enable.d.ts.map → enable.d.ts.map} +1 -1
  15. package/dist/rules/js/{_enable.js → enable.js} +281 -45
  16. package/dist/rules/js/enable.js.map +1 -0
  17. package/dist/rules/js/{stylistic.d.ts → enable_stylistic.d.ts} +25 -25
  18. package/dist/rules/js/{stylistic.d.ts.map → enable_stylistic.d.ts.map} +1 -1
  19. package/dist/rules/js/enable_stylistic.js +585 -0
  20. package/dist/rules/js/enable_stylistic.js.map +1 -0
  21. package/dist/rules/{_js.d.ts → js.d.ts} +25 -25
  22. package/dist/rules/{_js.d.ts.map → js.d.ts.map} +1 -1
  23. package/dist/rules/js.js +4 -0
  24. package/dist/rules/js.js.map +1 -0
  25. package/dist/rules/json/{_enable.d.ts → enable.d.ts} +1 -1
  26. package/dist/rules/json/enable.d.ts.map +1 -0
  27. package/dist/rules/json/{_enable.js → enable.js} +3 -3
  28. package/dist/rules/json/enable.js.map +1 -0
  29. package/dist/rules/json/enable_x.d.ts.map +1 -1
  30. package/dist/rules/json/enable_x.js +48 -8
  31. package/dist/rules/json/enable_x.js.map +1 -1
  32. package/dist/rules/{_json.d.ts → json.d.ts} +1 -1
  33. package/dist/rules/json.d.ts.map +1 -0
  34. package/dist/rules/{_json.js → json.js} +2 -2
  35. package/dist/rules/json.js.map +1 -0
  36. package/dist/rules/jsonc/override.d.ts.map +1 -1
  37. package/dist/rules/jsonc/override.js +12 -3
  38. package/dist/rules/jsonc/override.js.map +1 -1
  39. package/dist/rules/{_jsonc.d.ts → jsonc.d.ts} +1 -1
  40. package/dist/rules/jsonc.d.ts.map +1 -0
  41. package/dist/rules/{_jsonc.js → jsonc.js} +2 -2
  42. package/dist/rules/jsonc.js.map +1 -0
  43. package/dist/rules/md/{_enable.d.ts → enable.d.ts} +1 -1
  44. package/dist/rules/md/enable.d.ts.map +1 -0
  45. package/dist/rules/md/enable.js +14 -0
  46. package/dist/rules/md/enable.js.map +1 -0
  47. package/dist/rules/{_md.d.ts → md.d.ts} +1 -1
  48. package/dist/rules/md.d.ts.map +1 -0
  49. package/dist/rules/md.js +3 -0
  50. package/dist/rules/md.js.map +1 -0
  51. package/dist/rules/mocha/{_enable.d.ts → enable.d.ts} +1 -1
  52. package/dist/rules/mocha/enable.d.ts.map +1 -0
  53. package/dist/rules/mocha/enable.js +3 -0
  54. package/dist/rules/mocha/enable.js.map +1 -0
  55. package/dist/rules/{html/_recommended.d.ts → mocha/enable_recommended.d.ts} +1 -1
  56. package/dist/rules/mocha/enable_recommended.d.ts.map +1 -0
  57. package/dist/rules/mocha/enable_recommended.js +8 -0
  58. package/dist/rules/mocha/enable_recommended.js.map +1 -0
  59. package/dist/rules/{_mocha.d.ts → mocha.d.ts} +1 -1
  60. package/dist/rules/mocha.d.ts.map +1 -0
  61. package/dist/rules/mocha.js +4 -0
  62. package/dist/rules/mocha.js.map +1 -0
  63. package/dist/rules/svelte/disable.d.ts +5 -0
  64. package/dist/rules/svelte/disable.d.ts.map +1 -0
  65. package/dist/rules/svelte/disable.js +8 -0
  66. package/dist/rules/svelte/disable.js.map +1 -0
  67. package/dist/rules/svelte/disable_js.d.ts.map +1 -1
  68. package/dist/rules/svelte/disable_js.js +8 -3
  69. package/dist/rules/svelte/disable_js.js.map +1 -1
  70. package/dist/rules/svelte/disable_ts.d.ts.map +1 -1
  71. package/dist/rules/svelte/disable_ts.js +8 -3
  72. package/dist/rules/svelte/disable_ts.js.map +1 -1
  73. package/dist/rules/svelte/{_enable.d.ts → enable.d.ts} +1 -1
  74. package/dist/rules/svelte/enable.d.ts.map +1 -0
  75. package/dist/rules/svelte/enable.js +190 -0
  76. package/dist/rules/svelte/enable.js.map +1 -0
  77. package/dist/rules/svelte/enable_x.d.ts.map +1 -1
  78. package/dist/rules/svelte/enable_x.js +15 -3
  79. package/dist/rules/svelte/enable_x.js.map +1 -1
  80. package/dist/rules/{_svelte.d.ts → svelte.d.ts} +27 -27
  81. package/dist/rules/{_svelte.d.ts.map → svelte.d.ts.map} +1 -1
  82. package/dist/rules/{_svelte.js → svelte.js} +4 -4
  83. package/dist/rules/svelte.js.map +1 -0
  84. package/dist/rules/ts/{disable_compiler.d.ts → disable.d.ts} +2 -2
  85. package/dist/rules/ts/disable.d.ts.map +1 -0
  86. package/dist/rules/ts/{disable_compiler.js → disable.js} +3 -4
  87. package/dist/rules/ts/disable.js.map +1 -0
  88. package/dist/rules/ts/disable_x.d.ts.map +1 -1
  89. package/dist/rules/ts/disable_x.js +1 -2
  90. package/dist/rules/ts/disable_x.js.map +1 -1
  91. package/dist/rules/ts/{_enable.d.ts → enable.d.ts} +1 -1
  92. package/dist/rules/ts/enable.d.ts.map +1 -0
  93. package/dist/rules/ts/{_enable.js → enable.js} +173 -29
  94. package/dist/rules/ts/enable.js.map +1 -0
  95. package/dist/rules/ts/enable_x.d.ts.map +1 -1
  96. package/dist/rules/ts/enable_x.js +32 -5
  97. package/dist/rules/ts/enable_x.js.map +1 -1
  98. package/dist/rules/{_ts.d.ts → ts.d.ts} +26 -26
  99. package/dist/rules/{_ts.d.ts.map → ts.d.ts.map} +1 -1
  100. package/dist/rules/{_ts.js → ts.js} +4 -4
  101. package/dist/rules/ts.js.map +1 -0
  102. package/dist/rules/yml/{_enable.d.ts → enable.d.ts} +1 -1
  103. package/dist/rules/yml/enable.d.ts.map +1 -0
  104. package/dist/rules/yml/enable.js +60 -0
  105. package/dist/rules/yml/enable.js.map +1 -0
  106. package/dist/rules/yml/enable_x.d.ts.map +1 -1
  107. package/dist/rules/yml/enable_x.js +57 -9
  108. package/dist/rules/yml/enable_x.js.map +1 -1
  109. package/dist/rules/{_yml.d.ts → yml.d.ts} +1 -1
  110. package/dist/rules/yml.d.ts.map +1 -0
  111. package/dist/rules/{_yml.js → yml.js} +2 -2
  112. package/dist/rules/yml.js.map +1 -0
  113. package/dist/rules.d.ts +75 -75
  114. package/dist/rules.js +9 -9
  115. package/dist/rules.js.map +1 -1
  116. package/package.json +2 -2
  117. package/src/rules/html/enable.ts +16 -0
  118. package/src/rules/html/enable_recommended.ts +9 -0
  119. package/src/rules/html.ts +4 -0
  120. package/src/rules/js/enable.ts +524 -0
  121. package/src/rules/js/enable_stylistic.ts +608 -0
  122. package/src/rules/js.ts +4 -0
  123. package/src/rules/json/{_enable.ts → enable.ts} +3 -5
  124. package/src/rules/json/enable_x.ts +48 -9
  125. package/src/rules/{_json.ts → json.ts} +1 -1
  126. package/src/rules/jsonc/override.ts +13 -6
  127. package/src/rules/{_jsonc.ts → jsonc.ts} +1 -1
  128. package/src/rules/md/enable.ts +15 -0
  129. package/src/rules/md.ts +3 -0
  130. package/src/rules/mocha/enable.ts +3 -0
  131. package/src/rules/mocha/enable_recommended.ts +9 -0
  132. package/src/rules/mocha.ts +4 -0
  133. package/src/rules/svelte/disable.ts +9 -0
  134. package/src/rules/svelte/disable_js.ts +10 -6
  135. package/src/rules/svelte/disable_ts.ts +8 -4
  136. package/src/rules/svelte/{_enable.ts → enable.ts} +120 -21
  137. package/src/rules/svelte/enable_x.ts +15 -4
  138. package/src/rules/{_svelte.ts → svelte.ts} +3 -3
  139. package/src/rules/ts/{disable_compiler.ts → disable.ts} +3 -4
  140. package/src/rules/ts/disable_x.ts +2 -6
  141. package/src/rules/ts/{_enable.ts → enable.ts} +176 -33
  142. package/src/rules/ts/enable_x.ts +37 -12
  143. package/src/rules/{_ts.ts → ts.ts} +3 -3
  144. package/src/rules/yml/{_enable.ts → enable.ts} +38 -7
  145. package/src/rules/yml/enable_x.ts +56 -9
  146. package/src/rules/{_yml.ts → yml.ts} +1 -1
  147. package/src/rules.ts +9 -9
  148. package/dist/rules/_html.d.ts.map +0 -1
  149. package/dist/rules/_html.js +0 -4
  150. package/dist/rules/_html.js.map +0 -1
  151. package/dist/rules/_js.js +0 -4
  152. package/dist/rules/_js.js.map +0 -1
  153. package/dist/rules/_json.d.ts.map +0 -1
  154. package/dist/rules/_json.js.map +0 -1
  155. package/dist/rules/_jsonc.d.ts.map +0 -1
  156. package/dist/rules/_jsonc.js.map +0 -1
  157. package/dist/rules/_md.d.ts.map +0 -1
  158. package/dist/rules/_md.js +0 -3
  159. package/dist/rules/_md.js.map +0 -1
  160. package/dist/rules/_mocha.d.ts.map +0 -1
  161. package/dist/rules/_mocha.js +0 -4
  162. package/dist/rules/_mocha.js.map +0 -1
  163. package/dist/rules/_svelte.js.map +0 -1
  164. package/dist/rules/_ts.js.map +0 -1
  165. package/dist/rules/_yml.d.ts.map +0 -1
  166. package/dist/rules/_yml.js.map +0 -1
  167. package/dist/rules/html/_enable.d.ts.map +0 -1
  168. package/dist/rules/html/_enable.js +0 -10
  169. package/dist/rules/html/_enable.js.map +0 -1
  170. package/dist/rules/html/_recommended.d.ts.map +0 -1
  171. package/dist/rules/html/_recommended.js +0 -5
  172. package/dist/rules/html/_recommended.js.map +0 -1
  173. package/dist/rules/js/_enable.js.map +0 -1
  174. package/dist/rules/js/stylistic.js +0 -270
  175. package/dist/rules/js/stylistic.js.map +0 -1
  176. package/dist/rules/json/_enable.d.ts.map +0 -1
  177. package/dist/rules/json/_enable.js.map +0 -1
  178. package/dist/rules/md/_enable.d.ts.map +0 -1
  179. package/dist/rules/md/_enable.js +0 -9
  180. package/dist/rules/md/_enable.js.map +0 -1
  181. package/dist/rules/mocha/_enable.d.ts.map +0 -1
  182. package/dist/rules/mocha/_enable.js +0 -4
  183. package/dist/rules/mocha/_enable.js.map +0 -1
  184. package/dist/rules/mocha/_recommended.d.ts.map +0 -1
  185. package/dist/rules/mocha/_recommended.js +0 -5
  186. package/dist/rules/mocha/_recommended.js.map +0 -1
  187. package/dist/rules/svelte/_enable.d.ts.map +0 -1
  188. package/dist/rules/svelte/_enable.js +0 -90
  189. package/dist/rules/svelte/_enable.js.map +0 -1
  190. package/dist/rules/svelte/disable_x.d.ts +0 -5
  191. package/dist/rules/svelte/disable_x.d.ts.map +0 -1
  192. package/dist/rules/svelte/disable_x.js +0 -4
  193. package/dist/rules/svelte/disable_x.js.map +0 -1
  194. package/dist/rules/ts/_enable.d.ts.map +0 -1
  195. package/dist/rules/ts/_enable.js.map +0 -1
  196. package/dist/rules/ts/disable_compiler.d.ts.map +0 -1
  197. package/dist/rules/ts/disable_compiler.js.map +0 -1
  198. package/dist/rules/yml/_enable.d.ts.map +0 -1
  199. package/dist/rules/yml/_enable.js +0 -28
  200. package/dist/rules/yml/_enable.js.map +0 -1
  201. package/src/rules/_html.ts +0 -4
  202. package/src/rules/_js.ts +0 -4
  203. package/src/rules/_md.ts +0 -3
  204. package/src/rules/_mocha.ts +0 -4
  205. package/src/rules/html/_enable.ts +0 -13
  206. package/src/rules/html/_recommended.ts +0 -7
  207. package/src/rules/js/_enable.ts +0 -287
  208. package/src/rules/js/stylistic.ts +0 -294
  209. package/src/rules/md/_enable.ts +0 -14
  210. package/src/rules/mocha/_enable.ts +0 -5
  211. package/src/rules/mocha/_recommended.ts +0 -7
  212. package/src/rules/svelte/disable_x.ts +0 -8
@@ -1,22 +1,29 @@
1
- import { id, level, state } from "../_strings.js";
1
+ import { enable, level, state } from "../_strings.js";
2
2
 
3
3
  const
4
- { enable } = id,
5
4
  { ERROR, OFF } = level,
6
5
  { Never, Explicit } = state;
7
6
 
8
7
  export default [
9
8
  enable,
10
9
  {
11
- // https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules ]
10
+ // https://typescript-eslint.io/rules/?=xextension-xdeprecated#rules
12
11
  "@typescript-eslint/adjacent-overload-signatures": OFF,
13
- "@typescript-eslint/array-type": [ERROR, { "default": "array", readonly: "array" }],
12
+ "@typescript-eslint/array-type": [
13
+ ERROR,
14
+ {
15
+ "default": "array",
16
+ readonly: "array",
17
+ },
18
+ ],
14
19
  "@typescript-eslint/await-thenable": ERROR,
15
20
  "@typescript-eslint/ban-ts-comment": [
16
21
  ERROR,
17
22
  {
18
23
  "ts-check": false,
19
- "ts-expect-error": { descriptionFormat: "^: BUG: .+$" },
24
+ "ts-expect-error": {
25
+ descriptionFormat: "^: BUG: .+$",
26
+ },
20
27
  "ts-ignore": true,
21
28
  "ts-nocheck": true,
22
29
  minimumDescriptionLength: 32,
@@ -26,10 +33,28 @@ export default [
26
33
  "@typescript-eslint/class-literal-property-style": [ERROR, "fields"],
27
34
  "@typescript-eslint/consistent-generic-constructors": [ERROR, "constructor"],
28
35
  "@typescript-eslint/consistent-indexed-object-style": [ERROR, "record"],
29
- "@typescript-eslint/consistent-type-assertions": [ERROR, { assertionStyle: "as", objectLiteralTypeAssertions: Never }],
36
+ "@typescript-eslint/consistent-type-assertions": [
37
+ ERROR,
38
+ {
39
+ assertionStyle: "as",
40
+ objectLiteralTypeAssertions: Never,
41
+ },
42
+ ],
30
43
  "@typescript-eslint/consistent-type-definitions": OFF,
31
- "@typescript-eslint/consistent-type-exports": [ERROR, { fixMixedExportsWithInlineTypeSpecifier: false }],
32
- "@typescript-eslint/consistent-type-imports": [ERROR, { disallowTypeAnnotations: true, fixStyle: "separate-type-imports", prefer: "type-imports" }],
44
+ "@typescript-eslint/consistent-type-exports": [
45
+ ERROR,
46
+ {
47
+ fixMixedExportsWithInlineTypeSpecifier: false,
48
+ },
49
+ ],
50
+ "@typescript-eslint/consistent-type-imports": [
51
+ ERROR,
52
+ {
53
+ disallowTypeAnnotations: true,
54
+ fixStyle: "separate-type-imports",
55
+ prefer: "type-imports",
56
+ },
57
+ ],
33
58
  "@typescript-eslint/explicit-function-return-type": OFF,
34
59
  "@typescript-eslint/explicit-member-accessibility": [
35
60
  ERROR,
@@ -230,9 +255,21 @@ export default [
230
255
  },
231
256
  ],
232
257
  "@typescript-eslint/no-confusing-non-null-assertion": ERROR,
233
- "@typescript-eslint/no-confusing-void-expression": [ERROR, { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
258
+ "@typescript-eslint/no-confusing-void-expression": [
259
+ ERROR,
260
+ {
261
+ ignoreArrowShorthand: true,
262
+ ignoreVoidOperator: true,
263
+ },
264
+ ],
234
265
  "@typescript-eslint/no-duplicate-enum-values": ERROR,
235
- "@typescript-eslint/no-duplicate-type-constituents": [ERROR, { ignoreIntersections: false, ignoreUnions: false }],
266
+ "@typescript-eslint/no-duplicate-type-constituents": [
267
+ ERROR,
268
+ {
269
+ ignoreIntersections: false,
270
+ ignoreUnions: false,
271
+ },
272
+ ],
236
273
  "@typescript-eslint/no-dynamic-delete": ERROR,
237
274
  "@typescript-eslint/no-empty-object-type": [
238
275
  ERROR,
@@ -242,7 +279,13 @@ export default [
242
279
  allowObjectTypes: Never,
243
280
  },
244
281
  ],
245
- "@typescript-eslint/no-explicit-any": [ERROR, { fixToUnknown: true, ignoreRestArgs: false }],
282
+ "@typescript-eslint/no-explicit-any": [
283
+ ERROR,
284
+ {
285
+ fixToUnknown: true,
286
+ ignoreRestArgs: false,
287
+ },
288
+ ],
246
289
  "@typescript-eslint/no-extra-non-null-assertion": ERROR,
247
290
  "@typescript-eslint/no-extraneous-class": [
248
291
  ERROR,
@@ -253,12 +296,36 @@ export default [
253
296
  allowWithDecorator: false,
254
297
  },
255
298
  ],
256
- "@typescript-eslint/no-floating-promises": [ERROR, { checkThenables: true, ignoreVoid: true, ignoreIIFE: false }],
299
+ "@typescript-eslint/no-floating-promises": [
300
+ ERROR,
301
+ {
302
+ checkThenables: true,
303
+ ignoreVoid: true,
304
+ ignoreIIFE: false,
305
+ },
306
+ ],
257
307
  "@typescript-eslint/no-for-in-array": ERROR,
258
308
  "@typescript-eslint/no-import-type-side-effects": ERROR,
259
- "@typescript-eslint/no-inferrable-types": [ERROR, { ignoreParameters: false, ignoreProperties: false }],
260
- "@typescript-eslint/no-invalid-void-type": [ERROR, { allowInGenericTypeArguments: true, allowAsThisParameter: false }],
261
- "@typescript-eslint/no-meaningless-void-operator": [ERROR, { checkNever: true }],
309
+ "@typescript-eslint/no-inferrable-types": [
310
+ ERROR,
311
+ {
312
+ ignoreParameters: false,
313
+ ignoreProperties: false,
314
+ },
315
+ ],
316
+ "@typescript-eslint/no-invalid-void-type": [
317
+ ERROR,
318
+ {
319
+ allowInGenericTypeArguments: true,
320
+ allowAsThisParameter: false,
321
+ },
322
+ ],
323
+ "@typescript-eslint/no-meaningless-void-operator": [
324
+ ERROR,
325
+ {
326
+ checkNever: true,
327
+ },
328
+ ],
262
329
  "@typescript-eslint/no-misused-new": ERROR,
263
330
  "@typescript-eslint/no-misused-promises": [
264
331
  ERROR,
@@ -280,15 +347,43 @@ export default [
280
347
  "@typescript-eslint/no-non-null-asserted-optional-chain": ERROR,
281
348
  "@typescript-eslint/no-non-null-assertion": ERROR,
282
349
  "@typescript-eslint/no-redundant-type-constituents": ERROR,
283
- "@typescript-eslint/no-restricted-types": OFF, /* preference - no shared custom types across all projects that I wish to ban*/
284
- "@typescript-eslint/no-require-imports": [ERROR, { allow: [] }],
285
- "@typescript-eslint/no-this-alias": [ERROR, { allowDestructuring: true, allowedNames: [] }],
286
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": [ERROR, { allowComparingNullableBooleansToTrue: true, allowComparingNullableBooleansToFalse: true }],
287
- "@typescript-eslint/no-unnecessary-condition": [ERROR, { allowConstantLoopConditions: false, allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false }],
350
+ "@typescript-eslint/no-restricted-types": OFF /* preference - no shared custom types across all projects that I wish to ban*/,
351
+ "@typescript-eslint/no-require-imports": [
352
+ ERROR,
353
+ {
354
+ allow: [],
355
+ },
356
+ ],
357
+ "@typescript-eslint/no-this-alias": [
358
+ ERROR,
359
+ {
360
+ allowDestructuring: true,
361
+ allowedNames: [],
362
+ },
363
+ ],
364
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": [
365
+ ERROR,
366
+ {
367
+ allowComparingNullableBooleansToTrue: true,
368
+ allowComparingNullableBooleansToFalse: true,
369
+ },
370
+ ],
371
+ "@typescript-eslint/no-unnecessary-condition": [
372
+ ERROR,
373
+ {
374
+ allowConstantLoopConditions: false,
375
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
376
+ },
377
+ ],
288
378
  "@typescript-eslint/no-unnecessary-qualifier": ERROR,
289
379
  "@typescript-eslint/no-unnecessary-template-expression": ERROR,
290
380
  "@typescript-eslint/no-unnecessary-type-arguments": ERROR,
291
- "@typescript-eslint/no-unnecessary-type-assertion": [ERROR, { typesToIgnore: [] }],
381
+ "@typescript-eslint/no-unnecessary-type-assertion": [
382
+ ERROR,
383
+ {
384
+ typesToIgnore: [],
385
+ },
386
+ ],
292
387
  "@typescript-eslint/no-unnecessary-type-constraint": ERROR,
293
388
  "@typescript-eslint/no-unnecessary-type-parameters": ERROR,
294
389
  "@typescript-eslint/no-unsafe-argument": ERROR,
@@ -303,14 +398,24 @@ export default [
303
398
  "@typescript-eslint/no-useless-empty-export": ERROR,
304
399
  "@typescript-eslint/no-wrapper-object-types": ERROR,
305
400
  "@typescript-eslint/non-nullable-type-assertion-style": OFF,
306
- "@typescript-eslint/parameter-properties": [ERROR, { prefer: "parameter-property" /* "parameter-property" | "class-property" */ }],
401
+ "@typescript-eslint/parameter-properties": [
402
+ ERROR,
403
+ {
404
+ prefer: "parameter-property" /* "parameter-property" | "class-property" */,
405
+ },
406
+ ],
307
407
  "@typescript-eslint/prefer-as-const": ERROR,
308
408
  "@typescript-eslint/prefer-enum-initializers": ERROR,
309
409
  "@typescript-eslint/prefer-find": ERROR,
310
410
  "@typescript-eslint/prefer-for-of": ERROR,
311
411
  "@typescript-eslint/prefer-function-type": ERROR,
312
412
  "@typescript-eslint/prefer-includes": ERROR,
313
- "@typescript-eslint/prefer-literal-enum-member": [ERROR, { allowBitwiseExpressions: false }],
413
+ "@typescript-eslint/prefer-literal-enum-member": [
414
+ ERROR,
415
+ {
416
+ allowBitwiseExpressions: false,
417
+ },
418
+ ],
314
419
  "@typescript-eslint/prefer-namespace-keyword": ERROR,
315
420
  "@typescript-eslint/prefer-nullish-coalescing": [
316
421
  ERROR,
@@ -340,12 +445,22 @@ export default [
340
445
  requireNullish: false,
341
446
  },
342
447
  ],
343
- "@typescript-eslint/prefer-readonly": [ERROR, { onlyInlineLambdas: false }],
344
- "@typescript-eslint/prefer-readonly-parameter-types": OFF, /* preference - WAY too restrictive */
448
+ "@typescript-eslint/prefer-readonly": [
449
+ ERROR,
450
+ {
451
+ onlyInlineLambdas: false,
452
+ },
453
+ ],
454
+ "@typescript-eslint/prefer-readonly-parameter-types": OFF /* preference - WAY too restrictive */,
345
455
  "@typescript-eslint/prefer-reduce-type-parameter": ERROR,
346
456
  "@typescript-eslint/prefer-regexp-exec": ERROR,
347
457
  "@typescript-eslint/prefer-return-this-type": ERROR,
348
- "@typescript-eslint/prefer-string-starts-ends-with": [ERROR, { allowSingleElementEquality: Never }],
458
+ "@typescript-eslint/prefer-string-starts-ends-with": [
459
+ ERROR,
460
+ {
461
+ allowSingleElementEquality: Never,
462
+ },
463
+ ],
349
464
  "@typescript-eslint/promise-function-async": [
350
465
  ERROR,
351
466
  {
@@ -357,7 +472,12 @@ export default [
357
472
  checkMethodDeclarations: true,
358
473
  },
359
474
  ],
360
- "@typescript-eslint/require-array-sort-compare": [ERROR, { ignoreStringArrays: true }],
475
+ "@typescript-eslint/require-array-sort-compare": [
476
+ ERROR,
477
+ {
478
+ ignoreStringArrays: true,
479
+ },
480
+ ],
361
481
  "@typescript-eslint/restrict-plus-operands": [
362
482
  ERROR,
363
483
  {
@@ -381,7 +501,7 @@ export default [
381
501
  allowRegExp: false,
382
502
  }, /* investigate: make stricter */
383
503
  ],
384
- "@typescript-eslint/return-await": [ERROR, "in-try-catch"], /* BUG: doc incorrectly states that this extends the DEPRECATED (since 8.46) no-return-await: https://typescript-eslint.io/rules/return-await */
504
+ "@typescript-eslint/return-await": [ERROR, "in-try-catch"] /* BUG: doc incorrectly states that this extends the DEPRECATED (since 8.46) no-return-await: https://typescript-eslint.io/rules/return-await */,
385
505
  "@typescript-eslint/strict-boolean-expressions": [
386
506
  ERROR,
387
507
  {
@@ -396,11 +516,34 @@ export default [
396
516
  allowNullableString: false,
397
517
  },
398
518
  ], /* requires tsconfig: strictNullChecks */
399
- "@typescript-eslint/switch-exhaustiveness-check": [ERROR, { allowDefaultCaseForExhaustiveSwitch: false, requireDefaultForNonUnion: true }],
400
- "@typescript-eslint/triple-slash-reference": [ERROR, { lib: Never /** always | never */, path: Never /** always | never */, types: Never /** always | never | prefer-import */ }],
401
- "@typescript-eslint/typedef": OFF, /* tsconfig: { noImplicitAny, strictPropertyInitialization } */
402
- "@typescript-eslint/unbound-method": [ERROR, { ignoreStatic: false }],
403
- "@typescript-eslint/unified-signatures": [ERROR, { ignoreDifferentlyNamedParameters: false }],
519
+ "@typescript-eslint/switch-exhaustiveness-check": [
520
+ ERROR,
521
+ {
522
+ allowDefaultCaseForExhaustiveSwitch: false,
523
+ requireDefaultForNonUnion: true,
524
+ },
525
+ ],
526
+ "@typescript-eslint/triple-slash-reference": [
527
+ ERROR,
528
+ {
529
+ lib: Never /** always | never */,
530
+ path: Never /** always | never */,
531
+ types: Never /** always | never | prefer-import */,
532
+ },
533
+ ],
534
+ "@typescript-eslint/typedef": OFF /* tsconfig: { noImplicitAny, strictPropertyInitialization } */,
535
+ "@typescript-eslint/unbound-method": [
536
+ ERROR,
537
+ {
538
+ ignoreStatic: false,
539
+ },
540
+ ],
541
+ "@typescript-eslint/unified-signatures": [
542
+ ERROR,
543
+ {
544
+ ignoreDifferentlyNamedParameters: false,
545
+ },
546
+ ],
404
547
  "@typescript-eslint/use-unknown-in-catch-callback-variable": ERROR,
405
548
  },
406
549
  ] as const;
@@ -1,17 +1,15 @@
1
- import { id, level, state } from "../_strings.js";
1
+ import { enable_x, level, state } from "../_strings.js";
2
2
 
3
3
  const
4
- { enable_x } = id,
5
4
  { ERROR, OFF } = level,
6
5
  { Always, All } = state;
7
6
 
8
7
  export default [
9
8
  enable_x,
10
9
  {
11
-
12
- // https://typescript-eslint.io/rules/?=extension-xdeprecated#rules ]
13
- "@typescript-eslint/class-methods-use-this": OFF, /* preference -- eslint:off */
14
- "@typescript-eslint/consistent-return": OFF, /* tsconfig: noImplicitReturns */
10
+ // https://typescript-eslint.io/rules/?=extension-xdeprecated#rules
11
+ "@typescript-eslint/class-methods-use-this": OFF /* preference -- eslint:off */,
12
+ "@typescript-eslint/consistent-return": OFF /* tsconfig: noImplicitReturns */,
15
13
  "@typescript-eslint/default-param-last": ERROR,
16
14
  "@typescript-eslint/dot-notation": [
17
15
  ERROR,
@@ -47,8 +45,8 @@ export default [
47
45
  "@typescript-eslint/no-loop-func": ERROR,
48
46
  "@typescript-eslint/no-magic-numbers": OFF,
49
47
  "@typescript-eslint/no-redeclare": OFF /* tsc (let, const, -var) */,
50
- "@typescript-eslint/no-restricted-imports": OFF, /* preference */
51
- "@typescript-eslint/no-shadow": OFF, /* investigate */
48
+ "@typescript-eslint/no-restricted-imports": OFF /* preference */,
49
+ "@typescript-eslint/no-shadow": OFF /* investigate */,
52
50
  "@typescript-eslint/no-unused-expressions": [
53
51
  ERROR,
54
52
  {
@@ -77,14 +75,41 @@ export default [
77
75
  variables: true,
78
76
  allowNamedExports: false,
79
77
  enums: true,
80
- typedefs: false, /* changed 14.2.2 (still questionable) */
78
+ typedefs: false /* changed 14.2.2 (still questionable) */,
81
79
  ignoreTypeReferences: true,
82
80
  },
83
81
  ],
84
82
  "@typescript-eslint/no-useless-constructor": ERROR,
85
- "@typescript-eslint/only-throw-error": [ERROR, { allowThrowingAny: false, allowThrowingUnknown: false }],
86
- "@typescript-eslint/prefer-destructuring": [ERROR, { VariableDeclarator: { array: true, object: true }, AssignmentExpression: { array: false, object: false } }, { enforceForRenamedProperties: false, enforceForDeclarationWithTypeAnnotation: false }],
87
- "@typescript-eslint/prefer-promise-reject-errors": [ERROR, { allowEmptyReject: false }],
83
+ "@typescript-eslint/only-throw-error": [
84
+ ERROR,
85
+ {
86
+ allowThrowingAny: false,
87
+ allowThrowingUnknown: false,
88
+ },
89
+ ],
90
+ "@typescript-eslint/prefer-destructuring": [
91
+ ERROR,
92
+ {
93
+ VariableDeclarator: {
94
+ array: true,
95
+ object: true,
96
+ },
97
+ AssignmentExpression: {
98
+ array: false,
99
+ object: false,
100
+ },
101
+ },
102
+ {
103
+ enforceForRenamedProperties: false,
104
+ enforceForDeclarationWithTypeAnnotation: false,
105
+ },
106
+ ],
107
+ "@typescript-eslint/prefer-promise-reject-errors": [
108
+ ERROR,
109
+ {
110
+ allowEmptyReject: false,
111
+ },
112
+ ],
88
113
  "@typescript-eslint/require-await": ERROR,
89
114
  },
90
115
  ] as const;
@@ -1,8 +1,8 @@
1
- import Js from "./_js.js";
2
- import DisableCompiler from "./ts/disable_compiler.js";
1
+ import Js from "./js.js";
2
+ import DisableCompiler from "./ts/disable.js";
3
3
  import DisableX from "./ts/disable_x.js";
4
4
  import EnableX from "./ts/enable_x.js";
5
- import Enable from "./ts/_enable.js";
5
+ import Enable from "./ts/enable.js";
6
6
 
7
7
  export default [
8
8
  ...Js,
@@ -1,7 +1,6 @@
1
- import { id, level, state } from "../_strings.js";
1
+ import { enable, level, state } from "../_strings.js";
2
2
 
3
3
  const
4
- { enable } = id,
5
4
  { ERROR, OFF } = level,
6
5
  { Never, Always, Double } = state;
7
6
 
@@ -11,11 +10,37 @@ export default [
11
10
  // https://ota-meshi.github.io/eslint-plugin-yml/rules/#yaml-rules
12
11
  "yml/block-mapping-colon-indicator-newline": [ERROR, Never],
13
12
  "yml/block-mapping-question-indicator-newline": [ERROR, Never],
14
- "yml/block-mapping": [ERROR, { singleline: Never, multiline: Always }],
15
- "yml/block-sequence-hyphen-indicator-newline": [ERROR, Never, { nestedHyphen: Always, blockMapping: Never }],
16
- "yml/block-sequence": [ERROR, { singleline: Always, multiline: Always }],
13
+ "yml/block-mapping": [
14
+ ERROR,
15
+ {
16
+ singleline: Never,
17
+ multiline: Always,
18
+ },
19
+ ],
20
+ "yml/block-sequence-hyphen-indicator-newline": [
21
+ ERROR,
22
+ Never,
23
+ {
24
+ nestedHyphen: Always,
25
+ blockMapping: Never,
26
+ },
27
+ ],
28
+ "yml/block-sequence": [
29
+ ERROR,
30
+ {
31
+ singleline: Always,
32
+ multiline: Always,
33
+ },
34
+ ],
17
35
  "yml/file-extension": OFF,
18
- "yml/indent": [ERROR, 2, { indentBlockSequences: true, indicatorValueIndent: 2 }],
36
+ "yml/indent": [
37
+ ERROR,
38
+ 2,
39
+ {
40
+ indentBlockSequences: true,
41
+ indicatorValueIndent: 2,
42
+ },
43
+ ],
19
44
  "yml/key-name-casing": OFF,
20
45
  "yml/no-empty-document": ERROR,
21
46
  "yml/no-empty-key": ERROR,
@@ -24,7 +49,13 @@ export default [
24
49
  "yml/no-tab-indent": ERROR,
25
50
  "yml/no-trailing-zeros": ERROR,
26
51
  "yml/plain-scalar": [ERROR, Always],
27
- "yml/quotes": [ERROR, { prefer: Double, avoidEscape: true }],
52
+ "yml/quotes": [
53
+ ERROR,
54
+ {
55
+ prefer: Double,
56
+ avoidEscape: true,
57
+ },
58
+ ],
28
59
  "yml/require-string-key": ERROR,
29
60
  "yml/sort-keys": OFF,
30
61
  "yml/sort-sequence-values": OFF,
@@ -1,7 +1,6 @@
1
- import { id, level, state } from "../_strings.js";
1
+ import { enable_x, level, state } from "../_strings.js";
2
2
 
3
3
  const
4
- { enable_x } = id,
5
4
  { ERROR } = level,
6
5
  { Never, Always, Strict } = state;
7
6
 
@@ -9,13 +8,61 @@ export default [
9
8
  enable_x,
10
9
  {
11
10
  // https://ota-meshi.github.io/eslint-plugin-yml/rules/#extension-rules
12
- "yml/flow-mapping-curly-newline": [ERROR, { consistent: false, multiline: true, minProperties: 2 }],
13
- "yml/flow-mapping-curly-spacing": [ERROR, Always, { arraysInObjects: true, objectsInObjects: true }],
14
- "yml/flow-sequence-bracket-newline": [ERROR, { multiline: true, minItems: null }],
15
- "yml/flow-sequence-bracket-spacing": [ERROR, Never, { singleValue: false, objectsInArrays: false, arraysInArrays: false }],
16
- "yml/key-spacing": [ERROR, { beforeColon: false, afterColon: true, mode: Strict }],
17
- "yml/no-irregular-whitespace": [ERROR, { skipQuotedScalars: true, skipComments: false }],
18
- "yml/no-multiple-empty-lines": [ERROR, { max: 1, maxEOF: 1, maxBOF: 0 }],
11
+ "yml/flow-mapping-curly-newline": [
12
+ ERROR,
13
+ {
14
+ consistent: false,
15
+ multiline: true,
16
+ minProperties: 2,
17
+ },
18
+ ],
19
+ "yml/flow-mapping-curly-spacing": [
20
+ ERROR,
21
+ Always,
22
+ {
23
+ arraysInObjects: true,
24
+ objectsInObjects: true,
25
+ },
26
+ ],
27
+ "yml/flow-sequence-bracket-newline": [
28
+ ERROR,
29
+ {
30
+ multiline: true,
31
+ minItems: null,
32
+ },
33
+ ],
34
+ "yml/flow-sequence-bracket-spacing": [
35
+ ERROR,
36
+ Never,
37
+ {
38
+ singleValue: false,
39
+ objectsInArrays: false,
40
+ arraysInArrays: false,
41
+ },
42
+ ],
43
+ "yml/key-spacing": [
44
+ ERROR,
45
+ {
46
+ beforeColon: false,
47
+ afterColon: true,
48
+ mode: Strict,
49
+ },
50
+ ],
51
+ "yml/no-irregular-whitespace": [
52
+ ERROR,
53
+ {
54
+ skipQuotedScalars: true,
55
+ skipComments: false,
56
+ },
57
+ ],
58
+ "yml/no-multiple-empty-lines": [
59
+ ERROR,
60
+ {
61
+ max: 1,
62
+ maxEOF: 1,
63
+ maxBOF: 0,
64
+ },
65
+ ],
19
66
  "yml/spaced-comment": [ERROR, Always],
20
67
  },
21
68
  ] as const;
@@ -1,4 +1,4 @@
1
1
  import EnableX from "./yml/enable_x.js";
2
- import Enable from "./yml/_enable.js";
2
+ import Enable from "./yml/enable.js";
3
3
 
4
4
  export default [EnableX, Enable] as const;
package/src/rules.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import type { Core } from "@eslinted/core";
2
- import js from "./rules/_js.js";
3
- import ts from "./rules/_ts.js";
4
- import svelte from "./rules/_svelte.js";
5
- import mocha from "./rules/_mocha.js";
6
- import html from "./rules/_html.js";
7
- import json from "./rules/_json.js";
8
- import jsonc from "./rules/_jsonc.js";
9
- import yml from "./rules/_yml.js";
10
- import md from "./rules/_md.js";
2
+ import js from "./rules/js.js";
3
+ import ts from "./rules/ts.js";
4
+ import svelte from "./rules/svelte.js";
5
+ import mocha from "./rules/mocha.js";
6
+ import html from "./rules/html.js";
7
+ import json from "./rules/json.js";
8
+ import jsonc from "./rules/jsonc.js";
9
+ import yml from "./rules/yml.js";
10
+ import md from "./rules/md.js";
11
11
 
12
12
  export default {
13
13
  js,
@@ -1 +0,0 @@
1
- {"version":3,"file":"_html.d.ts","sourceRoot":"","sources":["../../src/rules/_html.ts"],"names":[],"mappings":";;;;;;AAGA,wBAA8C"}
@@ -1,4 +0,0 @@
1
- import Recommended from "./html/_recommended.js";
2
- import Enable from "./html/_enable.js";
3
- export default [Recommended, Enable];
4
- //# sourceMappingURL=_html.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_html.js","sourceRoot":"","sources":["../../src/rules/_html.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,eAAe,CAAC,WAAW,EAAE,MAAM,CAAU,CAAC"}
package/dist/rules/_js.js DELETED
@@ -1,4 +0,0 @@
1
- import EnableStylistic from "./js/stylistic.js";
2
- import Enable from "./js/_enable.js";
3
- export default [EnableStylistic, Enable];
4
- //# sourceMappingURL=_js.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_js.js","sourceRoot":"","sources":["../../src/rules/_js.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAe,CAAC,eAAe,EAAE,MAAM,CAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_json.d.ts","sourceRoot":"","sources":["../../src/rules/_json.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAA0C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_json.js","sourceRoot":"","sources":["../../src/rules/_json.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_jsonc.d.ts","sourceRoot":"","sources":["../../src/rules/_jsonc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAAgD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_jsonc.js","sourceRoot":"","sources":["../../src/rules/_jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAE/C,eAAe,CAAC,GAAG,IAAI,EAAE,YAAY,CAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_md.d.ts","sourceRoot":"","sources":["../../src/rules/_md.ts"],"names":[],"mappings":";;;;;AAEA,wBAAiC"}
package/dist/rules/_md.js DELETED
@@ -1,3 +0,0 @@
1
- import Enable from "./md/_enable.js";
2
- export default [Enable];
3
- //# sourceMappingURL=_md.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_md.js","sourceRoot":"","sources":["../../src/rules/_md.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAe,CAAC,MAAM,CAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_mocha.d.ts","sourceRoot":"","sources":["../../src/rules/_mocha.ts"],"names":[],"mappings":";;;;;;AAGA,wBAA8C"}
@@ -1,4 +0,0 @@
1
- import Recommended from "./mocha/_recommended.js";
2
- import Enable from "./html/_enable.js";
3
- export default [Recommended, Enable];
4
- //# sourceMappingURL=_mocha.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_mocha.js","sourceRoot":"","sources":["../../src/rules/_mocha.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAClD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,eAAe,CAAC,WAAW,EAAE,MAAM,CAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_svelte.js","sourceRoot":"","sources":["../../src/rules/_svelte.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,UAAU,CAAC;AACjC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,eAAe;IACb,GAAG,SAAS;IACZ,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,MAAM;CACE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_ts.js","sourceRoot":"","sources":["../../src/rules/_ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAe;IACb,GAAG,EAAE;IACL,eAAe;IACf,QAAQ;IACR,OAAO;IACP,MAAM;CACE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_yml.d.ts","sourceRoot":"","sources":["../../src/rules/_yml.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAA0C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_yml.js","sourceRoot":"","sources":["../../src/rules/_yml.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_enable.d.ts","sourceRoot":"","sources":["../../../src/rules/html/_enable.ts"],"names":[],"mappings":";;;;;;AAMA,wBAMW"}