linted 16.3.2 → 16.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. package/.github/workflows/RELEASE.yml +35 -0
  2. package/.github/workflows/rc.yml +35 -0
  3. package/LICENSE +21 -21
  4. package/README.md +388 -388
  5. package/SECURITY.md +9 -9
  6. package/dist/imports/plugins/index.d.ts.map +1 -1
  7. package/eslint.config.js +3 -3
  8. package/package.json +99 -99
  9. package/src/declarations/markdownlint/index.d.ts +3 -3
  10. package/src/declarations/markdownlint/parser.d.ts +9 -9
  11. package/src/declarations/mocha/index.d.ts +8 -8
  12. package/src/imports/index.ts +4 -4
  13. package/src/imports/parsers/index.ts +16 -16
  14. package/src/imports/plugins/index.ts +20 -20
  15. package/src/index.ts +34 -34
  16. package/src/statics/files/html/index.ts +1 -1
  17. package/src/statics/files/index.ts +22 -22
  18. package/src/statics/files/js/index.ts +1 -1
  19. package/src/statics/files/json/index.ts +1 -1
  20. package/src/statics/files/jsonc/index.ts +4 -4
  21. package/src/statics/files/md/index.ts +1 -1
  22. package/src/statics/files/mocha/index.ts +1 -1
  23. package/src/statics/files/svelte/index.ts +1 -1
  24. package/src/statics/files/ts/index.ts +5 -5
  25. package/src/statics/files/yml/index.ts +5 -5
  26. package/src/statics/index.ts +4 -4
  27. package/src/statics/rules/index.ts +22 -22
  28. package/src/statics/rules/presets/Html.ts +5 -5
  29. package/src/statics/rules/presets/Js.ts +5 -5
  30. package/src/statics/rules/presets/Json.ts +5 -5
  31. package/src/statics/rules/presets/Jsonc.ts +5 -5
  32. package/src/statics/rules/presets/Md.ts +4 -4
  33. package/src/statics/rules/presets/Mocha.ts +5 -5
  34. package/src/statics/rules/presets/Svelte.ts +16 -16
  35. package/src/statics/rules/presets/Ts.ts +14 -14
  36. package/src/statics/rules/presets/Yml.ts +5 -5
  37. package/src/statics/rules/presets/html/Enable.ts +5 -5
  38. package/src/statics/rules/presets/html/Recommended.ts +7 -7
  39. package/src/statics/rules/presets/index.ts +10 -10
  40. package/src/statics/rules/presets/js/Enable.ts +288 -288
  41. package/src/statics/rules/presets/js/EnableStylistic.ts +288 -288
  42. package/src/statics/rules/presets/json/Enable.ts +33 -33
  43. package/src/statics/rules/presets/json/EnableX.ts +51 -51
  44. package/src/statics/rules/presets/jsonc/OverrideJson.ts +6 -6
  45. package/src/statics/rules/presets/md/Enable.ts +23 -23
  46. package/src/statics/rules/presets/mocha/Enable.ts +5 -5
  47. package/src/statics/rules/presets/mocha/Recommended.ts +7 -7
  48. package/src/statics/rules/presets/svelte/DisableJS.ts +7 -7
  49. package/src/statics/rules/presets/svelte/DisableTS.ts +5 -5
  50. package/src/statics/rules/presets/svelte/DisableX.ts +6 -6
  51. package/src/statics/rules/presets/svelte/Enable.ts +130 -130
  52. package/src/statics/rules/presets/svelte/EnableX.ts +6 -6
  53. package/src/statics/rules/presets/ts/DisableCompiler.ts +23 -23
  54. package/src/statics/rules/presets/ts/DisableX.ts +34 -34
  55. package/src/statics/rules/presets/ts/Enable.ts +407 -407
  56. package/src/statics/rules/presets/ts/EnableX.ts +87 -87
  57. package/src/statics/rules/presets/yml/Enable.ts +30 -30
  58. package/src/statics/rules/presets/yml/EnableX.ts +18 -18
  59. package/src/statics/rules/strings/id/index.ts +17 -17
  60. package/src/statics/rules/strings/index.ts +6 -6
  61. package/src/statics/rules/strings/level/index.ts +5 -5
  62. package/src/statics/rules/strings/state/index.ts +55 -55
  63. package/tsconfig.json +160 -160
