@eslinted/defaults 19.0.0 → 19.0.2

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.
@@ -0,0 +1,260 @@
1
+ export default {
2
+ rules: {
3
+ "stylistic/array-bracket-newline": 1,
4
+ "stylistic/array-bracket-spacing": 1,
5
+ "stylistic/array-element-newline": [
6
+ 1,
7
+ {
8
+ consistent: true,
9
+ multiline: true,
10
+ minItems: 3,
11
+ },
12
+ ],
13
+ "stylistic/arrow-parens": [
14
+ 1,
15
+ "as-needed",
16
+ ],
17
+ "stylistic/arrow-spacing": 1,
18
+ "stylistic/block-spacing": 1,
19
+ "stylistic/brace-style": [
20
+ 1,
21
+ "stroustrup",
22
+ {
23
+ allowSingleLine: true,
24
+ },
25
+ ],
26
+ "stylistic/comma-dangle": [
27
+ 1,
28
+ "always-multiline",
29
+ ],
30
+ "stylistic/comma-spacing": 1,
31
+ "stylistic/comma-style": 1,
32
+ "stylistic/computed-property-spacing": 1,
33
+ "stylistic/curly-newline": 1,
34
+ "stylistic/dot-location": [
35
+ 1,
36
+ "property",
37
+ ],
38
+ "stylistic/eol-last": 1,
39
+ "stylistic/function-call-argument-newline": [
40
+ 1,
41
+ "consistent",
42
+ ],
43
+ "stylistic/function-call-spacing": 1,
44
+ "stylistic/function-paren-newline": [
45
+ 1,
46
+ "multiline-arguments",
47
+ ],
48
+ "stylistic/generator-star-spacing": 1,
49
+ "stylistic/implicit-arrow-linebreak": 1,
50
+ "stylistic/indent": [
51
+ 1,
52
+ 2,
53
+ {
54
+ assignmentOperator: 0,
55
+ VariableDeclarator: {
56
+ var: 0,
57
+ let: 0,
58
+ const: 0,
59
+ },
60
+ outerIIFEBody: 0,
61
+ offsetTernaryExpressions: true,
62
+ },
63
+ ],
64
+ "stylistic/indent-binary-ops": [
65
+ 1,
66
+ 2,
67
+ ],
68
+ "stylistic/key-spacing": 1,
69
+ "stylistic/keyword-spacing": 1,
70
+ "stylistic/linebreak-style": 1,
71
+ "stylistic/lines-between-class-members": [
72
+ 1,
73
+ {
74
+ enforce: [
75
+ {
76
+ prev: "field",
77
+ next: "field",
78
+ blankLine: "never",
79
+ },
80
+ {
81
+ prev: "field",
82
+ next: "method",
83
+ blankLine: "always",
84
+ },
85
+ {
86
+ prev: "method",
87
+ next: "*",
88
+ blankLine: "always",
89
+ },
90
+ ],
91
+ },
92
+ ],
93
+ "stylistic/max-len": [
94
+ 1,
95
+ {
96
+ code: 300,
97
+ ignoreComments: true,
98
+ ignoreTrailingComments: true,
99
+ ignoreUrls: true,
100
+ ignoreStrings: true,
101
+ ignoreTemplateLiterals: true,
102
+ ignoreRegExpLiterals: true,
103
+ },
104
+ ],
105
+ "stylistic/max-statements-per-line": 1,
106
+ "stylistic/member-delimiter-style": 1,
107
+ "stylistic/multiline-ternary": [
108
+ 1,
109
+ "always-multiline",
110
+ ],
111
+ "stylistic/newline-per-chained-call": 1,
112
+ "stylistic/no-extra-parens": 1,
113
+ "stylistic/no-extra-semi": 1,
114
+ "stylistic/no-floating-decimal": 1,
115
+ "stylistic/no-mixed-spaces-and-tabs": 1,
116
+ "stylistic/no-multi-spaces": [
117
+ 1,
118
+ {
119
+ exceptions: {
120
+ Property: false,
121
+ ImportAttributes: false,
122
+ },
123
+ },
124
+ ],
125
+ "stylistic/no-multiple-empty-lines": [
126
+ 1,
127
+ {
128
+ max: 1,
129
+ maxBOF: 0,
130
+ maxEOF: 0,
131
+ },
132
+ ],
133
+ "stylistic/no-tabs": 1,
134
+ "stylistic/no-trailing-spaces": 1,
135
+ "stylistic/no-whitespace-before-property": 1,
136
+ "stylistic/nonblock-statement-body-position": [
137
+ 1,
138
+ "below",
139
+ ],
140
+ "stylistic/object-curly-newline": [
141
+ 1,
142
+ {
143
+ consistent: true,
144
+ multiline: true,
145
+ minProperties: 3,
146
+ },
147
+ ],
148
+ "stylistic/object-curly-spacing": [
149
+ 1,
150
+ "always",
151
+ {
152
+ emptyObjects: "never",
153
+ },
154
+ ],
155
+ "stylistic/object-property-newline": 1,
156
+ "stylistic/one-var-declaration-per-line": [
157
+ 1,
158
+ "always",
159
+ ],
160
+ "stylistic/operator-linebreak": [
161
+ 1,
162
+ "before",
163
+ ],
164
+ "stylistic/padded-blocks": [
165
+ 1,
166
+ "never",
167
+ {
168
+ allowSingleLineBlocks: true,
169
+ },
170
+ ],
171
+ "stylistic/quote-props": [
172
+ 1,
173
+ "as-needed",
174
+ {
175
+ keywords: true,
176
+ },
177
+ ],
178
+ "stylistic/quotes": [
179
+ 1,
180
+ "double",
181
+ {
182
+ avoidEscape: true,
183
+ allowTemplateLiterals: "always",
184
+ },
185
+ ],
186
+ "stylistic/rest-spread-spacing": 1,
187
+ "stylistic/semi": 1,
188
+ "stylistic/semi-spacing": 1,
189
+ "stylistic/semi-style": 1,
190
+ "stylistic/space-before-blocks": 1,
191
+ "stylistic/space-before-function-paren": [
192
+ 1,
193
+ {
194
+ named: "never",
195
+ },
196
+ ],
197
+ "stylistic/space-in-parens": 1,
198
+ "stylistic/space-infix-ops": 1,
199
+ "stylistic/space-unary-ops": 1,
200
+ "stylistic/spaced-comment": [
201
+ 1,
202
+ "always",
203
+ {
204
+ line: {
205
+ exceptions: [
206
+ "/",
207
+ "-",
208
+ "+",
209
+ "=",
210
+ ],
211
+ markers: [
212
+ "!",
213
+ "@",
214
+ "#",
215
+ "/",
216
+ "#region",
217
+ "#endregion",
218
+ "#part",
219
+ "/#region",
220
+ "/#endregion",
221
+ "/#part",
222
+ ],
223
+ },
224
+ block: {
225
+ exceptions: ["*"],
226
+ markers: ["*"],
227
+ balanced: true,
228
+ },
229
+ },
230
+ ],
231
+ "stylistic/switch-colon-spacing": 1,
232
+ "stylistic/template-curly-spacing": 1,
233
+ "stylistic/template-tag-spacing": 1,
234
+ "stylistic/type-annotation-spacing": [
235
+ 1,
236
+ {
237
+ before: true,
238
+ after: true,
239
+ overrides: {
240
+ colon: {
241
+ before: false,
242
+ after: true,
243
+ },
244
+ },
245
+ },
246
+ ],
247
+ "stylistic/type-generic-spacing": 1,
248
+ "stylistic/type-named-tuple-spacing": 1,
249
+ "stylistic/wrap-iife": [
250
+ 1,
251
+ "inside",
252
+ {
253
+ functionPrototypeMethods: true,
254
+ },
255
+ ],
256
+ "stylistic/wrap-regex": 1,
257
+ "stylistic/yield-star-spacing": 1,
258
+ },
259
+ };
260
+ //# sourceMappingURL=js.stylistic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js.stylistic.js","sourceRoot":"","sources":["../../src/rules/js.stylistic.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,KAAK,EAAE;QACL,iCAAiC,GAAY;QAC7C,iCAAiC,GAAY;QAC7C,iCAAiC,EAAE;;YAEjC;gBACE,UAAU,EAAE,IAAI;gBAChB,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,CAAC;aACZ;SACF;QACD,wBAAwB,EAAE;;YAExB,WAAW;SACZ;QACD,yBAAyB,GAAY;QACrC,yBAAyB,GAAY;QACrC,uBAAuB,EAAE;;YAEvB,YAAY;YACZ;gBACE,eAAe,EAAE,IAAI;aACtB;SACF;QACD,wBAAwB,EAAE;;YAExB,kBAAkB;SACnB;QACD,yBAAyB,GAAY;QACrC,uBAAuB,GAAY;QACnC,qCAAqC,GAAY;QACjD,yBAAyB,GAAY;QACrC,wBAAwB,EAAE;;YAExB,UAAU;SACX;QACD,oBAAoB,GAAY;QAChC,0CAA0C,EAAE;;YAE1C,YAAY;SACb;QACD,iCAAiC,GAAY;QAC7C,kCAAkC,EAAE;;YAElC,qBAAqB;SACtB;QACD,kCAAkC,GAAY;QAC9C,oCAAoC,GAAY;QAChD,kBAAkB,EAAE;;YAElB,CAAC;YACD;gBACE,kBAAkB,EAAE,CAAC;gBACrB,kBAAkB,EAAE;oBAClB,GAAG,EAAE,CAAC;oBACN,GAAG,EAAE,CAAC;oBACN,KAAK,EAAE,CAAC;iBACT;gBACD,aAAa,EAAE,CAAC;gBAChB,wBAAwB,EAAE,IAAI;aAC/B;SACF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AI;gBACZ,KAAK,EAAE,IAAI;gBACX,SAAS,EAAE;oBACT,KAAK,EAAE;wBACL,MAAM,EAAE,KAAK;wBACb,KAAK,EAAE,IAAI;qBACZ;iBACF;aACF;SACF;QACD,gCAAgC,GAAY;QAC5C,oCAAoC,GAAY;QAChD,qBAAqB,EAAE;;YAErB,QAAQ;YACR;gBACE,wBAAwB,EAAE,IAAI;aAC/B;SACF;QACD,sBAAsB,GAAY;QAClC,8BAA8B,GAAY;KAClC;CACX,CAAC"}
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  readonly "no-unused-vars": State.OFF;
7
7
  readonly "ts/no-unused-vars": State.OFF;
