@eslinted/defaults 17.10.0 → 18.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/index.d.ts +246 -265
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/rules/css/index.d.ts +9 -9
  4. package/dist/rules/css/index.js +9 -9
  5. package/dist/rules/css/index.js.map +1 -1
  6. package/dist/rules/html/index.d.ts +42 -42
  7. package/dist/rules/html/index.d.ts.map +1 -1
  8. package/dist/rules/html/index.js +42 -42
  9. package/dist/rules/html/index.js.map +1 -1
  10. package/dist/rules/index.d.ts +246 -265
  11. package/dist/rules/index.d.ts.map +1 -1
  12. package/dist/rules/js.d.ts +112 -119
  13. package/dist/rules/js.d.ts.map +1 -1
  14. package/dist/rules/js.eslint.d.ts +45 -52
  15. package/dist/rules/js.eslint.d.ts.map +1 -1
  16. package/dist/rules/js.eslint.js +45 -52
  17. package/dist/rules/js.eslint.js.map +1 -1
  18. package/dist/rules/js.stylistic.d.ts +67 -67
  19. package/dist/rules/js.stylistic.d.ts.map +1 -1
  20. package/dist/rules/js.stylistic.js +67 -67
  21. package/dist/rules/js.stylistic.js.map +1 -1
  22. package/dist/rules/json/index.d.ts +8 -11
  23. package/dist/rules/json/index.d.ts.map +1 -1
  24. package/dist/rules/json/plugin/extend.d.ts +8 -11
  25. package/dist/rules/json/plugin/extend.d.ts.map +1 -1
  26. package/dist/rules/json/plugin/extend.js +8 -11
  27. package/dist/rules/json/plugin/extend.js.map +1 -1
  28. package/dist/rules/jsoncc/index.d.ts +1 -1
  29. package/dist/rules/jsoncc/index.js +1 -1
  30. package/dist/rules/svelte/extend.d.ts +1 -1
  31. package/dist/rules/svelte/extend.js +1 -1
  32. package/dist/rules/svelte/extend.js.map +1 -1
  33. package/dist/rules/svelte/index.d.ts +24 -24
  34. package/dist/rules/svelte/svelte.d.ts +23 -23
  35. package/dist/rules/svelte/svelte.js +23 -23
  36. package/dist/rules/svelte/svelte.js.map +1 -1
  37. package/dist/rules/ts/extend.d.ts +4 -13
  38. package/dist/rules/ts/extend.d.ts.map +1 -1
  39. package/dist/rules/ts/extend.js +4 -13
  40. package/dist/rules/ts/extend.js.map +1 -1
  41. package/dist/rules/ts/index.d.ts +31 -41
  42. package/dist/rules/ts/index.d.ts.map +1 -1
  43. package/dist/rules/ts/ts.d.ts +27 -28
  44. package/dist/rules/ts/ts.d.ts.map +1 -1
  45. package/dist/rules/ts/ts.js +27 -28
  46. package/dist/rules/ts/ts.js.map +1 -1
  47. package/dist/rules/yml/extend.d.ts +7 -7
  48. package/dist/rules/yml/extend.js +7 -7
  49. package/dist/rules/yml/extend.js.map +1 -1
  50. package/dist/rules/yml/index.d.ts +19 -18
  51. package/dist/rules/yml/index.d.ts.map +1 -1
  52. package/dist/rules/yml/yml.d.ts +12 -11
  53. package/dist/rules/yml/yml.d.ts.map +1 -1
  54. package/dist/rules/yml/yml.js +12 -11
  55. package/dist/rules/yml/yml.js.map +1 -1
  56. package/package.json +1 -1
  57. package/src/rules/css/index.ts +11 -11
  58. package/src/rules/html/index.ts +50 -58
  59. package/src/rules/js.eslint.ts +143 -162
  60. package/src/rules/js.stylistic.ts +87 -88
  61. package/src/rules/json/json.ts +3 -3
  62. package/src/rules/json/plugin/extend.ts +11 -14
  63. package/src/rules/json/plugin/index.ts +3 -3
  64. package/src/rules/jsonc/index.ts +1 -1
  65. package/src/rules/jsoncc/index.ts +2 -2
  66. package/src/rules/svelte/disable.ts +3 -3
  67. package/src/rules/svelte/extend.ts +3 -3
  68. package/src/rules/svelte/svelte.ts +26 -26
  69. package/src/rules/ts/disable.ts +4 -4
  70. package/src/rules/ts/extend.ts +7 -15
  71. package/src/rules/ts/ts.ts +44 -44
  72. package/src/rules/yml/extend.ts +7 -7
  73. package/src/rules/yml/yml.ts +15 -15
  74. package/tsconfig-base.json +2 -4