@@ -1,288 +1,288 @@
1
- import { Strings, type RuleEntry } from "../index.js";
2
-
3
- const {
4
- Id: { Stylistic },
5
- Level: { ERROR, OFF },
6
- State: {
7
- NEVER,
8
- ALWAYS,
9
- ALWAYS_MULTILINE,
10
- CONSISTENT,
11
- AS_NEEDED,
12
- STRICT,
13
- ALL,
14
- STAR,
15
- LAST,
16
- BEFORE,
17
- AFTER,
18
- BELOW,
19
- BESIDE,
20
- INSIDE,
21
- DOUBLE,
22
- },
23
- } = Strings;
24
-
25
- export default [
26
- Stylistic,
27
- {
28
- // https://eslint.style/rules
29
- "@stylistic/array-bracket-newline": [ERROR, { multiline: true, minItems: null }],
30
- "@stylistic/array-bracket-spacing": [ERROR, NEVER, { singleValue: false, objectsInArrays: false, arraysInArrays: false }],
31
- "@stylistic/array-element-newline": [
32
- ERROR,
33
- {
34
- ArrayExpression: { consistent: true, multiline: true, minItems: 4 },
35
- ArrayPattern: { consistent: true, multiline: true, minItems: 4 },
36
- },
37
- ],
38
- "@stylistic/arrow-parens": [ERROR, AS_NEEDED, { requireForBlockBody: false }],
39
- "@stylistic/arrow-spacing": [ERROR, { before: true, after: true }],
40
- "@stylistic/block-spacing": [ERROR, ALWAYS],
41
- "@stylistic/brace-style": [ERROR, "stroustrup", { allowSingleLine: true }],
42
- "@stylistic/comma-dangle": [ERROR, ALWAYS_MULTILINE],
43
- "@stylistic/comma-spacing": [ERROR, { before: false, after: true }],
44
- "@stylistic/comma-style": [
45
- ERROR,
46
- LAST,
47
- {
48
- exceptions: {
49
- ArrayExpression: false,
50
- ArrayPattern: false,
51
- ArrowFunctionExpression: false,
52
- CallExpression: false,
53
- FunctionDeclaration: false,
54
- FunctionExpression: false,
55
- ImportDeclaration: false,
56
- ObjectExpression: false,
57
- ObjectPattern: false,
58
- VariableDeclaration: false,
59
- NewExpression: false,
60
- },
61
- },
62
- ],
63
- "@stylistic/computed-property-spacing": [ERROR, NEVER, { enforceForClassMembers: true }],
64
- "@stylistic/dot-location": [ERROR, "property"],
65
- "@stylistic/eol-last": [ERROR, ALWAYS],
66
- "@stylistic/function-call-argument-newline": [ERROR, CONSISTENT],
67
- "@stylistic/function-call-spacing": [ERROR, NEVER],
68
-
69
- "@stylistic/function-paren-newline": [ERROR, "multiline-arguments"], // BUG: https://github.com/eslint-stylistic/eslint-stylistic/issues/290
70
- "@stylistic/generator-star-spacing": [ERROR, { before: true, after: false }],
71
- "@stylistic/implicit-arrow-linebreak": [ERROR, BESIDE],
72
- "@stylistic/indent": [
73
- ERROR,
74
- 2,
75
- {
76
- ignoredNodes: [],
77
- SwitchCase: 1,
78
- VariableDeclarator: { "var": 0, let: 0, "const": 0 },
79
- outerIIFEBody: 0,
80
- MemberExpression: 1,
81
- FunctionDeclaration: { parameters: 1, body: 1 },
82
- FunctionExpression: { parameters: 1, body: 1 },
83
- StaticBlock: { body: 1 },
84
- CallExpression: { arguments: 1 },
85
- ArrayExpression: 1,
86
- ObjectExpression: 1,
87
- ImportDeclaration: 1,
88
- flatTernaryExpressions: false,
89
- offsetTernaryExpressions: true,
90
- ignoreComments: false,
91
- },
92
- ],
93
- "@stylistic/indent-binary-ops": [ERROR, 2],
94
- "@stylistic/key-spacing": [ERROR, { beforeColon: false, afterColon: true, mode: STRICT }],
95
- "@stylistic/keyword-spacing": [ERROR, { before: true, after: true, overrides: {} }],
96
- "@stylistic/line-comment-position": OFF,
97
- "@stylistic/lines-around-comment": [
98
- ERROR,
99
- {
100
- beforeBlockComment: false,
101
- afterBlockComment: false,
102
- beforeLineComment: true,
103
- afterLineComment: false,
104
- allowBlockStart: true,
105
- allowBlockEnd: true,
106
- allowObjectStart: true,
107
- allowObjectEnd: true,
108
- allowArrayStart: true,
109
- allowArrayEnd: true,
110
- allowClassStart: true,
111
- allowClassEnd: true,
112
- applyDefaultIgnorePatterns: true,
113
- afterHashbangComment: false,
114
-
115
- /* TS-only */
116
- allowEnumEnd: true,
117
- allowEnumStart: true,
118
- allowInterfaceEnd: true,
119
- allowInterfaceStart: true,
120
- allowModuleEnd: true,
121
- allowModuleStart: true,
122
- allowTypeEnd: true,
123
- allowTypeStart: true,
124
- },
125
- ],
126
- "@stylistic/lines-between-class-members": [
127
- ERROR,
128
- {
129
- enforce: [
130
- { blankLine: NEVER, prev: "field", next: "field" },
131
- { blankLine: ALWAYS, prev: "field", next: "method" },
132
- { blankLine: ALWAYS, prev: "method", next: STAR },
133
- ],
134
- },
135
- { exceptAfterSingleLine: false, exceptAfterOverload: true /* TS-only */ },
136
- ],
137
- "@stylistic/max-len": [
138
- ERROR,
139
- {
140
- code: 150,
141
- tabWidth: 2,
142
- ignoreComments: true,
143
- ignoreTrailingComments: true,
144
- ignoreUrls: true,
145
- ignoreStrings: true,
146
- ignoreTemplateLiterals: true,
147
- ignoreRegExpLiterals: true,
148
- },
149
- ],
150
- "@stylistic/max-statements-per-line": [ERROR, { max: 1 }],
151
- "@stylistic/member-delimiter-style": [
152
- ERROR,
153
- {
154
- multiline: { delimiter: "semi", requireLast: true },
155
- singleline: { delimiter: "semi", requireLast: false },
156
- multilineDetection: "brackets",
157
- },
158
- ],
159
- "@stylistic/multiline-comment-style": OFF,
160
- "@stylistic/multiline-ternary": [ERROR, ALWAYS_MULTILINE],
161
- "@stylistic/new-parens": [ERROR, NEVER],
162
- "@stylistic/newline-per-chained-call": [ERROR, { ignoreChainWithDepth: 2 }],
163
- "@stylistic/no-confusing-arrow": OFF,
164
- "@stylistic/no-extra-parens": [
165
- ERROR,
166
- ALL,
167
- {
168
- conditionalAssign: true,
169
- returnAssign: true,
170
- nestedBinaryExpressions: true,
171
- ternaryOperandBinaryExpressions: true,
172
- enforceForArrowConditionals: true,
173
- enforceForSequenceExpressions: true,
174
- enforceForNewInMemberExpressions: true,
175
- enforceForFunctionPrototypeMethods: true,
176
- },
177
- ],
178
- "@stylistic/no-extra-semi": ERROR,
179
- "@stylistic/no-floating-decimal": ERROR,
180
- "@stylistic/no-mixed-operators": OFF,
181
- "@stylistic/no-mixed-spaces-and-tabs": ERROR,
182
- "@stylistic/no-multi-spaces": [ERROR, { ignoreEOLComments: false, exceptions: { Property: false }, includeTabs: true }],
183
- "@stylistic/no-multiple-empty-lines": [ERROR, { max: 1, maxEOF: 1, maxBOF: 0 }],
184
- "@stylistic/no-tabs": [ERROR, { allowIndentationTabs: false }],
185
- "@stylistic/no-trailing-spaces": [ERROR, { skipBlankLines: false, ignoreComments: false }],
186
- "@stylistic/no-whitespace-before-property": ERROR,
187
- "@stylistic/nonblock-statement-body-position": [
188
- ERROR,
189
- BELOW,
190
- {
191
- overrides: {
192
- "if": BELOW,
193
- "else": BELOW,
194
- "while": BELOW,
195
- "do": BELOW,
196
- "for": BELOW,
197
- },
198
- },
199
- ],
200
- "@stylistic/object-curly-newline": [
201
- ERROR,
202
- {
203
- ObjectExpression: { consistent: true, multiline: true, minProperties: 4 },
204
- ObjectPattern: { consistent: true, multiline: true, minProperties: 4 },
205
- ImportDeclaration: { consistent: true, multiline: true, minProperties: 4 },
206
- ExportDeclaration: { consistent: true, multiline: true, minProperties: 4 },
207
- },
208
- ],
209
- "@stylistic/object-curly-spacing": [ERROR, ALWAYS, { arraysInObjects: true, objectsInObjects: true }],
210
- "@stylistic/object-property-newline": [ERROR, { allowAllPropertiesOnSameLine: true }],
211
- "@stylistic/one-var-declaration-per-line": [ERROR, ALWAYS],
212
- "@stylistic/operator-linebreak": [ERROR, BEFORE, { overrides: { "=": AFTER } }],
213
- "@stylistic/padded-blocks": [ERROR, { blocks: NEVER, classes: NEVER, switches: NEVER }, { allowSingleLineBlocks: true }],
214
- "@stylistic/padding-line-between-statements": [
215
- ERROR,
216
- { blankLine: ALWAYS, prev: "directive", next: STAR },
217
- { blankLine: NEVER, prev: "directive", next: "directive" },
218
- { blankLine: ALWAYS, prev: ["import", "cjs-import"], next: STAR },
219
- { blankLine: NEVER, prev: ["import", "cjs-import"], next: ["import", "cjs-import"] },
220
- {
221
- blankLine: ALWAYS,
222
- prev: [
223
- "class",
224
- "interface",
225
- "try",
226
- "for",
227
- "if",
228
- "do",
229
- "while",
230
- "switch",
231
- "block",
232
- "block-like",
233
- "iife",
234
- "empty",
235
- "debugger",
236
- "with",
237
- ],
238
- next: STAR,
239
- },
240
- { blankLine: ALWAYS, prev: "case", next: STAR },
241
- { blankLine: ALWAYS, prev: "case", next: ["case", "default"] },
242
- { blankLine: ALWAYS, prev: "default", next: STAR },
243
- { blankLine: ALWAYS, prev: "type", next: STAR },
244
- { blankLine: NEVER, prev: "type", next: "type" },
245
- { blankLine: ALWAYS, prev: "function", next: STAR },
246
- { blankLine: ALWAYS, prev: "function-overload", next: STAR },
247
- { blankLine: NEVER, prev: "function-overload", next: "function-overload" },
248
- { blankLine: NEVER, prev: "function-overload", next: "function" },
249
- { blankLine: ALWAYS, prev: ["const", "let", "var"], next: STAR },
250
- { blankLine: NEVER, prev: ["const", "let", "var"], next: ["const", "let", "var"] },
251
- { blankLine: ALWAYS, prev: "expression", next: STAR },
252
- { blankLine: NEVER, prev: "expression", next: "expression" },
253
- {
254
- blankLine: ALWAYS,
255
- prev: STAR,
256
- next: [
257
- "throw",
258
- "return",
259
- "break",
260
- "continue",
261
- ],
262
- },
263
- { blankLine: ALWAYS, prev: STAR, next: ["export", "cjs-export"] },
264
- { blankLine: NEVER, prev: ["export", "cjs-export"], next: ["export", "cjs-export"] },
265
- ],
266
- "@stylistic/quote-props": [ERROR, AS_NEEDED, { keywords: true, unnecessary: true, numbers: false }],
267
- "@stylistic/quotes": [ERROR, DOUBLE, { avoidEscape: true, allowTemplateLiterals: true }],
268
- "@stylistic/rest-spread-spacing": [ERROR, NEVER],
269
- "@stylistic/semi": [ERROR, ALWAYS, { omitLastInOneLineBlock: false, omitLastInOneLineClassBody: false }],
270
- "@stylistic/semi-spacing": [ERROR, { before: false, after: true }],
271
- "@stylistic/semi-style": [ERROR, LAST],
272
- "@stylistic/space-before-blocks": [ERROR, { functions: ALWAYS, keywords: ALWAYS, classes: ALWAYS }],
273
- "@stylistic/space-before-function-paren": [ERROR, { anonymous: ALWAYS, named: NEVER, asyncArrow: ALWAYS }],
274
- "@stylistic/space-in-parens": [ERROR, NEVER],
275
- "@stylistic/space-infix-ops": [ERROR, { int32Hint: true }],
276
- "@stylistic/space-unary-ops": [ERROR, { words: true, nonwords: false, overrides: {} }],
277
- "@stylistic/spaced-comment": [ERROR, ALWAYS],
278
- "@stylistic/switch-colon-spacing": [ERROR, { after: true, before: false }],
279
- "@stylistic/template-curly-spacing": [ERROR, NEVER],
280
- "@stylistic/template-tag-spacing": [ERROR, NEVER],
281
- "@stylistic/type-annotation-spacing": [ERROR, { before: false, after: true }],
282
- "@stylistic/type-generic-spacing": ERROR,
283
- "@stylistic/type-named-tuple-spacing": ERROR,
284
- "@stylistic/wrap-iife": [ERROR, INSIDE, { functionPrototypeMethods: true }],
285
- "@stylistic/wrap-regex": ERROR,
286
- "@stylistic/yield-star-spacing": [ERROR, { before: false, after: true }],
287
- },
288
- ] as const satisfies RuleEntry;
1
+ import { Strings, type RuleEntry } from "../index.js";
2
+
3
+ const {
4
+ Id: { Stylistic },
5
+ Level: { ERROR, OFF },
6
+ State: {
7
+ NEVER,
8
+ ALWAYS,
9
+ ALWAYS_MULTILINE,
10
+ CONSISTENT,
11
+ AS_NEEDED,
12
+ STRICT,
13
+ ALL,
14
+ STAR,
15
+ LAST,
16
+ BEFORE,
17
+ AFTER,
18
+ BELOW,
19
+ BESIDE,
20
+ INSIDE,
21
+ DOUBLE,
22
+ },
23
+ } = Strings;
24
+
25
+ export default [
26
+ Stylistic,
27
+ {
28
+ // https://eslint.style/rules
29
+ "@stylistic/array-bracket-newline": [ERROR, { multiline: true, minItems: null }],
30
+ "@stylistic/array-bracket-spacing": [ERROR, NEVER, { singleValue: false, objectsInArrays: false, arraysInArrays: false }],
31
+ "@stylistic/array-element-newline": [
32
+ ERROR,
33
+ {
34
+ ArrayExpression: { consistent: true, multiline: true, minItems: 4 },
35
+ ArrayPattern: { consistent: true, multiline: true, minItems: 4 },
36
+ },
37
+ ],
38
+ "@stylistic/arrow-parens": [ERROR, AS_NEEDED, { requireForBlockBody: false }],
39
+ "@stylistic/arrow-spacing": [ERROR, { before: true, after: true }],
40
+ "@stylistic/block-spacing": [ERROR, ALWAYS],
41
+ "@stylistic/brace-style": [ERROR, "stroustrup", { allowSingleLine: true }],
42
+ "@stylistic/comma-dangle": [ERROR, ALWAYS_MULTILINE],
43
+ "@stylistic/comma-spacing": [ERROR, { before: false, after: true }],
44
+ "@stylistic/comma-style": [
45
+ ERROR,
46
+ LAST,
47
+ {
48
+ exceptions: {
49
+ ArrayExpression: false,
50
+ ArrayPattern: false,
51
+ ArrowFunctionExpression: false,
52
+ CallExpression: false,
53
+ FunctionDeclaration: false,
54
+ FunctionExpression: false,
55
+ ImportDeclaration: false,
56
+ ObjectExpression: false,
57
+ ObjectPattern: false,
58
+ VariableDeclaration: false,
59
+ NewExpression: false,
60
+ },
61
+ },
62
+ ],
63
+ "@stylistic/computed-property-spacing": [ERROR, NEVER, { enforceForClassMembers: true }],
64
+ "@stylistic/dot-location": [ERROR, "property"],
65
+ "@stylistic/eol-last": [ERROR, ALWAYS],
66
+ "@stylistic/function-call-argument-newline": [ERROR, CONSISTENT],
67
+ "@stylistic/function-call-spacing": [ERROR, NEVER],
68
+
69
+ "@stylistic/function-paren-newline": [ERROR, "multiline-arguments"], // BUG: https://github.com/eslint-stylistic/eslint-stylistic/issues/290
70
+ "@stylistic/generator-star-spacing": [ERROR, { before: true, after: false }],
71
+ "@stylistic/implicit-arrow-linebreak": [ERROR, BESIDE],
72
+ "@stylistic/indent": [
73
+ ERROR,
74
+ 2,
75
+ {
76
+ ignoredNodes: [],
77
+ SwitchCase: 1,
78
+ VariableDeclarator: { "var": 0, let: 0, "const": 0 },
79
+ outerIIFEBody: 0,
80
+ MemberExpression: 1,
81
+ FunctionDeclaration: { parameters: 1, body: 1 },
82
+ FunctionExpression: { parameters: 1, body: 1 },
83
+ StaticBlock: { body: 1 },
84
+ CallExpression: { arguments: 1 },
85
+ ArrayExpression: 1,
86
+ ObjectExpression: 1,
87
+ ImportDeclaration: 1,
88
+ flatTernaryExpressions: false,
89
+ offsetTernaryExpressions: true,
90
+ ignoreComments: false,
91
+ },
92
+ ],
93
+ "@stylistic/indent-binary-ops": [ERROR, 2],
94
+ "@stylistic/key-spacing": [ERROR, { beforeColon: false, afterColon: true, mode: STRICT }],
95
+ "@stylistic/keyword-spacing": [ERROR, { before: true, after: true, overrides: {} }],
96
+ "@stylistic/line-comment-position": OFF,
97
+ "@stylistic/lines-around-comment": [
98
+ ERROR,
99
+ {
100
+ beforeBlockComment: false,
101
+ afterBlockComment: false,
102
+ beforeLineComment: true,
103
+ afterLineComment: false,
104
+ allowBlockStart: true,
105
+ allowBlockEnd: true,
106
+ allowObjectStart: true,
107
+ allowObjectEnd: true,
108
+ allowArrayStart: true,
109
+ allowArrayEnd: true,
110
+ allowClassStart: true,
111
+ allowClassEnd: true,
112
+ applyDefaultIgnorePatterns: true,
113
+ afterHashbangComment: false,
114
+
115
+ /* TS-only */
116
+ allowEnumEnd: true,
117
+ allowEnumStart: true,
118
+ allowInterfaceEnd: true,
119
+ allowInterfaceStart: true,
120
+ allowModuleEnd: true,
121
+ allowModuleStart: true,
122
+ allowTypeEnd: true,
123
+ allowTypeStart: true,
124
+ },
125
+ ],
126
+ "@stylistic/lines-between-class-members": [
127
+ ERROR,
128
+ {
129
+ enforce: [
130
+ { blankLine: NEVER, prev: "field", next: "field" },
131
+ { blankLine: ALWAYS, prev: "field", next: "method" },
132
+ { blankLine: ALWAYS, prev: "method", next: STAR },
133
+ ],
134
+ },
135
+ { exceptAfterSingleLine: false, exceptAfterOverload: true /* TS-only */ },
136
+ ],
137
+ "@stylistic/max-len": [
138
+ ERROR,
139
+ {
140
+ code: 150,
141
+ tabWidth: 2,
142
+ ignoreComments: true,
143
+ ignoreTrailingComments: true,
144
+ ignoreUrls: true,
145
+ ignoreStrings: true,
146
+ ignoreTemplateLiterals: true,
147
+ ignoreRegExpLiterals: true,
148
+ },
149
+ ],
150
+ "@stylistic/max-statements-per-line": [ERROR, { max: 1 }],
151
+ "@stylistic/member-delimiter-style": [
152
+ ERROR,
153
+ {
154
+ multiline: { delimiter: "semi", requireLast: true },
155
+ singleline: { delimiter: "semi", requireLast: false },
156
+ multilineDetection: "brackets",
157
+ },
158
+ ],
159
+ "@stylistic/multiline-comment-style": OFF,
160
+ "@stylistic/multiline-ternary": [ERROR, ALWAYS_MULTILINE],
161
+ "@stylistic/new-parens": [ERROR, NEVER],
162
+ "@stylistic/newline-per-chained-call": [ERROR, { ignoreChainWithDepth: 2 }],
163
+ "@stylistic/no-confusing-arrow": OFF,
164
+ "@stylistic/no-extra-parens": [
165
+ ERROR,
166
+ ALL,
167
+ {
168
+ conditionalAssign: true,
169
+ returnAssign: true,
170
+ nestedBinaryExpressions: true,
171
+ ternaryOperandBinaryExpressions: true,
172
+ enforceForArrowConditionals: true,
173
+ enforceForSequenceExpressions: true,
174
+ enforceForNewInMemberExpressions: true,
175
+ enforceForFunctionPrototypeMethods: true,
176
+ },
177
+ ],
178
+ "@stylistic/no-extra-semi": ERROR,
179
+ "@stylistic/no-floating-decimal": ERROR,
180
+ "@stylistic/no-mixed-operators": OFF,
181
+ "@stylistic/no-mixed-spaces-and-tabs": ERROR,
182
+ "@stylistic/no-multi-spaces": [ERROR, { ignoreEOLComments: false, exceptions: { Property: false }, includeTabs: true }],
183
+ "@stylistic/no-multiple-empty-lines": [ERROR, { max: 1, maxEOF: 1, maxBOF: 0 }],
184
+ "@stylistic/no-tabs": [ERROR, { allowIndentationTabs: false }],
185
+ "@stylistic/no-trailing-spaces": [ERROR, { skipBlankLines: false, ignoreComments: false }],
186
+ "@stylistic/no-whitespace-before-property": ERROR,
187
+ "@stylistic/nonblock-statement-body-position": [
188
+ ERROR,
189
+ BELOW,
190
+ {
191
+ overrides: {
192
+ "if": BELOW,
193
+ "else": BELOW,
194
+ "while": BELOW,
195
+ "do": BELOW,
196
+ "for": BELOW,
197
+ },
198
+ },
199
+ ],
200
+ "@stylistic/object-curly-newline": [
201
+ ERROR,
202
+ {
203
+ ObjectExpression: { consistent: true, multiline: true, minProperties: 4 },
204
+ ObjectPattern: { consistent: true, multiline: true, minProperties: 4 },
205
+ ImportDeclaration: { consistent: true, multiline: true, minProperties: 4 },
206
+ ExportDeclaration: { consistent: true, multiline: true, minProperties: 4 },
207
+ },
208
+ ],
209
+ "@stylistic/object-curly-spacing": [ERROR, ALWAYS, { arraysInObjects: true, objectsInObjects: true }],
210
+ "@stylistic/object-property-newline": [ERROR, { allowAllPropertiesOnSameLine: true }],
211
+ "@stylistic/one-var-declaration-per-line": [ERROR, ALWAYS],
212
+ "@stylistic/operator-linebreak": [ERROR, BEFORE, { overrides: { "=": AFTER } }],
213
+ "@stylistic/padded-blocks": [ERROR, { blocks: NEVER, classes: NEVER, switches: NEVER }, { allowSingleLineBlocks: true }],
214
+ "@stylistic/padding-line-between-statements": [
215
+ ERROR,
216
+ { blankLine: ALWAYS, prev: "directive", next: STAR },
217
+ { blankLine: NEVER, prev: "directive", next: "directive" },
218
+ { blankLine: ALWAYS, prev: ["import", "cjs-import"], next: STAR },
219
+ { blankLine: NEVER, prev: ["import", "cjs-import"], next: ["import", "cjs-import"] },
220
+ {
221
+ blankLine: ALWAYS,
222
+ prev: [
223
+ "class",
224
+ "interface",
225
+ "try",
226
+ "for",
227
+ "if",
228
+ "do",
229
+ "while",
230
+ "switch",
231
+ "block",
232
+ "block-like",
233
+ "iife",
234
+ "empty",
235
+ "debugger",
236
+ "with",
237
+ ],
238
+ next: STAR,
239
+ },
240
+ { blankLine: ALWAYS, prev: "case", next: STAR },
241
+ { blankLine: ALWAYS, prev: "case", next: ["case", "default"] },
242
+ { blankLine: ALWAYS, prev: "default", next: STAR },
243
+ { blankLine: ALWAYS, prev: "type", next: STAR },
244
+ { blankLine: NEVER, prev: "type", next: "type" },
245
+ { blankLine: ALWAYS, prev: "function", next: STAR },
246
+ { blankLine: ALWAYS, prev: "function-overload", next: STAR },
247
+ { blankLine: NEVER, prev: "function-overload", next: "function-overload" },
248
+ { blankLine: NEVER, prev: "function-overload", next: "function" },
249
+ { blankLine: ALWAYS, prev: ["const", "let", "var"], next: STAR },
250
+ { blankLine: NEVER, prev: ["const", "let", "var"], next: ["const", "let", "var"] },
251
+ { blankLine: ALWAYS, prev: "expression", next: STAR },
252
+ { blankLine: NEVER, prev: "expression", next: "expression" },
253
+ {
254
+ blankLine: ALWAYS,
255
+ prev: STAR,
256
+ next: [
257
+ "throw",
258
+ "return",
259
+ "break",
260
+ "continue",
261
+ ],
262
+ },
263
+ { blankLine: ALWAYS, prev: STAR, next: ["export", "cjs-export"] },
264
+ { blankLine: NEVER, prev: ["export", "cjs-export"], next: ["export", "cjs-export"] },
265
+ ],
266
+ "@stylistic/quote-props": [ERROR, AS_NEEDED, { keywords: true, unnecessary: true, numbers: false }],
267
+ "@stylistic/quotes": [ERROR, DOUBLE, { avoidEscape: true, allowTemplateLiterals: true }],
268
+ "@stylistic/rest-spread-spacing": [ERROR, NEVER],
269
+ "@stylistic/semi": [ERROR, ALWAYS, { omitLastInOneLineBlock: false, omitLastInOneLineClassBody: false }],
270
+ "@stylistic/semi-spacing": [ERROR, { before: false, after: true }],
271
+ "@stylistic/semi-style": [ERROR, LAST],
272
+ "@stylistic/space-before-blocks": [ERROR, { functions: ALWAYS, keywords: ALWAYS, classes: ALWAYS }],
273
+ "@stylistic/space-before-function-paren": [ERROR, { anonymous: ALWAYS, named: NEVER, asyncArrow: ALWAYS }],
274
+ "@stylistic/space-in-parens": [ERROR, NEVER],
275
+ "@stylistic/space-infix-ops": [ERROR, { int32Hint: true }],
276
+ "@stylistic/space-unary-ops": [ERROR, { words: true, nonwords: false, overrides: {} }],
277
+ "@stylistic/spaced-comment": [ERROR, ALWAYS],
278
+ "@stylistic/switch-colon-spacing": [ERROR, { after: true, before: false }],
279
+ "@stylistic/template-curly-spacing": [ERROR, NEVER],
280
+ "@stylistic/template-tag-spacing": [ERROR, NEVER],
281
+ "@stylistic/type-annotation-spacing": [ERROR, { before: false, after: true }],
282
+ "@stylistic/type-generic-spacing": ERROR,
283
+ "@stylistic/type-named-tuple-spacing": ERROR,
284
+ "@stylistic/wrap-iife": [ERROR, INSIDE, { functionPrototypeMethods: true }],
285
+ "@stylistic/wrap-regex": ERROR,
286
+ "@stylistic/yield-star-spacing": [ERROR, { before: false, after: true }],
287
+ },
288
+ ] as const satisfies RuleEntry;
@@ -1,33 +1,33 @@
1
- import { Strings, type RuleEntry } from "../index.js";
2
-
3
- const { Id: { Enable }, Level: { ERROR, OFF } } = Strings;
4
-
5
- export default [
6
- Enable,
7
- {
8
- // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
9
- "jsonc/auto": OFF,
10
- "jsonc/key-name-casing": OFF,
11
- "jsonc/no-bigint-literals": ERROR,
12
- "jsonc/no-binary-expression": ERROR,
13
- "jsonc/no-binary-numeric-literals": ERROR,
14
- "jsonc/no-comments": ERROR, // comments are NOT allowed in JSON
15
- "jsonc/no-escape-sequence-in-identifier": ERROR,
16
- "jsonc/no-hexadecimal-numeric-literals": ERROR,
17
- "jsonc/no-infinity": ERROR,
18
- "jsonc/no-nan": ERROR,
19
- "jsonc/no-number-props": ERROR,
20
- "jsonc/no-numeric-separators": ERROR,
21
- "jsonc/no-octal-numeric-literals": ERROR,
22
- "jsonc/no-parenthesized": ERROR,
23
- "jsonc/no-plus-sign": ERROR,
24
- "jsonc/no-regexp-literals": ERROR,
25
- "jsonc/no-template-literals": ERROR,
26
- "jsonc/no-undefined-value": ERROR,
27
- "jsonc/no-unicode-codepoint-escapes": ERROR,
28
- "jsonc/sort-array-values": OFF,
29
- "jsonc/sort-keys": OFF,
30
- "jsonc/valid-json-number": ERROR,
31
- "jsonc/vue-custom-block/no-parsing-error": ERROR,
32
- },
33
- ] as const satisfies RuleEntry;
1
+ import { Strings, type RuleEntry } from "../index.js";
2
+
3
+ const { Id: { Enable }, Level: { ERROR, OFF } } = Strings;
4
+
5
+ export default [
6
+ Enable,
7
+ {
8
+ // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
9
+ "jsonc/auto": OFF,
10
+ "jsonc/key-name-casing": OFF,
11
+ "jsonc/no-bigint-literals": ERROR,
12
+ "jsonc/no-binary-expression": ERROR,
13
+ "jsonc/no-binary-numeric-literals": ERROR,
14
+ "jsonc/no-comments": ERROR, // comments are NOT allowed in JSON
15
+ "jsonc/no-escape-sequence-in-identifier": ERROR,
16
+ "jsonc/no-hexadecimal-numeric-literals": ERROR,
17
+ "jsonc/no-infinity": ERROR,
18
+ "jsonc/no-nan": ERROR,
19
+ "jsonc/no-number-props": ERROR,
20
+ "jsonc/no-numeric-separators": ERROR,
21
+ "jsonc/no-octal-numeric-literals": ERROR,
22
+ "jsonc/no-parenthesized": ERROR,
23
+ "jsonc/no-plus-sign": ERROR,
24
+ "jsonc/no-regexp-literals": ERROR,
25
+ "jsonc/no-template-literals": ERROR,
26
+ "jsonc/no-undefined-value": ERROR,
27
+ "jsonc/no-unicode-codepoint-escapes": ERROR,
28
+ "jsonc/sort-array-values": OFF,
29
+ "jsonc/sort-keys": OFF,
30
+ "jsonc/valid-json-number": ERROR,
31
+ "jsonc/vue-custom-block/no-parsing-error": ERROR,
32
+ },
33
+ ] as const satisfies RuleEntry;