8
8
  readonly "prefer-const": State.OFF;
9
+ readonly "stylistic/indent": State.OFF;
9
10
  readonly "ts/no-confusing-void-expression": State.OFF;
10
11
  };
11
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"disable.d.ts","sourceRoot":"","sources":["../../../src/rules/svelte/disable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;AAGjC,wBAWE"}
1
+ {"version":3,"file":"disable.d.ts","sourceRoot":"","sources":["../../../src/rules/svelte/disable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;AAGjC,wBAaE"}
@@ -5,6 +5,7 @@ export default {
5
5
  "no-unused-vars": 0,
6
6
  "ts/no-unused-vars": 0,
7
7
  "prefer-const": 0,
8
+ "stylistic/indent": 0,
8
9
  "ts/no-confusing-void-expression": 0,
9
10
  },
10
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"disable.js","sourceRoot":"","sources":["../../../src/rules/svelte/disable.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,KAAK,EAAE;QAEL,uBAAuB,GAAW;QAClC,gBAAgB,GAAW;QAC3B,gBAAgB,GAAW;QAC3B,mBAAmB,GAAW;QAC9B,cAAc,GAAW;QAEzB,iCAAiC,GAAW;KACpC;CACX,CAAC"}
1
+ {"version":3,"file":"disable.js","sourceRoot":"","sources":["../../../src/rules/svelte/disable.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,KAAK,EAAE;QAEL,uBAAuB,GACZ;QACX,gBAAgB,GAAW;QAC3B,gBAAgB,GAAW;QAC3B,mBAAmB,GAAW;QAC9B,cAAc,GAAW;QAEzB,kBAAkB,GAAW;QAC7B,iCAAiC,GAAW;KACpC;CACX,CAAC"}
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  State.ON,
7
7
  "both"
8
8
  ];
9
+ readonly "stylistic/no-trailing-spaces": State.OFF;
9
10
  readonly "svelte/no-trailing-spaces": State.WARN;
10
11
  };