@@ -3,56 +3,56 @@ import { State } from "./state";
3
3
  // DOC: https://eslint.style/rules
4
4
  export default {
5
5
  rules: {
6
- "stylistic/array-bracket-newline": State.ON,
7
- "stylistic/array-bracket-spacing": State.ON,
6
+ "stylistic/array-bracket-newline": State.WARN,
7
+ "stylistic/array-bracket-spacing": State.WARN,
8
8
  "stylistic/array-element-newline": [
9
- State.ON,
9
+ State.WARN,
10
10
  {
11
11
  consistent: true,
12
12
  multiline: true,
13
13
  minItems: 3,
14
- } /* never | consistent | @default always | { ... } */,
14
+ },
15
15
  ],
16
16
  "stylistic/arrow-parens": [
17
- State.ON,
18
- "as-needed" /* as-needed | @default always */,
17
+ State.WARN,
18
+ "as-needed",
19
19
  ],
20
- "stylistic/arrow-spacing": State.ON,
21
- "stylistic/block-spacing": State.ON,
20
+ "stylistic/arrow-spacing": State.WARN,
21
+ "stylistic/block-spacing": State.WARN,
22
22
  "stylistic/brace-style": [
23
- State.ON,
24
- "stroustrup" /* stroustrup | allman | @default 1tbs */,
23
+ State.WARN,
24
+ "stroustrup",
25
25
  {
26
- allowSingleLine: true /* @default false */,
26
+ allowSingleLine: true,
27
27
  },
28
28
  ],
29
29
  "stylistic/comma-dangle": [
30
- State.ON,
30
+ State.WARN,
31
31
  "always-multiline",
32
32
  ],
33
- "stylistic/comma-spacing": State.ON,
34
- "stylistic/comma-style": State.ON,
35
- "stylistic/computed-property-spacing": State.ON,
36
- "stylistic/curly-newline": State.ON,
33
+ "stylistic/comma-spacing": State.WARN,
34
+ "stylistic/comma-style": State.WARN,
35
+ "stylistic/computed-property-spacing": State.WARN,
36
+ "stylistic/curly-newline": State.WARN,
37
37
  "stylistic/dot-location": [
38
- State.ON,
39
- "property" /* property | @default object */,
38
+ State.WARN,
39
+ "property",
40
40
  ],
41
- "stylistic/eol-last": State.ON,
41
+ "stylistic/eol-last": State.WARN,
42
42
  "stylistic/function-call-argument-newline": [
43
- State.ON,
44
- "consistent" /* consistent | never | @default always */,
43
+ State.WARN,
44
+ "consistent",
45
45
  ],
46
- "stylistic/function-call-spacing": State.ON,
46
+ "stylistic/function-call-spacing": State.WARN,
47
47
  "stylistic/function-paren-newline": [
48
- State.ON,
48
+ State.WARN,
49
49
  "multiline-arguments",
50
50
  ] /* BUG: https://github.com/eslint-stylistic/eslint-stylistic/issues/290 */,
51
- "stylistic/generator-star-spacing": State.ON,
52
- "stylistic/implicit-arrow-linebreak": State.ON,
51
+ "stylistic/generator-star-spacing": State.WARN,
52
+ "stylistic/implicit-arrow-linebreak": State.WARN,
53
53
  "stylistic/indent": [
54
- State.ON,
55
- 2 /* tab | number | @default 4 */,
54
+ State.WARN,
55
+ 2,
56
56
  {
57
57
  assignmentOperator: 0,
58
58
  VariableDeclarator: {
@@ -65,16 +65,16 @@ export default {
65
65
  },
66
66
  ],
67
67
  "stylistic/indent-binary-ops": [
68
- State.ON,
68
+ State.WARN,
69
69
  2 /* MUST be same as `stylistic/indent`[1] */,
70
70
  ],
71
- "stylistic/key-spacing": State.ON,
72
- "stylistic/keyword-spacing": State.ON,
71
+ "stylistic/key-spacing": State.WARN,
72
+ "stylistic/keyword-spacing": State.WARN,
73
73
  // "stylistic/line-comment-position": State.OFF,
74
- "stylistic/linebreak-style": State.ON,
74
+ "stylistic/linebreak-style": State.WARN,
75
75
  // "stylistic/lines-around-comment": State.OFF,
76
76
  "stylistic/lines-between-class-members": [
77
- State.ON,
77
+ State.WARN,
78
78
  {
79
79
  enforce: [
80
80
  {
@@ -96,10 +96,9 @@ export default {
96
96
  },
97
97
  ],
98
98
  "stylistic/max-len": [
99
- State.ON,
99
+ State.WARN,
100
100
  {
101
- code: 300 /* @default 80 */,
102
- // tabWidth: 4,
101
+ code: 300,
103
102
  ignoreComments: true,
104
103
  ignoreTrailingComments: true,
105
104
  ignoreUrls: true,
@@ -108,23 +107,23 @@ export default {
108
107
  ignoreRegExpLiterals: true,
109
108
  },
110
109
  ],
111
- "stylistic/max-statements-per-line": State.ON,
112
- "stylistic/member-delimiter-style": State.ON,
110
+ "stylistic/max-statements-per-line": State.WARN,
111
+ "stylistic/member-delimiter-style": State.WARN,
113
112
  // "stylistic/multiline-comment-style": State.OFF,
114
113
  "stylistic/multiline-ternary": [
115
- State.ON,
116
- "always-multiline" /* never | always-multiline | @default always */,
114
+ State.WARN,
115
+ "always-multiline",
117
116
  ],
118
117
  // "stylistic/new-parens": State.OFF,
119
- "stylistic/newline-per-chained-call": State.ON,
118
+ "stylistic/newline-per-chained-call": State.WARN,
120
119
  // "stylistic/no-confusing-arrow": State.OFF,
121
- "stylistic/no-extra-parens": State.ON,
122
- "stylistic/no-extra-semi": State.ON,
123
- "stylistic/no-floating-decimal": State.ON,
120
+ "stylistic/no-extra-parens": State.WARN,
121
+ "stylistic/no-extra-semi": State.WARN,
122
+ "stylistic/no-floating-decimal": State.WARN,
124
123
  // "stylistic/no-mixed-operators": State.OFF,
125
- "stylistic/no-mixed-spaces-and-tabs": State.ON,
124
+ "stylistic/no-mixed-spaces-and-tabs": State.WARN,
126
125
  "stylistic/no-multi-spaces": [
127
- State.ON,
126
+ State.WARN,
128
127
  {
129
128
  exceptions: {
130
129
  Property: false,
@@ -133,22 +132,22 @@ export default {
133
132
  },
134
133
  ],
135
134
  "stylistic/no-multiple-empty-lines": [
136
- State.ON,
135
+ State.WARN,
137
136
  {
138
- max: 1 /* @default 2 */,
137
+ max: 1,
139
138
  maxBOF: 0,
140
- maxEOF: 0 /* combine with `eol-last` to ensure file still ends with a single line-break (eol character) */,
139
+ maxEOF: 0 /* INFO: combine with `eol-last` to ensure file still ends with a single line-break (eol character) */,
141
140
  },
142
141
  ],
143
- "stylistic/no-tabs": State.ON,
144
- "stylistic/no-trailing-spaces": State.ON,
145
- "stylistic/no-whitespace-before-property": State.ON,
142
+ "stylistic/no-tabs": State.WARN,
143
+ "stylistic/no-trailing-spaces": State.WARN,
144
+ "stylistic/no-whitespace-before-property": State.WARN,
146
145
  "stylistic/nonblock-statement-body-position": [
147
- State.ON,
148
- "below" /* any | below | @default beside */,
146
+ State.WARN,
147
+ "below",
149
148
  ],
150
149
  "stylistic/object-curly-newline": [
151
- State.ON,
150
+ State.WARN,
152
151
  {
153
152
  consistent: true,
154
153
  multiline: true,
@@ -156,60 +155,60 @@ export default {
156
155
  },
157
156
  ],
158
157
  "stylistic/object-curly-spacing": [
159
- State.ON,
160
- "always" /* always | @default never */,
158
+ State.WARN,
159
+ "always",
161
160
  {
162
161
  emptyObjects: "never",
163
162
  },
164
163
  ],
165
- "stylistic/object-property-newline": State.ON,
164
+ "stylistic/object-property-newline": State.WARN,
166
165
  "stylistic/one-var-declaration-per-line": [
167
- State.ON,
168
- "always" /* always | @default initializations */,
166
+ State.WARN,
167
+ "always",
169
168
  ],
170
169
  "stylistic/operator-linebreak": [
171
- State.ON,
172
- "before" /* ignore | none | before | @default after */,
170
+ State.WARN,
171
+ "before",
173
172
  ],
174
173
  "stylistic/padded-blocks": [
175
- State.ON,
176
- "never" /* never | start | end | @default always */,
174
+ State.WARN,
175
+ "never",
177
176
  {
178
177
  allowSingleLineBlocks: true,
179
178
  },
180
179
  ],
181
- // "stylistic/padding-line-between-statements": State.OFF /* preference | BUG: when in editor, always removes too many lines and ends up crushing two lines into one statement, which then cannot be autofixed */,
180
+ // "stylistic/padding-line-between-statements": State.OFF /* BUG: when in editor, always removes too many lines and ends up crushing two lines into one statement, which then cannot be autofixed */,
182
181
  "stylistic/quote-props": [
183
- State.ON,
182
+ State.WARN,
184
183
  "as-needed",
185
184
  {
186
185
  keywords: true,
187
186
  },
188
187
  ],
189
188
  "stylistic/quotes": [
190
- State.ON,
191
- "double" /* @default double */,
189
+ State.WARN,
190
+ "double",
192
191
  {
193
192
  avoidEscape: true,
194
- allowTemplateLiterals: "always" /* always | avoidEscape | @default never */,
193
+ allowTemplateLiterals: "always",
195
194
  },
196
195
  ],
197
- "stylistic/rest-spread-spacing": State.ON,
198
- "stylistic/semi": State.ON,
199
- "stylistic/semi-spacing": State.ON,
200
- "stylistic/semi-style": State.ON,
201
- "stylistic/space-before-blocks": State.ON,
196
+ "stylistic/rest-spread-spacing": State.WARN,
197
+ "stylistic/semi": State.WARN,
198
+ "stylistic/semi-spacing": State.WARN,
199
+ "stylistic/semi-style": State.WARN,
200
+ "stylistic/space-before-blocks": State.WARN,
202
201
  "stylistic/space-before-function-paren": [
203
- State.ON,
202
+ State.WARN,
204
203
  {
205
204
  named: "never",
206
205
  },
207
206
  ],
208
- "stylistic/space-in-parens": State.ON,
209
- "stylistic/space-infix-ops": State.ON,
210
- "stylistic/space-unary-ops": State.ON,
207
+ "stylistic/space-in-parens": State.WARN,
208
+ "stylistic/space-infix-ops": State.WARN,
209
+ "stylistic/space-unary-ops": State.WARN,
211
210
  "stylistic/spaced-comment": [
212
- State.ON,
211
+ State.WARN,
213
212
  "always",
214
213
  {
215
214
  line: {
@@ -239,11 +238,11 @@ export default {
239
238
  },
240
239
  },
241
240
  ],
242
- "stylistic/switch-colon-spacing": State.ON,
243
- "stylistic/template-curly-spacing": State.ON,
244
- "stylistic/template-tag-spacing": State.ON,
241
+ "stylistic/switch-colon-spacing": State.WARN,
242
+ "stylistic/template-curly-spacing": State.WARN,
243
+ "stylistic/template-tag-spacing": State.WARN,
245
244
  "stylistic/type-annotation-spacing": [
246
- State.ON,
245
+ State.WARN,
247
246
  {
248
247
  before: true,
249
248
  after: true,
@@ -253,18 +252,18 @@ export default {
253
252
  after: true,
254
253
  },
255
254
  },
256
- } /* non-overriden rule affects all type annotations (arrows, "as" keyword, "satisfies" keyword) except colons */,
255
+ } /* BUG: non-overriden rule affects all type annotations (arrows, "as" keyword, "satisfies" keyword) except colons */,
257
256
  ],
258
- "stylistic/type-generic-spacing": State.ON,
259
- "stylistic/type-named-tuple-spacing": State.ON,
257
+ "stylistic/type-generic-spacing": State.WARN,
258
+ "stylistic/type-named-tuple-spacing": State.WARN,
260
259
  "stylistic/wrap-iife": [
261
- State.ON,
260
+ State.WARN,
262
261
  "inside",
263
262
  {
264
263
  functionPrototypeMethods: true,
265
264
  },
266
265
  ],
267
- "stylistic/wrap-regex": State.ON,
268
- "stylistic/yield-star-spacing": State.ON,
266
+ "stylistic/wrap-regex": State.WARN,
267
+ "stylistic/yield-star-spacing": State.WARN,
269
268
  } as const,
270
269
  };
@@ -3,11 +3,11 @@ import { State } from "../state";
3
3
  // DOC: https://github.com/eslint/json?tab=readme-ov-file#rules
4
4
  export default {
5
5
  rules: {
6
- "json/no-duplicate-keys": State.ON /* replaces jsonc/no-dupe-keys */,
7
- // "json/no-empty-keys": State.OFF /* preference */,
6
+ "json/no-duplicate-keys": State.ON /* jsonc/no-dupe-keys */,
7
+ // "json/no-empty-keys": State.OFF,
8
8
  "json/no-unsafe-values": State.ON,
9
9
  "json/no-unnormalized-keys": State.ON,
10
- // "json/sort-keys": State.OFF /* replaces jsonc/sort-keys BUT preference */,
10
+ // "json/sort-keys": State.OFF /* jsonc/sort-keys */,
11
11
  "json/top-level-interop": State.ON,
12
12
  } as const,
13
13
  };
@@ -3,19 +3,19 @@ import { State } from "../../state";
3
3
  // DOC: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
4
4
  export default {
5
5
  rules: {
6
- // "jsonc/array-bracket-newline": State.OFF /* @OVERRIDE: BIGGER BUG: i mean this basically just doesn't work, even with multiple lines it will still fail| BUG: the spec says: `requires line breaks if the number of elements is at least the given integer. If this is 0, this condition will act the same as the option "always". If this is null (the default), this condition is disabled`. However, when null, the jsonc plugin actually errors when there are linebreaks with a single item | (was: MUST match stylistic/array-bracket-newline) */,
7
- "jsonc/array-bracket-spacing": State.ON /* MUST match stylistic/array-bracket-spacing */,
6
+ // "jsonc/array-bracket-newline": State.OFF /* BUG: DO NOT CONFIGURE */,
7
+ "jsonc/array-bracket-spacing": State.WARN /* MUST match stylistic/array-bracket-spacing */,
8
8
  "jsonc/array-element-newline": [
9
- State.ON,
9
+ State.WARN,
10
10
  "consistent",
11
11
  ] /* WOULD match stylistic/array-element-newline, but jsonc plugin has slightly different options */,
12
- "jsonc/comma-dangle": State.ON /* trailing commas are NOT allowed in JSState.ON */,
13
- "jsonc/comma-style": State.ON,
12
+ "jsonc/comma-dangle": State.ON,
13
+ "jsonc/comma-style": State.WARN,
14
14
  "jsonc/indent": [
15
- State.ON,
15
+ State.WARN,
16
16
  2,
17
17
  ],
18
- "jsonc/key-spacing": State.ON /* MUST match stylistic/key-spacing */,
18
+ "jsonc/key-spacing": State.WARN /* MUST match stylistic/key-spacing */,
19
19
  // "jsonc/no-dupe-keys": State.OFF /* ESLint: json/no-duplicate-keys */,
20
20
  "jsonc/no-floating-decimal": State.ON,
21
21
  "jsonc/no-irregular-whitespace": [
@@ -23,9 +23,6 @@ export default {
23
23
  {
24
24
  skipStrings: true,
25
25
  skipComments: true,
26
- skipRegExps: true,
27
- skipTemplates: true,
28
- skipJSXText: true,
29
26
  },
30
27
  ],
31
28
  "jsonc/no-multi-str": State.ON,
@@ -34,18 +31,18 @@ export default {
34
31
  "jsonc/no-sparse-arrays": State.ON,
35
32
  "jsonc/no-useless-escape": State.ON,
36
33
  "jsonc/object-curly-newline": [
37
- State.ON,
34
+ State.WARN,
38
35
  {
39
36
  consistent: true,
40
37
  multiline: true,
41
- minProperties: 2 /* instead of 3 in stylistic */,
38
+ minProperties: 2 /* @OVERRIDE: instead of 3 in stylistic */,
42
39
  },
43
40
  ] /* @OVERRIDE stylistic/object-curly-newline */,
44
41
  "jsonc/object-curly-spacing": [
45
- State.ON,
42
+ State.WARN,
46
43
  "always",
47
44
  ] /* MUST match stylistic/object-curly-spacing (except unsupported 3rd options) */,
48
- "jsonc/object-property-newline": State.ON /* MUST match stylistic/object-property-newline */,
45
+ "jsonc/object-property-newline": State.WARN /* MUST match stylistic/object-property-newline */,
49
46
  "jsonc/quote-props": State.ON,
50
47
  "jsonc/quotes": State.ON,
51
48
  "jsonc/space-unary-ops": State.ON,
@@ -8,7 +8,7 @@ export default {
8
8
  "jsonc/no-bigint-literals": State.ON,
9
9
  "jsonc/no-binary-expression": State.ON,
10
10
  "jsonc/no-binary-numeric-literals": State.ON,
11
- "jsonc/no-comments": State.ON /* comments are NOT allowed in JSState.ON */,
11
+ "jsonc/no-comments": State.ON,
12
12
  "jsonc/no-escape-sequence-in-identifier": State.ON,
13
13
  "jsonc/no-hexadecimal-numeric-literals": State.ON,
14
14
  "jsonc/no-infinity": State.ON,
@@ -22,8 +22,8 @@ export default {
22
22
  "jsonc/no-template-literals": State.ON,
23
23
  "jsonc/no-undefined-value": State.ON,
24
24
  "jsonc/no-unicode-codepoint-escapes": State.ON,
25
- // "jsonc/sort-array-values": State.OFF /* preference: this makes no sense, arrays can be ordered */,
26
- // "jsonc/sort-keys": State.OFF /* ESLint: json/sort-keys BUT preference: only sort keys manually when I'd like */,
25
+ // "jsonc/sort-array-values": State.OFF,
26
+ // "jsonc/sort-keys": State.OFF /* ESLint: json/sort-keys */,
27
27
  "jsonc/valid-json-number": State.ON,
28
28
  // "jsonc/vue-custom-block/no-parsing-error": State.OFF,
29
29
  } as const,
@@ -3,7 +3,7 @@ import { State } from "../state";
3
3
  export default [
4
4
  {
5
5
  rules: {
6
- "jsonc/no-comments": State.OFF /* comments ARE allowed in JSONC */,
6
+ "jsonc/no-comments": State.OFF,
7
7
  } as const,
8
8
  },
9
9
  ];
@@ -4,9 +4,9 @@ export default [
4
4
  {
5
5
  rules: {
6
6
  "jsonc/comma-dangle": [
7
- State.ON,
7
+ State.WARN,
8
8
  "always-multiline",
9
- ] /* trailing commas ARE allowed in JSONC */,
9
+ ],
10
10
  } as const,
11
11
  },
12
12
  ];
@@ -7,10 +7,10 @@ export default {
7
7
  "no-inner-declarations": State.OFF /* The AST generated by svelte-eslint-parser will false positive because the root node of the script is not `Program`. INFO: also extended by svelte */,
8
8
  "no-self-assign": State.OFF /* Self assign is one of way to update reactive value in Svelte. */,
9
9
  "no-unused-vars": State.OFF /* breaks use of svelte global */,
10
- "ts/no-unused-vars": State.OFF /* TS: breaks use of svelte global */,
10
+ "ts/no-unused-vars": State.OFF /* breaks use of svelte global */,
11
11
  "prefer-const": State.OFF /* svelte/prefer-const */,
12
12
  // My own
13
- "stylistic/indent": State.OFF /* conflicts with `svelte/indent` */,
14
- "ts/no-confusing-void-expression": State.OFF /* errors on render() */,
13
+ "stylistic/indent": State.OFF /* @CONFLICT: with `svelte/indent` */,
14
+ "ts/no-confusing-void-expression": State.OFF /* @CONFLICT: errors on render() */,
15
15
  } as const,
16
16
  };
@@ -3,12 +3,12 @@ import { State } from "../state";
3
3
  // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
4
4
  export default {
5
5
  rules: {
6
- "no-inner-declarations": State.OFF /* INFO: also disabled by svelte */,
6
+ /* @OVERRIDE */ "no-inner-declarations": State.OFF /* INFO: also disabled by svelte */,
7
7
  "svelte/no-inner-declarations": [
8
8
  State.ON,
9
9
  "both",
10
10
  ] /* same options: no-inner-declarations */,
11
- "stylistic/no-trailing-spaces": State.OFF /* replaces `no-trailing-spaces` */,
12
- "svelte/no-trailing-spaces": State.ON /* same options: stylistic/no-trailing-spaces */,
11
+ /* @OVERRIDE */ "stylistic/no-trailing-spaces": State.OFF /* replaces `no-trailing-spaces` */,
12
+ "svelte/no-trailing-spaces": State.WARN /* same options: stylistic/no-trailing-spaces */,
13
13
  } as const,
14
14
  };
@@ -35,12 +35,12 @@ export default {
35
35
  // #region BEST PRACTICES
36
36
  // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
37
37
  "svelte/block-lang": [
38
- State.ON,
38
+ State.WARN,
39
39
  {
40
40
  script: ["ts"],
41
41
  style: ["css"],
42
42
  },
43
- ], /* INVESTIGATE: */
43
+ ],
44
44
  "svelte/button-has-type": State.ON,
45
45
  "svelte/no-add-event-listener": State.ON,
46
46
  "svelte/no-at-debug-tags": State.ON,
@@ -53,22 +53,22 @@ export default {
53
53
  "svelte/no-unnecessary-state-wrap": State.ON,
54
54
  // "svelte/no-unused-class-name": State.OFF /* incompatible: breaks if css class is located in another file; BUG: ESLint error if array empty */,
55
55
  "svelte/no-unused-props": [
56
- State.ON,
56
+ State.WARN,
57
57
  {
58
58
  checkImportedTypes: true,
59
59
  },
60
60
  ],
61
- "svelte/no-unused-svelte-ignore": State.ON,
62
- "svelte/no-useless-children-snippet": State.ON,
63
- "svelte/no-useless-mustaches": State.ON,
61
+ "svelte/no-unused-svelte-ignore": State.WARN,
62
+ "svelte/no-useless-children-snippet": State.WARN,
63
+ "svelte/no-useless-mustaches": State.WARN,
64
64
  "svelte/prefer-const": [
65
- State.ON,
65
+ State.WARN,
66
66
  {
67
67
  destructuring: "all",
68
68
  },
69
69
  ] /* same options: prefer-const */,
70
- "svelte/prefer-destructured-store-props": State.ON,
71
- "svelte/prefer-writable-derived": State.ON,
70
+ "svelte/prefer-destructured-store-props": State.WARN,
71
+ "svelte/prefer-writable-derived": State.WARN,
72
72
  "svelte/require-each-key": State.ON,
73
73
  "svelte/require-event-dispatcher-types": State.ON,
74
74
  "svelte/require-optimized-style-attribute": State.ON,
@@ -79,45 +79,45 @@ export default {
79
79
  // #region STYLE
80
80
  // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
81
81
  "svelte/consistent-selector-style": [
82
- State.ON,
82
+ State.WARN,
83
83
  {
84
- checkGlobal: true /* @default false */,
84
+ checkGlobal: true,
85
85
  },
86
86
  ],
87
87
  "svelte/derived-has-same-inputs-outputs": State.ON,
88
88
  "svelte/first-attribute-linebreak": [
89
- State.ON,
89
+ State.WARN,
90
90
  {
91
91
  singleline: "below",
92
92
  },
93
93
  ],
94
- "svelte/html-closing-bracket-new-line": State.ON,
94
+ "svelte/html-closing-bracket-new-line": State.WARN,
95
95
  "svelte/html-closing-bracket-spacing": [
96
- State.ON,
96
+ State.WARN,
97
97
  {
98
98
  selfClosingTag: "never",
99
99
  },
100
100
  ],
101
101
  // "svelte/html-quotes": State.OFF /* BUG: incompatible with object props, which should not be stringified */,
102
- "svelte/html-self-closing": State.ON,
103
- "svelte/indent": State.ON,
104
- "svelte/max-attributes-per-line": State.ON,
105
- "svelte/mustache-spacing": State.ON,
106
- "svelte/no-extra-reactive-curlies": State.ON,
102
+ "svelte/html-self-closing": State.WARN,
103
+ "svelte/indent": State.WARN,
104
+ "svelte/max-attributes-per-line": State.WARN,
105
+ "svelte/mustache-spacing": State.WARN,
106
+ "svelte/no-extra-reactive-curlies": State.WARN,
107
107
  // "svelte/no-restricted-html-elements": State.OFF,
108
- "svelte/no-spaces-around-equal-signs-in-attribute": State.ON,
108
+ "svelte/no-spaces-around-equal-signs-in-attribute": State.WARN,
109
109
  "svelte/prefer-class-directive": [
110
- State.ON,
110
+ State.WARN,
111
111
  {
112
112
  prefer: "empty",
113
113
  },
114
114
  ],
115
- "svelte/prefer-style-directive": State.ON,
115
+ "svelte/prefer-style-directive": State.WARN,
116
116
  "svelte/require-event-prefix": State.ON,
117
- "svelte/shorthand-attribute": State.ON,
118
- "svelte/shorthand-directive": State.ON,
119
- // "svelte/sort-attributes": State.OFF /* INVESTIGATE: */,
120
- "svelte/spaced-html-comment": State.ON /* INFO: does not have third object option (exceptions/markers), unlike stylistic/spaced-comment */,
117
+ "svelte/shorthand-attribute": State.WARN,
118
+ "svelte/shorthand-directive": State.WARN,
119
+ // "svelte/sort-attributes": State.OFF,
120
+ "svelte/spaced-html-comment": State.WARN /* INFO: does not have third object option (exceptions/markers), unlike stylistic/spaced-comment */,
121
121
  // #endregion
122
122
 
123
123
  // #region SVELTE-KIT
@@ -3,20 +3,20 @@ import { State } from "../state";
3
3
  export default {
4
4
  rules: {
5
5
  // Handled by TypeScript compiler
6
- "consistent-return": State.OFF /* TSLint BUT tsc */,
6
+ "consistent-return": State.OFF /* TSLint BUT @tsc */,
7
7
  "constructor-super": State.OFF,
8
8
  "getter-return": State.OFF,
9
9
  "no-class-assign": State.OFF,
10
10
  "no-const-assign": State.OFF,
11
11
  "no-dupe-args": State.OFF,
12
- "no-dupe-class-members": State.OFF /* TS-capable BUT tsc */,
12
+ "no-dupe-class-members": State.OFF /* supports TypeScript BUT @tsc */,
13
13
  "no-dupe-keys": State.OFF,
14
14
  "no-func-assign": State.OFF,
15
15
  "no-import-assign": State.OFF,
16
- "no-invalid-this": State.OFF /* TS-capable BUT tsc */,
16
+ "no-invalid-this": State.OFF /* supports TypeScript BUT @tsc */,
17
17
  "no-new-native-nonconstructor": State.OFF,
18
18
  "no-obj-calls": State.OFF,
19
- "no-redeclare": State.OFF /* TSLint BUT tsc */,
19
+ "no-redeclare": State.OFF /* TSLint BUT @tsc */,
20
20
  "no-setter-return": State.OFF,
21
21
  "no-this-before-super": State.OFF,
22
22
  "no-undef": State.OFF,
@@ -5,7 +5,7 @@ export default {
5
5
  rules: {
6
6
  /* @OVERRIDE */ "dot-notation": State.OFF,
7
7
  "ts/dot-notation": [
8
- State.ON,
8
+ State.WARN,
9
9
  {
10
10
  // TS-only:
11
11
  allowPrivateClassPropertyAccess: true,
@@ -15,31 +15,23 @@ export default {
15
15
  ],
16
16
  /* @OVERRIDE */ "no-implied-eval": State.OFF,
17
17
  "ts/no-implied-eval": State.ON,
18
- // "ts/no-redeclare": State.OFF /* tsc (let, const, -var) */,
18
+ // "ts/no-redeclare": State.OFF /* @tsc: (let, const, -var) */,
19
19
  /* @OVERRIDE */ "no-restricted-imports": State.OFF,
20
- // "ts/no-restricted-imports": State.OFF /* preference */,
20
+ // "ts/no-restricted-imports": State.OFF,
21
21
  /* @OVERRIDE */ "no-unused-vars": State.OFF,
22
- "ts/no-unused-vars": State.ON,
22
+ "ts/no-unused-vars": State.WARN,
23
23
  /* @OVERRIDE */ "no-throw-literal": State.OFF,
24
24
  "ts/only-throw-error": [
25
- State.ON,
25
+ State.WARN,
26
26
  {
27
27
  allowThrowingAny: false,
28
28
  },
29
29
  ],
30
30
  /* @OVERRIDE */ "prefer-destructuring": State.OFF,
31
- "ts/prefer-destructuring": [
32
- State.ON,
33
- {
34
- AssignmentExpression: {
35
- array: false,
36
- object: false,
37
- },
38
- },
39
- ],
31
+ // "ts/prefer-destructuring": State.OFF /* @preference: too prescriptive */,
40
32
  /* @OVERRIDE */ "prefer-promise-reject-errors": State.OFF,
41
33
  "ts/prefer-promise-reject-errors": [
42
- State.ON,
34
+ State.WARN,
43
35
  {
44
36
  allowThrowingUnknown: true,
45
37
  },