linted 16.12.2-rc.1 → 16.12.2-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/RELEASE.yml +35 -35
- package/.github/workflows/rc.yml +35 -35
- package/LICENSE +21 -21
- package/README.md +390 -390
- package/SECURITY.md +9 -9
- package/dist/imports/plugins.d.ts.map +1 -1
- package/dist/imports.d.ts.map +1 -1
- package/dist/rules/_html.d.ts +8 -0
- package/dist/rules/_html.d.ts.map +1 -0
- package/dist/rules/_html.js +4 -0
- package/dist/rules/_html.js.map +1 -0
- package/dist/rules/_js.d.ts +765 -0
- package/dist/rules/_js.d.ts.map +1 -0
- package/dist/rules/_js.js +4 -0
- package/dist/rules/_js.js.map +1 -0
- package/dist/rules/_json.d.ts +74 -0
- package/dist/rules/_json.d.ts.map +1 -0
- package/dist/rules/_json.js +4 -0
- package/dist/rules/_json.js.map +1 -0
- package/dist/rules/_jsonc.d.ts +77 -0
- package/dist/rules/_jsonc.d.ts.map +1 -0
- package/dist/rules/_jsonc.js +4 -0
- package/dist/rules/_jsonc.js.map +1 -0
- package/dist/rules/_md.d.ts +7 -0
- package/dist/rules/_md.d.ts.map +1 -0
- package/dist/rules/_md.js +3 -0
- package/dist/rules/_md.js.map +1 -0
- package/dist/rules/_mocha.d.ts +8 -0
- package/dist/rules/_mocha.d.ts.map +1 -0
- package/dist/rules/_mocha.js +4 -0
- package/dist/rules/_mocha.js.map +1 -0
- package/dist/rules/_svelte.d.ts +1269 -0
- package/dist/rules/_svelte.d.ts.map +1 -0
- package/dist/rules/_svelte.js +15 -0
- package/dist/rules/_svelte.js.map +1 -0
- package/dist/rules/_ts.d.ts +1133 -0
- package/dist/rules/_ts.d.ts.map +1 -0
- package/dist/rules/_ts.js +13 -0
- package/dist/rules/_ts.js.map +1 -0
- package/dist/rules/_yml.d.ts +73 -0
- package/dist/rules/_yml.d.ts.map +1 -0
- package/dist/rules/_yml.js +4 -0
- package/dist/rules/_yml.js.map +1 -0
- package/dist/rules/html/_enable.d.ts +8 -0
- package/dist/rules/html/_enable.d.ts.map +1 -0
- package/dist/rules/html/_enable.js +10 -0
- package/dist/rules/html/_enable.js.map +1 -0
- package/dist/rules/html/_recommended.d.ts +3 -0
- package/dist/rules/html/_recommended.d.ts.map +1 -0
- package/dist/rules/html/_recommended.js +5 -0
- package/dist/rules/html/_recommended.js.map +1 -0
- package/dist/rules/js/_enable.d.ts +348 -0
- package/dist/rules/js/_enable.d.ts.map +1 -0
- package/dist/rules/js/_enable.js +260 -0
- package/dist/rules/js/_enable.js.map +1 -0
- package/dist/rules/js/stylistic.d.ts +420 -0
- package/dist/rules/js/stylistic.d.ts.map +1 -0
- package/dist/rules/js/stylistic.js +270 -0
- package/dist/rules/js/stylistic.js.map +1 -0
- package/dist/rules/json/_enable.d.ts +27 -0
- package/dist/rules/json/_enable.d.ts.map +1 -0
- package/dist/rules/json/_enable.js +31 -0
- package/dist/rules/json/_enable.js.map +1 -0
- package/dist/rules/md/_enable.d.ts +7 -0
- package/dist/rules/md/_enable.d.ts.map +1 -0
- package/dist/rules/md/_enable.js +9 -0
- package/dist/rules/md/_enable.js.map +1 -0
- package/dist/rules/mocha/_enable.d.ts +3 -0
- package/dist/rules/mocha/_enable.d.ts.map +1 -0
- package/dist/rules/mocha/_enable.js +4 -0
- package/dist/rules/mocha/_enable.js.map +1 -0
- package/dist/rules/mocha/_recommended.d.ts +3 -0
- package/dist/rules/mocha/_recommended.d.ts.map +1 -0
- package/dist/rules/mocha/_recommended.js +5 -0
- package/dist/rules/mocha/_recommended.js.map +1 -0
- package/dist/rules/svelte/_enable.d.ts +126 -0
- package/dist/rules/svelte/_enable.d.ts.map +1 -0
- package/dist/rules/svelte/_enable.js +90 -0
- package/dist/rules/svelte/_enable.js.map +1 -0
- package/dist/rules/svelte/disable_x.d.ts +5 -0
- package/dist/rules/svelte/disable_x.d.ts.map +1 -0
- package/dist/rules/svelte/disable_x.js +4 -0
- package/dist/rules/svelte/disable_x.js.map +1 -0
- package/dist/rules/ts/_enable.d.ts +262 -0
- package/dist/rules/ts/_enable.d.ts.map +1 -0
- package/dist/rules/ts/_enable.js +359 -0
- package/dist/rules/ts/_enable.js.map +1 -0
- package/dist/rules/ts/disable_compiler.d.ts +18 -0
- package/dist/rules/ts/disable_compiler.d.ts.map +1 -0
- package/dist/rules/ts/disable_compiler.js +22 -0
- package/dist/rules/ts/disable_compiler.js.map +1 -0
- package/dist/rules/yml/_enable.d.ts +39 -0
- package/dist/rules/yml/_enable.d.ts.map +1 -0
- package/dist/rules/yml/_enable.js +28 -0
- package/dist/rules/yml/_enable.js.map +1 -0
- package/eslint.config.js +3 -3
- package/package.json +99 -99
- package/src/files/html.ts +1 -1
- package/src/files/js.ts +1 -1
- package/src/files/json.ts +1 -1
- package/src/files/jsonc.ts +4 -4
- package/src/files/md.ts +1 -1
- package/src/files/mocha.ts +1 -1
- package/src/files/svelte.ts +1 -1
- package/src/files/ts.ts +5 -5
- package/src/files/yml.ts +5 -5
- package/src/files.ts +22 -22
- package/src/imports/parsers.ts +15 -15
- package/src/imports/plugins.ts +19 -19
- package/src/imports.ts +8 -8
- package/src/index.ts +36 -36
- package/src/rules/_strings/id.ts +18 -18
- package/src/rules/_strings/level.ts +6 -6
- package/src/rules/_strings/state.ts +56 -56
- package/src/rules/_strings.ts +6 -6
- package/src/rules/html/enable.ts +16 -16
- package/src/rules/html/enable_recommended.ts +9 -9
- package/src/rules/html.ts +4 -4
- package/src/rules/js/enable.ts +524 -524
- package/src/rules/js/enable_stylistic.ts +608 -608
- package/src/rules/js.ts +4 -4
- package/src/rules/json/enable.ts +33 -33
- package/src/rules/json/enable_x.ts +89 -89
- package/src/rules/json.ts +4 -4
- package/src/rules/jsonc/override.ts +16 -16
- package/src/rules/jsonc.ts +4 -4
- package/src/rules/md/enable.ts +15 -15
- package/src/rules/md.ts +3 -3
- package/src/rules/mocha/enable.ts +3 -3
- package/src/rules/mocha/enable_recommended.ts +9 -9
- package/src/rules/mocha.ts +4 -4
- package/src/rules/svelte/disable.ts +9 -9
- package/src/rules/svelte/disable_js.ts +11 -11
- package/src/rules/svelte/disable_ts.ts +9 -9
- package/src/rules/svelte/enable.ts +228 -228
- package/src/rules/svelte/enable_x.ts +20 -20
- package/src/rules/svelte.ts +15 -15
- package/src/rules/ts/disable.ts +22 -22
- package/src/rules/ts/disable_x.ts +32 -32
- package/src/rules/ts/enable.ts +549 -549
- package/src/rules/ts/enable_x.ts +115 -115
- package/src/rules/ts.ts +13 -13
- package/src/rules/yml/enable.ts +64 -64
- package/src/rules/yml/enable_x.ts +68 -68
- package/src/rules/yml.ts +4 -4
- package/src/rules.ts +22 -22
- package/tsconfig.json +161 -161
- package/types/markdownlint/index.d.ts +3 -3
- package/types/markdownlint/parser.d.ts +9 -9
- package/types/mocha/index.d.ts +8 -8
@@ -1,228 +1,228 @@
|
|
1
|
-
import { enable, level, state } from "../_strings.js";
|
2
|
-
|
3
|
-
const
|
4
|
-
{ ERROR, OFF } = level,
|
5
|
-
{
|
6
|
-
Never,
|
7
|
-
Always,
|
8
|
-
Below,
|
9
|
-
Double,
|
10
|
-
} = state;
|
11
|
-
|
12
|
-
export default [
|
13
|
-
enable,
|
14
|
-
{
|
15
|
-
// #region Possible Errors
|
16
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
|
17
|
-
"svelte/infinite-reactive-loop": ERROR,
|
18
|
-
"svelte/no-dom-manipulating": ERROR,
|
19
|
-
"svelte/no-dupe-else-if-blocks": ERROR,
|
20
|
-
"svelte/no-dupe-on-directives": ERROR,
|
21
|
-
"svelte/no-dupe-style-properties": ERROR,
|
22
|
-
"svelte/no-dupe-use-directives": ERROR,
|
23
|
-
"svelte/no-dynamic-slot-name": ERROR,
|
24
|
-
"svelte/no-export-load-in-svelte-module-in-kit-pages": ERROR,
|
25
|
-
"svelte/no-not-function-handler": ERROR,
|
26
|
-
"svelte/no-object-in-text-mustaches": ERROR,
|
27
|
-
"svelte/no-reactive-reassign": [
|
28
|
-
ERROR,
|
29
|
-
{
|
30
|
-
props: true,
|
31
|
-
},
|
32
|
-
],
|
33
|
-
"svelte/no-shorthand-style-property-overrides": ERROR,
|
34
|
-
"svelte/no-store-async": ERROR,
|
35
|
-
"svelte/no-unknown-style-directive-property": [
|
36
|
-
ERROR,
|
37
|
-
{
|
38
|
-
ignorePrefixed: true,
|
39
|
-
},
|
40
|
-
],
|
41
|
-
"svelte/require-store-callbacks-use-set-param": ERROR,
|
42
|
-
"svelte/require-store-reactive-access": ERROR,
|
43
|
-
"svelte/valid-compile": [
|
44
|
-
ERROR,
|
45
|
-
{
|
46
|
-
ignoreWarnings: false,
|
47
|
-
},
|
48
|
-
],
|
49
|
-
"svelte/valid-prop-names-in-kit-pages": ERROR,
|
50
|
-
|
51
|
-
// #endregion
|
52
|
-
|
53
|
-
// #region Security
|
54
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
|
55
|
-
"svelte/no-at-html-tags": ERROR,
|
56
|
-
"svelte/no-target-blank": [
|
57
|
-
ERROR,
|
58
|
-
{
|
59
|
-
allowReferrer: false,
|
60
|
-
enforceDynamicLinks: Always,
|
61
|
-
},
|
62
|
-
],
|
63
|
-
|
64
|
-
// #endregion
|
65
|
-
|
66
|
-
// #region Best Practices
|
67
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
|
68
|
-
"svelte/block-lang": [
|
69
|
-
ERROR,
|
70
|
-
{
|
71
|
-
enforceScriptPresent: true,
|
72
|
-
enforceStylePresent: false,
|
73
|
-
script: ["ts"],
|
74
|
-
style: [
|
75
|
-
"css",
|
76
|
-
"scss",
|
77
|
-
],
|
78
|
-
},
|
79
|
-
], /* INVESTIGATE: */
|
80
|
-
"svelte/button-has-type": [
|
81
|
-
ERROR,
|
82
|
-
{
|
83
|
-
button: true,
|
84
|
-
submit: true,
|
85
|
-
reset: true,
|
86
|
-
},
|
87
|
-
],
|
88
|
-
"svelte/no-at-debug-tags": ERROR,
|
89
|
-
"svelte/no-ignored-unsubscribe": ERROR,
|
90
|
-
"svelte/no-immutable-reactive-statements": ERROR,
|
91
|
-
"svelte/no-inline-styles": [
|
92
|
-
ERROR,
|
93
|
-
{
|
94
|
-
allowTransitions: false,
|
95
|
-
},
|
96
|
-
],
|
97
|
-
"svelte/no-reactive-functions": ERROR,
|
98
|
-
"svelte/no-reactive-literals": ERROR,
|
99
|
-
"svelte/no-svelte-internal": ERROR,
|
100
|
-
"svelte/no-unused-class-name": ERROR, /* BUG: ESLint error if array empty */
|
101
|
-
"svelte/no-unused-svelte-ignore": ERROR,
|
102
|
-
"svelte/no-useless-mustaches": [
|
103
|
-
ERROR,
|
104
|
-
{
|
105
|
-
ignoreIncludesComment: false,
|
106
|
-
ignoreStringEscape: false,
|
107
|
-
},
|
108
|
-
],
|
109
|
-
"svelte/prefer-destructured-store-props": ERROR,
|
110
|
-
"svelte/require-each-key": ERROR,
|
111
|
-
"svelte/require-event-dispatcher-types": ERROR,
|
112
|
-
"svelte/require-optimized-style-attribute": ERROR,
|
113
|
-
"svelte/require-stores-init": ERROR,
|
114
|
-
"svelte/valid-each-key": ERROR,
|
115
|
-
|
116
|
-
// #endregion
|
117
|
-
|
118
|
-
// #region Style
|
119
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
|
120
|
-
"svelte/derived-has-same-inputs-outputs": ERROR,
|
121
|
-
"svelte/first-attribute-linebreak": [
|
122
|
-
ERROR,
|
123
|
-
{
|
124
|
-
multiline: Below,
|
125
|
-
singleline: Below,
|
126
|
-
},
|
127
|
-
],
|
128
|
-
"svelte/html-closing-bracket-spacing": [
|
129
|
-
ERROR,
|
130
|
-
{
|
131
|
-
startTag: Never,
|
132
|
-
endTag: Never,
|
133
|
-
selfClosingTag: Always,
|
134
|
-
},
|
135
|
-
],
|
136
|
-
"svelte/html-quotes": [
|
137
|
-
ERROR,
|
138
|
-
{
|
139
|
-
prefer: Double,
|
140
|
-
dynamic: {
|
141
|
-
quoted: false,
|
142
|
-
avoidInvalidUnquotedInHTML: true,
|
143
|
-
},
|
144
|
-
},
|
145
|
-
],
|
146
|
-
"svelte/html-self-closing": [
|
147
|
-
ERROR,
|
148
|
-
{
|
149
|
-
"void": Always /* or NEVER or "ignore" */,
|
150
|
-
normal: Always /* or NEVER or "ignore" */,
|
151
|
-
component: Always /* or NEVER or "ignore" */,
|
152
|
-
svelte: Always /* or NEVER or "ignore" */,
|
153
|
-
},
|
154
|
-
],
|
155
|
-
"svelte/indent": [
|
156
|
-
ERROR,
|
157
|
-
{
|
158
|
-
indent: 2,
|
159
|
-
switchCase: 1,
|
160
|
-
alignAttributesVertically: true,
|
161
|
-
},
|
162
|
-
],
|
163
|
-
"svelte/max-attributes-per-line": [
|
164
|
-
ERROR,
|
165
|
-
{
|
166
|
-
multiline: 1,
|
167
|
-
singleline: 1,
|
168
|
-
},
|
169
|
-
],
|
170
|
-
"svelte/mustache-spacing": [
|
171
|
-
ERROR,
|
172
|
-
{
|
173
|
-
textExpressions: Never /* or ALWAYS */,
|
174
|
-
attributesAndProps: Never /* or ALWAYS */,
|
175
|
-
directiveExpressions: Never /* or ALWAYS */,
|
176
|
-
tags: {
|
177
|
-
openingBrace: Never /* or ALWAYS */,
|
178
|
-
closingBrace: Never /* or ALWAYS or "always-after-expression" */,
|
179
|
-
},
|
180
|
-
},
|
181
|
-
],
|
182
|
-
"svelte/no-extra-reactive-curlies": ERROR,
|
183
|
-
"svelte/no-restricted-html-elements": OFF,
|
184
|
-
"svelte/no-spaces-around-equal-signs-in-attribute": ERROR,
|
185
|
-
"svelte/prefer-class-directive": [
|
186
|
-
ERROR,
|
187
|
-
{
|
188
|
-
prefer: "empty",
|
189
|
-
},
|
190
|
-
],
|
191
|
-
"svelte/prefer-style-directive": ERROR,
|
192
|
-
"svelte/shorthand-attribute": [
|
193
|
-
ERROR,
|
194
|
-
{
|
195
|
-
prefer: Always,
|
196
|
-
},
|
197
|
-
],
|
198
|
-
"svelte/shorthand-directive": [
|
199
|
-
ERROR,
|
200
|
-
{
|
201
|
-
prefer: Always,
|
202
|
-
},
|
203
|
-
],
|
204
|
-
"svelte/sort-attributes": OFF /* INVESTIGATE: */,
|
205
|
-
"svelte/spaced-html-comment": [ERROR, Always],
|
206
|
-
|
207
|
-
// #endregion
|
208
|
-
|
209
|
-
// #region svelte-kit
|
210
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
|
211
|
-
"svelte/no-goto-without-base": ERROR,
|
212
|
-
|
213
|
-
// #endregion
|
214
|
-
|
215
|
-
// #region System (REQUIRED)
|
216
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
|
217
|
-
"svelte/comment-directive": [
|
218
|
-
ERROR,
|
219
|
-
{
|
220
|
-
reportUnusedDisableDirectives: true,
|
221
|
-
},
|
222
|
-
],
|
223
|
-
"svelte/system": ERROR,
|
224
|
-
|
225
|
-
// #endregion
|
226
|
-
|
227
|
-
},
|
228
|
-
] as const;
|
1
|
+
import { enable, level, state } from "../_strings.js";
|
2
|
+
|
3
|
+
const
|
4
|
+
{ ERROR, OFF } = level,
|
5
|
+
{
|
6
|
+
Never,
|
7
|
+
Always,
|
8
|
+
Below,
|
9
|
+
Double,
|
10
|
+
} = state;
|
11
|
+
|
12
|
+
export default [
|
13
|
+
enable,
|
14
|
+
{
|
15
|
+
// #region Possible Errors
|
16
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
|
17
|
+
"svelte/infinite-reactive-loop": ERROR,
|
18
|
+
"svelte/no-dom-manipulating": ERROR,
|
19
|
+
"svelte/no-dupe-else-if-blocks": ERROR,
|
20
|
+
"svelte/no-dupe-on-directives": ERROR,
|
21
|
+
"svelte/no-dupe-style-properties": ERROR,
|
22
|
+
"svelte/no-dupe-use-directives": ERROR,
|
23
|
+
"svelte/no-dynamic-slot-name": ERROR,
|
24
|
+
"svelte/no-export-load-in-svelte-module-in-kit-pages": ERROR,
|
25
|
+
"svelte/no-not-function-handler": ERROR,
|
26
|
+
"svelte/no-object-in-text-mustaches": ERROR,
|
27
|
+
"svelte/no-reactive-reassign": [
|
28
|
+
ERROR,
|
29
|
+
{
|
30
|
+
props: true,
|
31
|
+
},
|
32
|
+
],
|
33
|
+
"svelte/no-shorthand-style-property-overrides": ERROR,
|
34
|
+
"svelte/no-store-async": ERROR,
|
35
|
+
"svelte/no-unknown-style-directive-property": [
|
36
|
+
ERROR,
|
37
|
+
{
|
38
|
+
ignorePrefixed: true,
|
39
|
+
},
|
40
|
+
],
|
41
|
+
"svelte/require-store-callbacks-use-set-param": ERROR,
|
42
|
+
"svelte/require-store-reactive-access": ERROR,
|
43
|
+
"svelte/valid-compile": [
|
44
|
+
ERROR,
|
45
|
+
{
|
46
|
+
ignoreWarnings: false,
|
47
|
+
},
|
48
|
+
],
|
49
|
+
"svelte/valid-prop-names-in-kit-pages": ERROR,
|
50
|
+
|
51
|
+
// #endregion
|
52
|
+
|
53
|
+
// #region Security
|
54
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
|
55
|
+
"svelte/no-at-html-tags": ERROR,
|
56
|
+
"svelte/no-target-blank": [
|
57
|
+
ERROR,
|
58
|
+
{
|
59
|
+
allowReferrer: false,
|
60
|
+
enforceDynamicLinks: Always,
|
61
|
+
},
|
62
|
+
],
|
63
|
+
|
64
|
+
// #endregion
|
65
|
+
|
66
|
+
// #region Best Practices
|
67
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
|
68
|
+
"svelte/block-lang": [
|
69
|
+
ERROR,
|
70
|
+
{
|
71
|
+
enforceScriptPresent: true,
|
72
|
+
enforceStylePresent: false,
|
73
|
+
script: ["ts"],
|
74
|
+
style: [
|
75
|
+
"css",
|
76
|
+
"scss",
|
77
|
+
],
|
78
|
+
},
|
79
|
+
], /* INVESTIGATE: */
|
80
|
+
"svelte/button-has-type": [
|
81
|
+
ERROR,
|
82
|
+
{
|
83
|
+
button: true,
|
84
|
+
submit: true,
|
85
|
+
reset: true,
|
86
|
+
},
|
87
|
+
],
|
88
|
+
"svelte/no-at-debug-tags": ERROR,
|
89
|
+
"svelte/no-ignored-unsubscribe": ERROR,
|
90
|
+
"svelte/no-immutable-reactive-statements": ERROR,
|
91
|
+
"svelte/no-inline-styles": [
|
92
|
+
ERROR,
|
93
|
+
{
|
94
|
+
allowTransitions: false,
|
95
|
+
},
|
96
|
+
],
|
97
|
+
"svelte/no-reactive-functions": ERROR,
|
98
|
+
"svelte/no-reactive-literals": ERROR,
|
99
|
+
"svelte/no-svelte-internal": ERROR,
|
100
|
+
"svelte/no-unused-class-name": ERROR, /* BUG: ESLint error if array empty */
|
101
|
+
"svelte/no-unused-svelte-ignore": ERROR,
|
102
|
+
"svelte/no-useless-mustaches": [
|
103
|
+
ERROR,
|
104
|
+
{
|
105
|
+
ignoreIncludesComment: false,
|
106
|
+
ignoreStringEscape: false,
|
107
|
+
},
|
108
|
+
],
|
109
|
+
"svelte/prefer-destructured-store-props": ERROR,
|
110
|
+
"svelte/require-each-key": ERROR,
|
111
|
+
"svelte/require-event-dispatcher-types": ERROR,
|
112
|
+
"svelte/require-optimized-style-attribute": ERROR,
|
113
|
+
"svelte/require-stores-init": ERROR,
|
114
|
+
"svelte/valid-each-key": ERROR,
|
115
|
+
|
116
|
+
// #endregion
|
117
|
+
|
118
|
+
// #region Style
|
119
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
|
120
|
+
"svelte/derived-has-same-inputs-outputs": ERROR,
|
121
|
+
"svelte/first-attribute-linebreak": [
|
122
|
+
ERROR,
|
123
|
+
{
|
124
|
+
multiline: Below,
|
125
|
+
singleline: Below,
|
126
|
+
},
|
127
|
+
],
|
128
|
+
"svelte/html-closing-bracket-spacing": [
|
129
|
+
ERROR,
|
130
|
+
{
|
131
|
+
startTag: Never,
|
132
|
+
endTag: Never,
|
133
|
+
selfClosingTag: Always,
|
134
|
+
},
|
135
|
+
],
|
136
|
+
"svelte/html-quotes": [
|
137
|
+
ERROR,
|
138
|
+
{
|
139
|
+
prefer: Double,
|
140
|
+
dynamic: {
|
141
|
+
quoted: false,
|
142
|
+
avoidInvalidUnquotedInHTML: true,
|
143
|
+
},
|
144
|
+
},
|
145
|
+
],
|
146
|
+
"svelte/html-self-closing": [
|
147
|
+
ERROR,
|
148
|
+
{
|
149
|
+
"void": Always /* or NEVER or "ignore" */,
|
150
|
+
normal: Always /* or NEVER or "ignore" */,
|
151
|
+
component: Always /* or NEVER or "ignore" */,
|
152
|
+
svelte: Always /* or NEVER or "ignore" */,
|
153
|
+
},
|
154
|
+
],
|
155
|
+
"svelte/indent": [
|
156
|
+
ERROR,
|
157
|
+
{
|
158
|
+
indent: 2,
|
159
|
+
switchCase: 1,
|
160
|
+
alignAttributesVertically: true,
|
161
|
+
},
|
162
|
+
],
|
163
|
+
"svelte/max-attributes-per-line": [
|
164
|
+
ERROR,
|
165
|
+
{
|
166
|
+
multiline: 1,
|
167
|
+
singleline: 1,
|
168
|
+
},
|
169
|
+
],
|
170
|
+
"svelte/mustache-spacing": [
|
171
|
+
ERROR,
|
172
|
+
{
|
173
|
+
textExpressions: Never /* or ALWAYS */,
|
174
|
+
attributesAndProps: Never /* or ALWAYS */,
|
175
|
+
directiveExpressions: Never /* or ALWAYS */,
|
176
|
+
tags: {
|
177
|
+
openingBrace: Never /* or ALWAYS */,
|
178
|
+
closingBrace: Never /* or ALWAYS or "always-after-expression" */,
|
179
|
+
},
|
180
|
+
},
|
181
|
+
],
|
182
|
+
"svelte/no-extra-reactive-curlies": ERROR,
|
183
|
+
"svelte/no-restricted-html-elements": OFF,
|
184
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": ERROR,
|
185
|
+
"svelte/prefer-class-directive": [
|
186
|
+
ERROR,
|
187
|
+
{
|
188
|
+
prefer: "empty",
|
189
|
+
},
|
190
|
+
],
|
191
|
+
"svelte/prefer-style-directive": ERROR,
|
192
|
+
"svelte/shorthand-attribute": [
|
193
|
+
ERROR,
|
194
|
+
{
|
195
|
+
prefer: Always,
|
196
|
+
},
|
197
|
+
],
|
198
|
+
"svelte/shorthand-directive": [
|
199
|
+
ERROR,
|
200
|
+
{
|
201
|
+
prefer: Always,
|
202
|
+
},
|
203
|
+
],
|
204
|
+
"svelte/sort-attributes": OFF /* INVESTIGATE: */,
|
205
|
+
"svelte/spaced-html-comment": [ERROR, Always],
|
206
|
+
|
207
|
+
// #endregion
|
208
|
+
|
209
|
+
// #region svelte-kit
|
210
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
|
211
|
+
"svelte/no-goto-without-base": ERROR,
|
212
|
+
|
213
|
+
// #endregion
|
214
|
+
|
215
|
+
// #region System (REQUIRED)
|
216
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
|
217
|
+
"svelte/comment-directive": [
|
218
|
+
ERROR,
|
219
|
+
{
|
220
|
+
reportUnusedDisableDirectives: true,
|
221
|
+
},
|
222
|
+
],
|
223
|
+
"svelte/system": ERROR,
|
224
|
+
|
225
|
+
// #endregion
|
226
|
+
|
227
|
+
},
|
228
|
+
] as const;
|
@@ -1,20 +1,20 @@
|
|
1
|
-
import { enable_x, level, state } from "../_strings.js";
|
2
|
-
|
3
|
-
const
|
4
|
-
{ ERROR, OFF } = level,
|
5
|
-
{ Allow, Both } = state;
|
6
|
-
|
7
|
-
export default [
|
8
|
-
enable_x,
|
9
|
-
{
|
10
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
|
11
|
-
"svelte/no-inner-declarations": [
|
12
|
-
ERROR,
|
13
|
-
Both,
|
14
|
-
{
|
15
|
-
blockScopedFunctions: Allow,
|
16
|
-
},
|
17
|
-
] /* Same options as in JsEnable */,
|
18
|
-
"svelte/no-trailing-spaces": OFF /* Only applies to HTML comments, which I don't intend to use: http://sveltejs.github.io/eslint-plugin-svelte/rules/no-trailing-spaces/ */,
|
19
|
-
},
|
20
|
-
] as const;
|
1
|
+
import { enable_x, level, state } from "../_strings.js";
|
2
|
+
|
3
|
+
const
|
4
|
+
{ ERROR, OFF } = level,
|
5
|
+
{ Allow, Both } = state;
|
6
|
+
|
7
|
+
export default [
|
8
|
+
enable_x,
|
9
|
+
{
|
10
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
|
11
|
+
"svelte/no-inner-declarations": [
|
12
|
+
ERROR,
|
13
|
+
Both,
|
14
|
+
{
|
15
|
+
blockScopedFunctions: Allow,
|
16
|
+
},
|
17
|
+
] /* Same options as in JsEnable */,
|
18
|
+
"svelte/no-trailing-spaces": OFF /* Only applies to HTML comments, which I don't intend to use: http://sveltejs.github.io/eslint-plugin-svelte/rules/no-trailing-spaces/ */,
|
19
|
+
},
|
20
|
+
] as const;
|
package/src/rules/svelte.ts
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
import TsRuleset from "./ts.js";
|
2
|
-
import DisableJS from "./svelte/disable_js.js";
|
3
|
-
import DisableTS from "./svelte/disable_ts.js";
|
4
|
-
import DisableX from "./svelte/disable.js";
|
5
|
-
import EnableX from "./svelte/enable_x.js";
|
6
|
-
import Enable from "./svelte/enable.js";
|
7
|
-
|
8
|
-
export default [
|
9
|
-
...TsRuleset,
|
10
|
-
DisableJS,
|
11
|
-
DisableTS,
|
12
|
-
DisableX,
|
13
|
-
EnableX,
|
14
|
-
Enable,
|
15
|
-
] as const;
|
1
|
+
import TsRuleset from "./ts.js";
|
2
|
+
import DisableJS from "./svelte/disable_js.js";
|
3
|
+
import DisableTS from "./svelte/disable_ts.js";
|
4
|
+
import DisableX from "./svelte/disable.js";
|
5
|
+
import EnableX from "./svelte/enable_x.js";
|
6
|
+
import Enable from "./svelte/enable.js";
|
7
|
+
|
8
|
+
export default [
|
9
|
+
...TsRuleset,
|
10
|
+
DisableJS,
|
11
|
+
DisableTS,
|
12
|
+
DisableX,
|
13
|
+
EnableX,
|
14
|
+
Enable,
|
15
|
+
] as const;
|
package/src/rules/ts/disable.ts
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
import { disable, OFF } from "../_strings.js";
|
2
|
-
|
3
|
-
export default [
|
4
|
-
disable,
|
5
|
-
{
|
6
|
-
// Handled by TypeScript compiler
|
7
|
-
"constructor-super": OFF,
|
8
|
-
"no-const-assign": OFF,
|
9
|
-
"no-dupe-args": OFF,
|
10
|
-
"no-dupe-class-members": OFF,
|
11
|
-
"no-dupe-keys": OFF,
|
12
|
-
"no-func-assign": OFF,
|
13
|
-
"no-obj-calls": OFF,
|
14
|
-
"no-setter-return": OFF,
|
15
|
-
"no-this-before-super": OFF,
|
16
|
-
"no-undef": OFF,
|
17
|
-
"no-unreachable": OFF,
|
18
|
-
"no-unsafe-negation": OFF,
|
19
|
-
"consistent-return": OFF,
|
20
|
-
"no-redeclare": OFF,
|
21
|
-
},
|
22
|
-
] as const;
|
1
|
+
import { disable, OFF } from "../_strings.js";
|
2
|
+
|
3
|
+
export default [
|
4
|
+
disable,
|
5
|
+
{
|
6
|
+
// Handled by TypeScript compiler
|
7
|
+
"constructor-super": OFF,
|
8
|
+
"no-const-assign": OFF,
|
9
|
+
"no-dupe-args": OFF,
|
10
|
+
"no-dupe-class-members": OFF,
|
11
|
+
"no-dupe-keys": OFF,
|
12
|
+
"no-func-assign": OFF,
|
13
|
+
"no-obj-calls": OFF,
|
14
|
+
"no-setter-return": OFF,
|
15
|
+
"no-this-before-super": OFF,
|
16
|
+
"no-undef": OFF,
|
17
|
+
"no-unreachable": OFF,
|
18
|
+
"no-unsafe-negation": OFF,
|
19
|
+
"consistent-return": OFF,
|
20
|
+
"no-redeclare": OFF,
|
21
|
+
},
|
22
|
+
] as const;
|
@@ -1,32 +1,32 @@
|
|
1
|
-
import { disable_x, OFF } from "../_strings.js";
|
2
|
-
|
3
|
-
export default [
|
4
|
-
disable_x,
|
5
|
-
{
|
6
|
-
// https://typescript-eslint.io/rules/?=extension-xdeprecated#rules
|
7
|
-
"class-methods-use-this": OFF,
|
8
|
-
"consistent-return": OFF,
|
9
|
-
"default-param-last": OFF,
|
10
|
-
"dot-notation": OFF,
|
11
|
-
"init-declarations": OFF,
|
12
|
-
"max-params": OFF,
|
13
|
-
"no-array-constructor": OFF,
|
14
|
-
"no-dupe-class-members": OFF,
|
15
|
-
"no-empty-function": OFF,
|
16
|
-
"no-implied-eval": OFF,
|
17
|
-
"no-invalid-this": OFF,
|
18
|
-
"no-loop-func": OFF,
|
19
|
-
"no-magic-numbers": OFF,
|
20
|
-
"no-redeclare": OFF,
|
21
|
-
"no-restricted-imports": OFF,
|
22
|
-
"no-shadow": OFF,
|
23
|
-
"no-throw-literal": OFF /* @typescript-eslint/only-throw-error */,
|
24
|
-
"no-unused-expressions": OFF,
|
25
|
-
"no-unused-vars": OFF,
|
26
|
-
"no-use-before-define": OFF,
|
27
|
-
"no-useless-constructor": OFF,
|
28
|
-
"prefer-destructuring": OFF,
|
29
|
-
"prefer-promise-reject-errors": OFF,
|
30
|
-
"require-await": OFF,
|
31
|
-
},
|
32
|
-
] as const;
|
1
|
+
import { disable_x, OFF } from "../_strings.js";
|
2
|
+
|
3
|
+
export default [
|
4
|
+
disable_x,
|
5
|
+
{
|
6
|
+
// https://typescript-eslint.io/rules/?=extension-xdeprecated#rules
|
7
|
+
"class-methods-use-this": OFF,
|
8
|
+
"consistent-return": OFF,
|
9
|
+
"default-param-last": OFF,
|
10
|
+
"dot-notation": OFF,
|
11
|
+
"init-declarations": OFF,
|
12
|
+
"max-params": OFF,
|
13
|
+
"no-array-constructor": OFF,
|
14
|
+
"no-dupe-class-members": OFF,
|
15
|
+
"no-empty-function": OFF,
|
16
|
+
"no-implied-eval": OFF,
|
17
|
+
"no-invalid-this": OFF,
|
18
|
+
"no-loop-func": OFF,
|
19
|
+
"no-magic-numbers": OFF,
|
20
|
+
"no-redeclare": OFF,
|
21
|
+
"no-restricted-imports": OFF,
|
22
|
+
"no-shadow": OFF,
|
23
|
+
"no-throw-literal": OFF /* @typescript-eslint/only-throw-error */,
|
24
|
+
"no-unused-expressions": OFF,
|
25
|
+
"no-unused-vars": OFF,
|
26
|
+
"no-use-before-define": OFF,
|
27
|
+
"no-useless-constructor": OFF,
|
28
|
+
"prefer-destructuring": OFF,
|
29
|
+
"prefer-promise-reject-errors": OFF,
|
30
|
+
"require-await": OFF,
|
31
|
+
},
|
32
|
+
] as const;
|