11
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"extend.d.ts","sourceRoot":"","sources":["../../../src/rules/svelte/extend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;;;;;;;;AAGjC,wBASE"}
1
+ {"version":3,"file":"extend.d.ts","sourceRoot":"","sources":["../../../src/rules/svelte/extend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;;;;;;;;;AAGjC,wBAUE"}
@@ -5,6 +5,7 @@ export default {
5
5
  2,
6
6
  "both",
7
7
  ],
8
+ "stylistic/no-trailing-spaces": 0,
8
9
  "svelte/no-trailing-spaces": 1,
9
10
  },
10
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"extend.js","sourceRoot":"","sources":["../../../src/rules/svelte/extend.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,KAAK,EAAE;QACW,uBAAuB,GAAW;QAClD,8BAA8B,EAAE;;YAE9B,MAAM;SACP;QACD,2BAA2B,GAAY;KAC/B;CACX,CAAC"}
1
+ {"version":3,"file":"extend.js","sourceRoot":"","sources":["../../../src/rules/svelte/extend.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,KAAK,EAAE;QACW,uBAAuB,GAAW;QAClD,8BAA8B,EAAE;;YAE9B,MAAM;SACP;QACe,8BAA8B,GAAW;QACzD,2BAA2B,GAAY;KAC/B;CACX,CAAC"}
@@ -5,6 +5,7 @@ declare const _default: ({
5
5
  readonly "no-unused-vars": import("../state.js").State.OFF;
6
6
  readonly "ts/no-unused-vars": import("../state.js").State.OFF;
7
7
  readonly "prefer-const": import("../state.js").State.OFF;
8
+ readonly "stylistic/indent": import("../state.js").State.OFF;
8
9
  readonly "ts/no-confusing-void-expression": import("../state.js").State.OFF;
9
10
  };
10
11
  } | {
@@ -123,6 +124,7 @@ declare const _default: ({
123
124
  import("../state.js").State.ON,
124
125
  "both"
125
126
  ];
127
+ readonly "stylistic/no-trailing-spaces": import("../state.js").State.OFF;
126
128
  readonly "svelte/no-trailing-spaces": import("../state.js").State.WARN;
127
129
  };
128
130
  })[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/svelte/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAIE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/svelte/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAIE"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "$schema": "https://json.schemastore.org/package",
4
4
  "$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
5
5
  "name": "@eslinted/defaults",
6
- "version": "19.0.0",
6
+ "version": "19.0.2",
7
7
  "repository": "github:jimmy-zhening-luo/linted-defaults",
8
8
  "description": "Default scopes for `linted`",
9
9
  "keywords": [],
@@ -0,0 +1,269 @@
1
+ import { State } from "./state";
2
+
3
+ // DOC: https://eslint.style/rules
4
+ export default {
5
+ rules: {
6
+ "stylistic/array-bracket-newline": State.WARN,
7
+ "stylistic/array-bracket-spacing": State.WARN,
8
+ "stylistic/array-element-newline": [
9
+ State.WARN,
10
+ {
11
+ consistent: true,
12
+ multiline: true,
13
+ minItems: 3,
14
+ },
15
+ ],
16
+ "stylistic/arrow-parens": [
17
+ State.WARN,
18
+ "as-needed",
19
+ ],
20
+ "stylistic/arrow-spacing": State.WARN,
21
+ "stylistic/block-spacing": State.WARN,
22
+ "stylistic/brace-style": [
23
+ State.WARN,
24
+ "stroustrup",
25
+ {
26
+ allowSingleLine: true,
27
+ },
28
+ ],
29
+ "stylistic/comma-dangle": [
30
+ State.WARN,
31
+ "always-multiline",
32
+ ],
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
+ "stylistic/dot-location": [
38
+ State.WARN,
39
+ "property",
40
+ ],
41
+ "stylistic/eol-last": State.WARN,
42
+ "stylistic/function-call-argument-newline": [
43
+ State.WARN,
44
+ "consistent",
45
+ ],
46
+ "stylistic/function-call-spacing": State.WARN,
47
+ "stylistic/function-paren-newline": [
48
+ State.WARN,
49
+ "multiline-arguments",
50
+ ], /* BUG: https://github.com/eslint-stylistic/eslint-stylistic/issues/290 */
51
+ "stylistic/generator-star-spacing": State.WARN,
52
+ "stylistic/implicit-arrow-linebreak": State.WARN,
53
+ "stylistic/indent": [
54
+ State.WARN,
55
+ 2,
56
+ {
57
+ assignmentOperator: 0,
58
+ VariableDeclarator: {
59
+ var: 0,
60
+ let: 0,
61
+ const: 0,
62
+ },
63
+ outerIIFEBody: 0,
64
+ offsetTernaryExpressions: true,
65
+ },
66
+ ],
67
+ "stylistic/indent-binary-ops": [
68
+ State.WARN,
69
+ 2, /* MUST be same as `stylistic/indent`[1] */
70
+ ],
71
+ "stylistic/key-spacing": State.WARN,
72
+ "stylistic/keyword-spacing": State.WARN,
73
+ // "stylistic/line-comment-position": State.OFF,
74
+ "stylistic/linebreak-style": State.WARN,
75
+ // "stylistic/lines-around-comment": State.OFF,
76
+ "stylistic/lines-between-class-members": [
77
+ State.WARN,
78
+ {
79
+ enforce: [
80
+ {
81
+ prev: "field",
82
+ next: "field",
83
+ blankLine: "never",
84
+ },
85
+ {
86
+ prev: "field",
87
+ next: "method",
88
+ blankLine: "always",
89
+ },
90
+ {
91
+ prev: "method",
92
+ next: "*",
93
+ blankLine: "always",
94
+ },
95
+ ],
96
+ },
97
+ ],
98
+ "stylistic/max-len": [
99
+ State.WARN,
100
+ {
101
+ code: 300,
102
+ ignoreComments: true,
103
+ ignoreTrailingComments: true,
104
+ ignoreUrls: true,
105
+ ignoreStrings: true,
106
+ ignoreTemplateLiterals: true,
107
+ ignoreRegExpLiterals: true,
108
+ },
109
+ ],
110
+ "stylistic/max-statements-per-line": State.WARN,
111
+ "stylistic/member-delimiter-style": State.WARN,
112
+ // "stylistic/multiline-comment-style": State.OFF,
113
+ "stylistic/multiline-ternary": [
114
+ State.WARN,
115
+ "always-multiline",
116
+ ],
117
+ // "stylistic/new-parens": State.OFF,
118
+ "stylistic/newline-per-chained-call": State.WARN,
119
+ // "stylistic/no-confusing-arrow": State.OFF,
120
+ "stylistic/no-extra-parens": State.WARN,
121
+ "stylistic/no-extra-semi": State.WARN,
122
+ "stylistic/no-floating-decimal": State.WARN,
123
+ // "stylistic/no-mixed-operators": State.OFF,
124
+ "stylistic/no-mixed-spaces-and-tabs": State.WARN,
125
+ "stylistic/no-multi-spaces": [
126
+ State.WARN,
127
+ {
128
+ exceptions: {
129
+ Property: false,
130
+ ImportAttributes: false,
131
+ },
132
+ },
133
+ ],
134
+ "stylistic/no-multiple-empty-lines": [
135
+ State.WARN,
136
+ {
137
+ max: 1,
138
+ maxBOF: 0,
139
+ maxEOF: 0, /* INFO: combine with `eol-last` to ensure file still ends with a single line-break (eol character) */
140
+ },
141
+ ],
142
+ "stylistic/no-tabs": State.WARN,
143
+ "stylistic/no-trailing-spaces": State.WARN,
144
+ "stylistic/no-whitespace-before-property": State.WARN,
145
+ "stylistic/nonblock-statement-body-position": [
146
+ State.WARN,
147
+ "below",
148
+ ],
149
+ "stylistic/object-curly-newline": [
150
+ State.WARN,
151
+ {
152
+ consistent: true,
153
+ multiline: true,
154
+ minProperties: 3,
155
+ },
156
+ ],
157
+ "stylistic/object-curly-spacing": [
158
+ State.WARN,
159
+ "always",
160
+ {
161
+ emptyObjects: "never",
162
+ },
163
+ ],
164
+ "stylistic/object-property-newline": State.WARN,
165
+ "stylistic/one-var-declaration-per-line": [
166
+ State.WARN,
167
+ "always",
168
+ ],
169
+ "stylistic/operator-linebreak": [
170
+ State.WARN,
171
+ "before",
172
+ ],
173
+ "stylistic/padded-blocks": [
174
+ State.WARN,
175
+ "never",
176
+ {
177
+ allowSingleLineBlocks: true,
178
+ },
179
+ ],
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 */,
181
+ "stylistic/quote-props": [
182
+ State.WARN,
183
+ "as-needed",
184
+ {
185
+ keywords: true,
186
+ },
187
+ ],
188
+ "stylistic/quotes": [
189
+ State.WARN,
190
+ "double",
191
+ {
192
+ avoidEscape: true,
193
+ allowTemplateLiterals: "always",
194
+ },
195
+ ],
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,
201
+ "stylistic/space-before-function-paren": [
202
+ State.WARN,
203
+ {
204
+ named: "never",
205
+ },
206
+ ],
207
+ "stylistic/space-in-parens": State.WARN,
208
+ "stylistic/space-infix-ops": State.WARN,
209
+ "stylistic/space-unary-ops": State.WARN,
210
+ "stylistic/spaced-comment": [
211
+ State.WARN,
212
+ "always",
213
+ {
214
+ line: {
215
+ exceptions: [
216
+ "/",
217
+ "-",
218
+ "+",
219
+ "=",
220
+ ],
221
+ markers: [
222
+ "!",
223
+ "@",
224
+ "#",
225
+ "/",
226
+ "#region",
227
+ "#endregion",
228
+ "#part",
229
+ "/#region",
230
+ "/#endregion",
231
+ "/#part",
232
+ ],
233
+ },
234
+ block: {
235
+ exceptions: ["*"],
236
+ markers: ["*"],
237
+ balanced: true,
238
+ },
239
+ },
240
+ ],
241
+ "stylistic/switch-colon-spacing": State.WARN,
242
+ "stylistic/template-curly-spacing": State.WARN,
243
+ "stylistic/template-tag-spacing": State.WARN,
244
+ "stylistic/type-annotation-spacing": [
245
+ State.WARN,
246
+ {
247
+ before: true,
248
+ after: true,
249
+ overrides: {
250
+ colon: {
251
+ before: false,
252
+ after: true,
253
+ },
254
+ },
255
+ }, /* BUG: non-overriden rule affects all type annotations (arrows, "as" keyword, "satisfies" keyword) except colons */
256
+ ],
257
+ "stylistic/type-generic-spacing": State.WARN,
258
+ "stylistic/type-named-tuple-spacing": State.WARN,
259
+ "stylistic/wrap-iife": [
260
+ State.WARN,
261
+ "inside",
262
+ {
263
+ functionPrototypeMethods: true,
264
+ },
265
+ ],
266
+ "stylistic/wrap-regex": State.WARN,
267
+ "stylistic/yield-star-spacing": State.WARN,
268
+ } as const,
269
+ };
package/src/rules/js.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  import eslint from "./js.eslint";
2
+ import stylistic from "./js.stylistic";
2
3
 
3
- export default [eslint];
4
+ export default [
5
+ eslint,
6
+ stylistic,
7
+ ];
@@ -4,12 +4,14 @@ import { State } from "../state";
4
4
  export default {
5
5
  rules: {
6
6
  // ESLint core rules known to cause problems with `.svelte`.
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
- "no-self-assign": State.OFF /* Self assign is one of way to update reactive value in Svelte. */,
9
- "no-unused-vars": State.OFF /* breaks use of svelte global */,
10
- "ts/no-unused-vars": State.OFF /* breaks use of svelte global */,
11
- "prefer-const": State.OFF /* svelte/prefer-const */,
7
+ "no-inner-declarations":
8
+ 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 */
9
+ "no-self-assign": State.OFF, /* Self assign is one of way to update reactive value in Svelte. */
10
+ "no-unused-vars": State.OFF, /* breaks use of svelte global */
11
+ "ts/no-unused-vars": State.OFF, /* breaks use of svelte global */
12
+ "prefer-const": State.OFF, /* svelte/prefer-const */
12
13
  // My own
13
- "ts/no-confusing-void-expression": State.OFF /* @CONFLICT: errors on render() */,
14
+ "stylistic/indent": State.OFF, /* @CONFLICT: with `svelte/indent` */
15
+ "ts/no-confusing-void-expression": State.OFF, /* @CONFLICT: errors on render() */
14
16
  } as const,
15
17
  };
@@ -3,11 +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
- /* @OVERRIDE */ "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
- ] /* same options: no-inner-declarations */,
10
+ ], /* same options: no-inner-declarations */
11
+ /* @OVERRIDE */ "stylistic/no-trailing-spaces": State.OFF, /* replaces `no-trailing-spaces` */
11
12
  "svelte/no-trailing-spaces": State.WARN,
12
13
  } as const,
13
14
  };