@eslinted/defaults 17.9.1 → 18.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_pattern/index.d.ts.map +1 -1
- package/dist/_pattern/index.js +1 -0
- package/dist/_pattern/index.js.map +1 -1
- package/dist/ignores/global.d.ts +2 -2
- package/dist/ignores/global.d.ts.map +1 -1
- package/dist/ignores/global.js +7 -4
- package/dist/ignores/global.js.map +1 -1
- package/dist/index.d.ts +247 -266
- package/dist/index.d.ts.map +1 -1
- package/dist/rules/css/index.d.ts +9 -9
- package/dist/rules/css/index.js +9 -9
- package/dist/rules/css/index.js.map +1 -1
- package/dist/rules/html/index.d.ts +42 -42
- package/dist/rules/html/index.d.ts.map +1 -1
- package/dist/rules/html/index.js +42 -42
- package/dist/rules/html/index.js.map +1 -1
- package/dist/rules/index.d.ts +247 -266
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/js.d.ts +112 -119
- package/dist/rules/js.d.ts.map +1 -1
- package/dist/rules/js.eslint.d.ts +45 -52
- package/dist/rules/js.eslint.d.ts.map +1 -1
- package/dist/rules/js.eslint.js +45 -52
- package/dist/rules/js.eslint.js.map +1 -1
- package/dist/rules/js.stylistic.d.ts +67 -67
- package/dist/rules/js.stylistic.d.ts.map +1 -1
- package/dist/rules/js.stylistic.js +67 -67
- package/dist/rules/js.stylistic.js.map +1 -1
- package/dist/rules/json/index.d.ts +8 -11
- package/dist/rules/json/index.d.ts.map +1 -1
- package/dist/rules/json/plugin/extend.d.ts +8 -11
- package/dist/rules/json/plugin/extend.d.ts.map +1 -1
- package/dist/rules/json/plugin/extend.js +8 -11
- package/dist/rules/json/plugin/extend.js.map +1 -1
- package/dist/rules/jsoncc/index.d.ts +1 -1
- package/dist/rules/jsoncc/index.js +1 -1
- package/dist/rules/mocha/index.d.ts +1 -1
- package/dist/rules/mocha/index.js +1 -1
- package/dist/rules/mocha/index.js.map +1 -1
- package/dist/rules/svelte/extend.d.ts +1 -1
- package/dist/rules/svelte/extend.js +1 -1
- package/dist/rules/svelte/extend.js.map +1 -1
- package/dist/rules/svelte/index.d.ts +24 -24
- package/dist/rules/svelte/svelte.d.ts +23 -23
- package/dist/rules/svelte/svelte.js +23 -23
- package/dist/rules/svelte/svelte.js.map +1 -1
- package/dist/rules/ts/extend.d.ts +4 -13
- package/dist/rules/ts/extend.d.ts.map +1 -1
- package/dist/rules/ts/extend.js +4 -13
- package/dist/rules/ts/extend.js.map +1 -1
- package/dist/rules/ts/index.d.ts +31 -41
- package/dist/rules/ts/index.d.ts.map +1 -1
- package/dist/rules/ts/ts.d.ts +27 -28
- package/dist/rules/ts/ts.d.ts.map +1 -1
- package/dist/rules/ts/ts.js +27 -28
- package/dist/rules/ts/ts.js.map +1 -1
- package/dist/rules/yml/extend.d.ts +7 -7
- package/dist/rules/yml/extend.js +7 -7
- package/dist/rules/yml/extend.js.map +1 -1
- package/dist/rules/yml/index.d.ts +19 -18
- package/dist/rules/yml/index.d.ts.map +1 -1
- package/dist/rules/yml/yml.d.ts +12 -11
- package/dist/rules/yml/yml.d.ts.map +1 -1
- package/dist/rules/yml/yml.js +12 -11
- package/dist/rules/yml/yml.js.map +1 -1
- package/package.json +1 -1
- package/src/_pattern/index.ts +1 -0
- package/src/ignores/global.ts +15 -6
- package/src/rules/css/index.ts +11 -11
- package/src/rules/html/index.ts +50 -58
- package/src/rules/js.eslint.ts +143 -162
- package/src/rules/js.stylistic.ts +87 -88
- package/src/rules/json/json.ts +3 -3
- package/src/rules/json/plugin/extend.ts +11 -14
- package/src/rules/json/plugin/index.ts +3 -3
- package/src/rules/jsonc/index.ts +1 -1
- package/src/rules/jsoncc/index.ts +2 -2
- package/src/rules/mocha/index.ts +1 -1
- package/src/rules/svelte/disable.ts +3 -3
- package/src/rules/svelte/extend.ts +3 -3
- package/src/rules/svelte/svelte.ts +26 -26
- package/src/rules/ts/disable.ts +4 -4
- package/src/rules/ts/extend.ts +7 -15
- package/src/rules/ts/ts.ts +44 -44
- package/src/rules/yml/extend.ts +7 -7
- package/src/rules/yml/yml.ts +15 -15
- package/tests/tsconfig.json +5 -0
- package/tsconfig-base.json +1 -3
|
@@ -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.
|
|
7
|
-
"stylistic/array-bracket-spacing": State.
|
|
6
|
+
"stylistic/array-bracket-newline": State.WARN,
|
|
7
|
+
"stylistic/array-bracket-spacing": State.WARN,
|
|
8
8
|
"stylistic/array-element-newline": [
|
|
9
|
-
State.
|
|
9
|
+
State.WARN,
|
|
10
10
|
{
|
|
11
11
|
consistent: true,
|
|
12
12
|
multiline: true,
|
|
13
13
|
minItems: 3,
|
|
14
|
-
}
|
|
14
|
+
},
|
|
15
15
|
],
|
|
16
16
|
"stylistic/arrow-parens": [
|
|
17
|
-
State.
|
|
18
|
-
"as-needed"
|
|
17
|
+
State.WARN,
|
|
18
|
+
"as-needed",
|
|
19
19
|
],
|
|
20
|
-
"stylistic/arrow-spacing": State.
|
|
21
|
-
"stylistic/block-spacing": State.
|
|
20
|
+
"stylistic/arrow-spacing": State.WARN,
|
|
21
|
+
"stylistic/block-spacing": State.WARN,
|
|
22
22
|
"stylistic/brace-style": [
|
|
23
|
-
State.
|
|
24
|
-
"stroustrup"
|
|
23
|
+
State.WARN,
|
|
24
|
+
"stroustrup",
|
|
25
25
|
{
|
|
26
|
-
allowSingleLine: true
|
|
26
|
+
allowSingleLine: true,
|
|
27
27
|
},
|
|
28
28
|
],
|
|
29
29
|
"stylistic/comma-dangle": [
|
|
30
|
-
State.
|
|
30
|
+
State.WARN,
|
|
31
31
|
"always-multiline",
|
|
32
32
|
],
|
|
33
|
-
"stylistic/comma-spacing": State.
|
|
34
|
-
"stylistic/comma-style": State.
|
|
35
|
-
"stylistic/computed-property-spacing": State.
|
|
36
|
-
"stylistic/curly-newline": State.
|
|
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.
|
|
39
|
-
"property"
|
|
38
|
+
State.WARN,
|
|
39
|
+
"property",
|
|
40
40
|
],
|
|
41
|
-
"stylistic/eol-last": State.
|
|
41
|
+
"stylistic/eol-last": State.WARN,
|
|
42
42
|
"stylistic/function-call-argument-newline": [
|
|
43
|
-
State.
|
|
44
|
-
"consistent"
|
|
43
|
+
State.WARN,
|
|
44
|
+
"consistent",
|
|
45
45
|
],
|
|
46
|
-
"stylistic/function-call-spacing": State.
|
|
46
|
+
"stylistic/function-call-spacing": State.WARN,
|
|
47
47
|
"stylistic/function-paren-newline": [
|
|
48
|
-
State.
|
|
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.
|
|
52
|
-
"stylistic/implicit-arrow-linebreak": State.
|
|
51
|
+
"stylistic/generator-star-spacing": State.WARN,
|
|
52
|
+
"stylistic/implicit-arrow-linebreak": State.WARN,
|
|
53
53
|
"stylistic/indent": [
|
|
54
|
-
State.
|
|
55
|
-
2
|
|
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.
|
|
68
|
+
State.WARN,
|
|
69
69
|
2 /* MUST be same as `stylistic/indent`[1] */,
|
|
70
70
|
],
|
|
71
|
-
"stylistic/key-spacing": State.
|
|
72
|
-
"stylistic/keyword-spacing": State.
|
|
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.
|
|
74
|
+
"stylistic/linebreak-style": State.WARN,
|
|
75
75
|
// "stylistic/lines-around-comment": State.OFF,
|
|
76
76
|
"stylistic/lines-between-class-members": [
|
|
77
|
-
State.
|
|
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.
|
|
99
|
+
State.WARN,
|
|
100
100
|
{
|
|
101
|
-
code: 300
|
|
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.
|
|
112
|
-
"stylistic/member-delimiter-style": State.
|
|
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.
|
|
116
|
-
"always-multiline"
|
|
114
|
+
State.WARN,
|
|
115
|
+
"always-multiline",
|
|
117
116
|
],
|
|
118
117
|
// "stylistic/new-parens": State.OFF,
|
|
119
|
-
"stylistic/newline-per-chained-call": State.
|
|
118
|
+
"stylistic/newline-per-chained-call": State.WARN,
|
|
120
119
|
// "stylistic/no-confusing-arrow": State.OFF,
|
|
121
|
-
"stylistic/no-extra-parens": State.
|
|
122
|
-
"stylistic/no-extra-semi": State.
|
|
123
|
-
"stylistic/no-floating-decimal": State.
|
|
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.
|
|
124
|
+
"stylistic/no-mixed-spaces-and-tabs": State.WARN,
|
|
126
125
|
"stylistic/no-multi-spaces": [
|
|
127
|
-
State.
|
|
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.
|
|
135
|
+
State.WARN,
|
|
137
136
|
{
|
|
138
|
-
max: 1
|
|
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.
|
|
144
|
-
"stylistic/no-trailing-spaces": State.
|
|
145
|
-
"stylistic/no-whitespace-before-property": State.
|
|
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.
|
|
148
|
-
"below"
|
|
146
|
+
State.WARN,
|
|
147
|
+
"below",
|
|
149
148
|
],
|
|
150
149
|
"stylistic/object-curly-newline": [
|
|
151
|
-
State.
|
|
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.
|
|
160
|
-
"always"
|
|
158
|
+
State.WARN,
|
|
159
|
+
"always",
|
|
161
160
|
{
|
|
162
161
|
emptyObjects: "never",
|
|
163
162
|
},
|
|
164
163
|
],
|
|
165
|
-
"stylistic/object-property-newline": State.
|
|
164
|
+
"stylistic/object-property-newline": State.WARN,
|
|
166
165
|
"stylistic/one-var-declaration-per-line": [
|
|
167
|
-
State.
|
|
168
|
-
"always"
|
|
166
|
+
State.WARN,
|
|
167
|
+
"always",
|
|
169
168
|
],
|
|
170
169
|
"stylistic/operator-linebreak": [
|
|
171
|
-
State.
|
|
172
|
-
"before"
|
|
170
|
+
State.WARN,
|
|
171
|
+
"before",
|
|
173
172
|
],
|
|
174
173
|
"stylistic/padded-blocks": [
|
|
175
|
-
State.
|
|
176
|
-
"never"
|
|
174
|
+
State.WARN,
|
|
175
|
+
"never",
|
|
177
176
|
{
|
|
178
177
|
allowSingleLineBlocks: true,
|
|
179
178
|
},
|
|
180
179
|
],
|
|
181
|
-
// "stylistic/padding-line-between-statements": State.OFF /*
|
|
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.
|
|
182
|
+
State.WARN,
|
|
184
183
|
"as-needed",
|
|
185
184
|
{
|
|
186
185
|
keywords: true,
|
|
187
186
|
},
|
|
188
187
|
],
|
|
189
188
|
"stylistic/quotes": [
|
|
190
|
-
State.
|
|
191
|
-
"double"
|
|
189
|
+
State.WARN,
|
|
190
|
+
"double",
|
|
192
191
|
{
|
|
193
192
|
avoidEscape: true,
|
|
194
|
-
allowTemplateLiterals: "always"
|
|
193
|
+
allowTemplateLiterals: "always",
|
|
195
194
|
},
|
|
196
195
|
],
|
|
197
|
-
"stylistic/rest-spread-spacing": State.
|
|
198
|
-
"stylistic/semi": State.
|
|
199
|
-
"stylistic/semi-spacing": State.
|
|
200
|
-
"stylistic/semi-style": State.
|
|
201
|
-
"stylistic/space-before-blocks": State.
|
|
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.
|
|
202
|
+
State.WARN,
|
|
204
203
|
{
|
|
205
204
|
named: "never",
|
|
206
205
|
},
|
|
207
206
|
],
|
|
208
|
-
"stylistic/space-in-parens": State.
|
|
209
|
-
"stylistic/space-infix-ops": State.
|
|
210
|
-
"stylistic/space-unary-ops": State.
|
|
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.
|
|
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.
|
|
243
|
-
"stylistic/template-curly-spacing": State.
|
|
244
|
-
"stylistic/template-tag-spacing": State.
|
|
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.
|
|
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.
|
|
259
|
-
"stylistic/type-named-tuple-spacing": State.
|
|
257
|
+
"stylistic/type-generic-spacing": State.WARN,
|
|
258
|
+
"stylistic/type-named-tuple-spacing": State.WARN,
|
|
260
259
|
"stylistic/wrap-iife": [
|
|
261
|
-
State.
|
|
260
|
+
State.WARN,
|
|
262
261
|
"inside",
|
|
263
262
|
{
|
|
264
263
|
functionPrototypeMethods: true,
|
|
265
264
|
},
|
|
266
265
|
],
|
|
267
|
-
"stylistic/wrap-regex": State.
|
|
268
|
-
"stylistic/yield-star-spacing": State.
|
|
266
|
+
"stylistic/wrap-regex": State.WARN,
|
|
267
|
+
"stylistic/yield-star-spacing": State.WARN,
|
|
269
268
|
} as const,
|
|
270
269
|
};
|
package/src/rules/json/json.ts
CHANGED
|
@@ -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 /*
|
|
7
|
-
// "json/no-empty-keys": State.OFF
|
|
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 /*
|
|
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 /*
|
|
7
|
-
"jsonc/array-bracket-spacing": State.
|
|
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.
|
|
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
|
|
13
|
-
"jsonc/comma-style": State.
|
|
12
|
+
"jsonc/comma-dangle": State.ON,
|
|
13
|
+
"jsonc/comma-style": State.WARN,
|
|
14
14
|
"jsonc/indent": [
|
|
15
|
-
State.
|
|
15
|
+
State.WARN,
|
|
16
16
|
2,
|
|
17
17
|
],
|
|
18
|
-
"jsonc/key-spacing": State.
|
|
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.
|
|
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.
|
|
42
|
+
State.WARN,
|
|
46
43
|
"always",
|
|
47
44
|
] /* MUST match stylistic/object-curly-spacing (except unsupported 3rd options) */,
|
|
48
|
-
"jsonc/object-property-newline": State.
|
|
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
|
|
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
|
|
26
|
-
// "jsonc/sort-keys": State.OFF /* ESLint: json/sort-keys
|
|
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,
|
package/src/rules/jsonc/index.ts
CHANGED
package/src/rules/mocha/index.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { State } from "../state";
|
|
|
3
3
|
export default [
|
|
4
4
|
{
|
|
5
5
|
rules: {
|
|
6
|
-
"no-unsafe-call": State.OFF /* fails to detect valueful assertions in mocha */,
|
|
7
6
|
"no-unused-expressions": State.OFF /* fails to detect valueful assertions in mocha */,
|
|
7
|
+
"ts/no-unsafe-call": State.OFF /* fails to detect valueful assertions in mocha */,
|
|
8
8
|
} as const,
|
|
9
9
|
},
|
|
10
10
|
];
|
|
@@ -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 /*
|
|
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 /*
|
|
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.
|
|
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.
|
|
38
|
+
State.WARN,
|
|
39
39
|
{
|
|
40
40
|
script: ["ts"],
|
|
41
41
|
style: ["css"],
|
|
42
42
|
},
|
|
43
|
-
],
|
|
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.
|
|
56
|
+
State.WARN,
|
|
57
57
|
{
|
|
58
58
|
checkImportedTypes: true,
|
|
59
59
|
},
|
|
60
60
|
],
|
|
61
|
-
"svelte/no-unused-svelte-ignore": State.
|
|
62
|
-
"svelte/no-useless-children-snippet": State.
|
|
63
|
-
"svelte/no-useless-mustaches": State.
|
|
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.
|
|
65
|
+
State.WARN,
|
|
66
66
|
{
|
|
67
67
|
destructuring: "all",
|
|
68
68
|
},
|
|
69
69
|
] /* same options: prefer-const */,
|
|
70
|
-
"svelte/prefer-destructured-store-props": State.
|
|
71
|
-
"svelte/prefer-writable-derived": State.
|
|
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.
|
|
82
|
+
State.WARN,
|
|
83
83
|
{
|
|
84
|
-
checkGlobal: true
|
|
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.
|
|
89
|
+
State.WARN,
|
|
90
90
|
{
|
|
91
91
|
singleline: "below",
|
|
92
92
|
},
|
|
93
93
|
],
|
|
94
|
-
"svelte/html-closing-bracket-new-line": State.
|
|
94
|
+
"svelte/html-closing-bracket-new-line": State.WARN,
|
|
95
95
|
"svelte/html-closing-bracket-spacing": [
|
|
96
|
-
State.
|
|
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.
|
|
103
|
-
"svelte/indent": State.
|
|
104
|
-
"svelte/max-attributes-per-line": State.
|
|
105
|
-
"svelte/mustache-spacing": State.
|
|
106
|
-
"svelte/no-extra-reactive-curlies": State.
|
|
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.
|
|
108
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": State.WARN,
|
|
109
109
|
"svelte/prefer-class-directive": [
|
|
110
|
-
State.
|
|
110
|
+
State.WARN,
|
|
111
111
|
{
|
|
112
112
|
prefer: "empty",
|
|
113
113
|
},
|
|
114
114
|
],
|
|
115
|
-
"svelte/prefer-style-directive": State.
|
|
115
|
+
"svelte/prefer-style-directive": State.WARN,
|
|
116
116
|
"svelte/require-event-prefix": State.ON,
|
|
117
|
-
"svelte/shorthand-attribute": State.
|
|
118
|
-
"svelte/shorthand-directive": State.
|
|
119
|
-
// "svelte/sort-attributes": State.OFF
|
|
120
|
-
"svelte/spaced-html-comment": State.
|
|
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
|
package/src/rules/ts/disable.ts
CHANGED
|
@@ -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 /*
|
|
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 /*
|
|
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,
|
package/src/rules/ts/extend.ts
CHANGED
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
rules: {
|
|
6
6
|
/* @OVERRIDE */ "dot-notation": State.OFF,
|
|
7
7
|
"ts/dot-notation": [
|
|
8
|
-
State.
|
|
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
|
|
20
|
+
// "ts/no-restricted-imports": State.OFF,
|
|
21
21
|
/* @OVERRIDE */ "no-unused-vars": State.OFF,
|
|
22
|
-
"ts/no-unused-vars": State.
|
|
22
|
+
"ts/no-unused-vars": State.WARN,
|
|
23
23
|
/* @OVERRIDE */ "no-throw-literal": State.OFF,
|
|
24
24
|
"ts/only-throw-error": [
|
|
25
|
-
State.
|
|
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.
|
|
34
|
+
State.WARN,
|
|
43
35
|
{
|
|
44
36
|
allowThrowingUnknown: true,
|
|
45
37
|
},
|