@w5s/eslint-config 3.0.1 → 3.1.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/index.d.ts +540 -416
- package/dist/index.js +563 -3042
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
- package/src/config/createRules.ts +7 -3
- package/src/config/es.ts +5 -1
- package/src/config/stylistic.ts +2 -2
- package/src/index.ts +1 -0
- package/src/rules/esRules/bestPractices.ts +424 -0
- package/src/rules/esRules/errors.ts +189 -0
- package/src/rules/esRules/overrides.ts +28 -0
- package/src/rules/esRules.ts +8 -0
- package/src/typegen/import.d.ts +0 -1
- package/src/typegen/jsdoc.d.ts +0 -1
- package/src/typegen/jsonc.d.ts +0 -1
- package/src/typegen/node.d.ts +0 -1
- package/src/typegen/style.d.ts +291 -188
- package/src/typegen/test.d.ts +0 -1
- package/src/typegen/ts.d.ts +0 -1
- package/src/typegen/unicorn.d.ts +248 -220
- package/src/typegen/yml.d.ts +0 -1
package/src/typegen/style.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable unicorn/no-abusive-eslint-disable */
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
/* prettier-ignore */
|
|
4
3
|
import type { Linter } from 'eslint'
|
|
@@ -12,483 +11,484 @@ declare module 'eslint' {
|
|
|
12
11
|
export interface RuleOptions {
|
|
13
12
|
/**
|
|
14
13
|
* Enforce linebreaks after opening and before closing array brackets
|
|
15
|
-
* @see https://eslint.style/rules/
|
|
14
|
+
* @see https://eslint.style/rules/array-bracket-newline
|
|
16
15
|
*/
|
|
17
16
|
'style/array-bracket-newline'?: Linter.RuleEntry<StyleArrayBracketNewline>
|
|
18
17
|
/**
|
|
19
18
|
* Enforce consistent spacing inside array brackets
|
|
20
|
-
* @see https://eslint.style/rules/
|
|
19
|
+
* @see https://eslint.style/rules/array-bracket-spacing
|
|
21
20
|
*/
|
|
22
21
|
'style/array-bracket-spacing'?: Linter.RuleEntry<StyleArrayBracketSpacing>
|
|
23
22
|
/**
|
|
24
23
|
* Enforce line breaks after each array element
|
|
25
|
-
* @see https://eslint.style/rules/
|
|
24
|
+
* @see https://eslint.style/rules/array-element-newline
|
|
26
25
|
*/
|
|
27
26
|
'style/array-element-newline'?: Linter.RuleEntry<StyleArrayElementNewline>
|
|
28
27
|
/**
|
|
29
28
|
* Require parentheses around arrow function arguments
|
|
30
|
-
* @see https://eslint.style/rules/
|
|
29
|
+
* @see https://eslint.style/rules/arrow-parens
|
|
31
30
|
*/
|
|
32
31
|
'style/arrow-parens'?: Linter.RuleEntry<StyleArrowParens>
|
|
33
32
|
/**
|
|
34
33
|
* Enforce consistent spacing before and after the arrow in arrow functions
|
|
35
|
-
* @see https://eslint.style/rules/
|
|
34
|
+
* @see https://eslint.style/rules/arrow-spacing
|
|
36
35
|
*/
|
|
37
36
|
'style/arrow-spacing'?: Linter.RuleEntry<StyleArrowSpacing>
|
|
38
37
|
/**
|
|
39
38
|
* Disallow or enforce spaces inside of blocks after opening block and before closing block
|
|
40
|
-
* @see https://eslint.style/rules/
|
|
39
|
+
* @see https://eslint.style/rules/block-spacing
|
|
41
40
|
*/
|
|
42
41
|
'style/block-spacing'?: Linter.RuleEntry<StyleBlockSpacing>
|
|
43
42
|
/**
|
|
44
43
|
* Enforce consistent brace style for blocks
|
|
45
|
-
* @see https://eslint.style/rules/
|
|
44
|
+
* @see https://eslint.style/rules/brace-style
|
|
46
45
|
*/
|
|
47
46
|
'style/brace-style'?: Linter.RuleEntry<StyleBraceStyle>
|
|
48
47
|
/**
|
|
49
48
|
* Require or disallow trailing commas
|
|
50
|
-
* @see https://eslint.style/rules/
|
|
49
|
+
* @see https://eslint.style/rules/comma-dangle
|
|
51
50
|
*/
|
|
52
51
|
'style/comma-dangle'?: Linter.RuleEntry<StyleCommaDangle>
|
|
53
52
|
/**
|
|
54
53
|
* Enforce consistent spacing before and after commas
|
|
55
|
-
* @see https://eslint.style/rules/
|
|
54
|
+
* @see https://eslint.style/rules/comma-spacing
|
|
56
55
|
*/
|
|
57
56
|
'style/comma-spacing'?: Linter.RuleEntry<StyleCommaSpacing>
|
|
58
57
|
/**
|
|
59
58
|
* Enforce consistent comma style
|
|
60
|
-
* @see https://eslint.style/rules/
|
|
59
|
+
* @see https://eslint.style/rules/comma-style
|
|
61
60
|
*/
|
|
62
61
|
'style/comma-style'?: Linter.RuleEntry<StyleCommaStyle>
|
|
63
62
|
/**
|
|
64
63
|
* Enforce consistent spacing inside computed property brackets
|
|
65
|
-
* @see https://eslint.style/rules/
|
|
64
|
+
* @see https://eslint.style/rules/computed-property-spacing
|
|
66
65
|
*/
|
|
67
66
|
'style/computed-property-spacing'?: Linter.RuleEntry<StyleComputedPropertySpacing>
|
|
68
67
|
/**
|
|
69
68
|
* Enforce consistent line breaks after opening and before closing braces
|
|
70
|
-
* @see https://eslint.style/rules/
|
|
69
|
+
* @see https://eslint.style/rules/curly-newline
|
|
71
70
|
*/
|
|
72
71
|
'style/curly-newline'?: Linter.RuleEntry<StyleCurlyNewline>
|
|
73
72
|
/**
|
|
74
73
|
* Enforce consistent newlines before and after dots
|
|
75
|
-
* @see https://eslint.style/rules/
|
|
74
|
+
* @see https://eslint.style/rules/dot-location
|
|
76
75
|
*/
|
|
77
76
|
'style/dot-location'?: Linter.RuleEntry<StyleDotLocation>
|
|
78
77
|
/**
|
|
79
78
|
* Require or disallow newline at the end of files
|
|
80
|
-
* @see https://eslint.style/rules/
|
|
79
|
+
* @see https://eslint.style/rules/eol-last
|
|
81
80
|
*/
|
|
82
81
|
'style/eol-last'?: Linter.RuleEntry<StyleEolLast>
|
|
83
82
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @see https://eslint.style/rules/
|
|
83
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
84
|
+
* @see https://eslint.style/rules/list-style
|
|
86
85
|
*/
|
|
87
|
-
'style/
|
|
86
|
+
'style/exp-list-style'?: Linter.RuleEntry<StyleExpListStyle>
|
|
88
87
|
/**
|
|
89
88
|
* Enforce line breaks between arguments of a function call
|
|
90
|
-
* @see https://eslint.style/rules/
|
|
89
|
+
* @see https://eslint.style/rules/function-call-argument-newline
|
|
91
90
|
*/
|
|
92
91
|
'style/function-call-argument-newline'?: Linter.RuleEntry<StyleFunctionCallArgumentNewline>
|
|
93
92
|
/**
|
|
94
93
|
* Require or disallow spacing between function identifiers and their invocations
|
|
95
|
-
* @see https://eslint.style/rules/
|
|
94
|
+
* @see https://eslint.style/rules/function-call-spacing
|
|
96
95
|
*/
|
|
97
96
|
'style/function-call-spacing'?: Linter.RuleEntry<StyleFunctionCallSpacing>
|
|
98
97
|
/**
|
|
99
98
|
* Enforce consistent line breaks inside function parentheses
|
|
100
|
-
* @see https://eslint.style/rules/
|
|
99
|
+
* @see https://eslint.style/rules/function-paren-newline
|
|
101
100
|
*/
|
|
102
101
|
'style/function-paren-newline'?: Linter.RuleEntry<StyleFunctionParenNewline>
|
|
103
102
|
/**
|
|
104
103
|
* Enforce consistent spacing around `*` operators in generator functions
|
|
105
|
-
* @see https://eslint.style/rules/
|
|
104
|
+
* @see https://eslint.style/rules/generator-star-spacing
|
|
106
105
|
*/
|
|
107
106
|
'style/generator-star-spacing'?: Linter.RuleEntry<StyleGeneratorStarSpacing>
|
|
108
107
|
/**
|
|
109
108
|
* Enforce the location of arrow function bodies
|
|
110
|
-
* @see https://eslint.style/rules/
|
|
109
|
+
* @see https://eslint.style/rules/implicit-arrow-linebreak
|
|
111
110
|
*/
|
|
112
111
|
'style/implicit-arrow-linebreak'?: Linter.RuleEntry<StyleImplicitArrowLinebreak>
|
|
113
112
|
/**
|
|
114
113
|
* Enforce consistent indentation
|
|
115
|
-
* @see https://eslint.style/rules/
|
|
114
|
+
* @see https://eslint.style/rules/indent
|
|
116
115
|
*/
|
|
117
116
|
'style/indent'?: Linter.RuleEntry<StyleIndent>
|
|
118
117
|
/**
|
|
119
118
|
* Indentation for binary operators
|
|
120
|
-
* @see https://eslint.style/rules/
|
|
119
|
+
* @see https://eslint.style/rules/indent-binary-ops
|
|
121
120
|
*/
|
|
122
121
|
'style/indent-binary-ops'?: Linter.RuleEntry<StyleIndentBinaryOps>
|
|
123
122
|
/**
|
|
124
123
|
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
|
|
125
|
-
* @see https://eslint.style/rules/jsx
|
|
124
|
+
* @see https://eslint.style/rules/jsx-child-element-spacing
|
|
126
125
|
*/
|
|
127
126
|
'style/jsx-child-element-spacing'?: Linter.RuleEntry<[]>
|
|
128
127
|
/**
|
|
129
128
|
* Enforce closing bracket location in JSX
|
|
130
|
-
* @see https://eslint.style/rules/jsx
|
|
129
|
+
* @see https://eslint.style/rules/jsx-closing-bracket-location
|
|
131
130
|
*/
|
|
132
131
|
'style/jsx-closing-bracket-location'?: Linter.RuleEntry<StyleJsxClosingBracketLocation>
|
|
133
132
|
/**
|
|
134
133
|
* Enforce closing tag location for multiline JSX
|
|
135
|
-
* @see https://eslint.style/rules/jsx
|
|
134
|
+
* @see https://eslint.style/rules/jsx-closing-tag-location
|
|
136
135
|
*/
|
|
137
136
|
'style/jsx-closing-tag-location'?: Linter.RuleEntry<StyleJsxClosingTagLocation>
|
|
138
137
|
/**
|
|
139
138
|
* Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
|
|
140
|
-
* @see https://eslint.style/rules/jsx
|
|
139
|
+
* @see https://eslint.style/rules/jsx-curly-brace-presence
|
|
141
140
|
*/
|
|
142
141
|
'style/jsx-curly-brace-presence'?: Linter.RuleEntry<StyleJsxCurlyBracePresence>
|
|
143
142
|
/**
|
|
144
143
|
* Enforce consistent linebreaks in curly braces in JSX attributes and expressions
|
|
145
|
-
* @see https://eslint.style/rules/jsx
|
|
144
|
+
* @see https://eslint.style/rules/jsx-curly-newline
|
|
146
145
|
*/
|
|
147
146
|
'style/jsx-curly-newline'?: Linter.RuleEntry<StyleJsxCurlyNewline>
|
|
148
147
|
/**
|
|
149
148
|
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
|
|
150
|
-
* @see https://eslint.style/rules/jsx
|
|
149
|
+
* @see https://eslint.style/rules/jsx-curly-spacing
|
|
151
150
|
*/
|
|
152
151
|
'style/jsx-curly-spacing'?: Linter.RuleEntry<StyleJsxCurlySpacing>
|
|
153
152
|
/**
|
|
154
153
|
* Enforce or disallow spaces around equal signs in JSX attributes
|
|
155
|
-
* @see https://eslint.style/rules/jsx
|
|
154
|
+
* @see https://eslint.style/rules/jsx-equals-spacing
|
|
156
155
|
*/
|
|
157
156
|
'style/jsx-equals-spacing'?: Linter.RuleEntry<StyleJsxEqualsSpacing>
|
|
158
157
|
/**
|
|
159
158
|
* Enforce proper position of the first property in JSX
|
|
160
|
-
* @see https://eslint.style/rules/jsx
|
|
159
|
+
* @see https://eslint.style/rules/jsx-first-prop-new-line
|
|
161
160
|
*/
|
|
162
161
|
'style/jsx-first-prop-new-line'?: Linter.RuleEntry<StyleJsxFirstPropNewLine>
|
|
163
162
|
/**
|
|
164
163
|
* Enforce line breaks before and after JSX elements when they are used as arguments to a function.
|
|
165
|
-
* @see https://eslint.style/rules/jsx
|
|
164
|
+
* @see https://eslint.style/rules/jsx-function-call-newline
|
|
166
165
|
*/
|
|
167
166
|
'style/jsx-function-call-newline'?: Linter.RuleEntry<StyleJsxFunctionCallNewline>
|
|
168
167
|
/**
|
|
169
168
|
* Enforce JSX indentation. Deprecated, use `indent` rule instead.
|
|
170
|
-
* @see https://eslint.style/rules/jsx
|
|
169
|
+
* @see https://eslint.style/rules/jsx-indent
|
|
171
170
|
* @deprecated
|
|
172
171
|
*/
|
|
173
172
|
'style/jsx-indent'?: Linter.RuleEntry<StyleJsxIndent>
|
|
174
173
|
/**
|
|
175
174
|
* Enforce props indentation in JSX
|
|
176
|
-
* @see https://eslint.style/rules/jsx
|
|
175
|
+
* @see https://eslint.style/rules/jsx-indent-props
|
|
177
176
|
*/
|
|
178
177
|
'style/jsx-indent-props'?: Linter.RuleEntry<StyleJsxIndentProps>
|
|
179
178
|
/**
|
|
180
179
|
* Enforce maximum of props on a single line in JSX
|
|
181
|
-
* @see https://eslint.style/rules/jsx
|
|
180
|
+
* @see https://eslint.style/rules/jsx-max-props-per-line
|
|
182
181
|
*/
|
|
183
182
|
'style/jsx-max-props-per-line'?: Linter.RuleEntry<StyleJsxMaxPropsPerLine>
|
|
184
183
|
/**
|
|
185
184
|
* Require or prevent a new line after jsx elements and expressions.
|
|
186
|
-
* @see https://eslint.style/rules/jsx
|
|
185
|
+
* @see https://eslint.style/rules/jsx-newline
|
|
187
186
|
*/
|
|
188
187
|
'style/jsx-newline'?: Linter.RuleEntry<StyleJsxNewline>
|
|
189
188
|
/**
|
|
190
189
|
* Require one JSX element per line
|
|
191
|
-
* @see https://eslint.style/rules/jsx
|
|
190
|
+
* @see https://eslint.style/rules/jsx-one-expression-per-line
|
|
192
191
|
*/
|
|
193
192
|
'style/jsx-one-expression-per-line'?: Linter.RuleEntry<StyleJsxOneExpressionPerLine>
|
|
194
193
|
/**
|
|
195
194
|
* Enforce PascalCase for user-defined JSX components
|
|
196
|
-
* @see https://eslint.style/rules/jsx
|
|
195
|
+
* @see https://eslint.style/rules/jsx-pascal-case
|
|
197
196
|
*/
|
|
198
197
|
'style/jsx-pascal-case'?: Linter.RuleEntry<StyleJsxPascalCase>
|
|
199
198
|
/**
|
|
200
|
-
* Disallow multiple spaces between inline JSX props
|
|
201
|
-
* @see https://eslint.style/rules/jsx
|
|
199
|
+
* Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead.
|
|
200
|
+
* @see https://eslint.style/rules/jsx-props-no-multi-spaces
|
|
201
|
+
* @deprecated
|
|
202
202
|
*/
|
|
203
203
|
'style/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]>
|
|
204
204
|
/**
|
|
205
205
|
* Enforce the consistent use of either double or single quotes in JSX attributes
|
|
206
|
-
* @see https://eslint.style/rules/
|
|
206
|
+
* @see https://eslint.style/rules/jsx-quotes
|
|
207
207
|
*/
|
|
208
208
|
'style/jsx-quotes'?: Linter.RuleEntry<StyleJsxQuotes>
|
|
209
209
|
/**
|
|
210
210
|
* Disallow extra closing tags for components without children
|
|
211
|
-
* @see https://eslint.style/rules/jsx
|
|
211
|
+
* @see https://eslint.style/rules/jsx-self-closing-comp
|
|
212
212
|
*/
|
|
213
213
|
'style/jsx-self-closing-comp'?: Linter.RuleEntry<StyleJsxSelfClosingComp>
|
|
214
214
|
/**
|
|
215
215
|
* Enforce props alphabetical sorting
|
|
216
|
-
* @see https://eslint.style/rules/jsx
|
|
216
|
+
* @see https://eslint.style/rules/jsx-sort-props
|
|
217
217
|
*/
|
|
218
218
|
'style/jsx-sort-props'?: Linter.RuleEntry<StyleJsxSortProps>
|
|
219
219
|
/**
|
|
220
220
|
* Enforce whitespace in and around the JSX opening and closing brackets
|
|
221
|
-
* @see https://eslint.style/rules/jsx
|
|
221
|
+
* @see https://eslint.style/rules/jsx-tag-spacing
|
|
222
222
|
*/
|
|
223
223
|
'style/jsx-tag-spacing'?: Linter.RuleEntry<StyleJsxTagSpacing>
|
|
224
224
|
/**
|
|
225
225
|
* Disallow missing parentheses around multiline JSX
|
|
226
|
-
* @see https://eslint.style/rules/jsx
|
|
226
|
+
* @see https://eslint.style/rules/jsx-wrap-multilines
|
|
227
227
|
*/
|
|
228
228
|
'style/jsx-wrap-multilines'?: Linter.RuleEntry<StyleJsxWrapMultilines>
|
|
229
229
|
/**
|
|
230
230
|
* Enforce consistent spacing between property names and type annotations in types and interfaces
|
|
231
|
-
* @see https://eslint.style/rules/
|
|
231
|
+
* @see https://eslint.style/rules/key-spacing
|
|
232
232
|
*/
|
|
233
233
|
'style/key-spacing'?: Linter.RuleEntry<StyleKeySpacing>
|
|
234
234
|
/**
|
|
235
235
|
* Enforce consistent spacing before and after keywords
|
|
236
|
-
* @see https://eslint.style/rules/
|
|
236
|
+
* @see https://eslint.style/rules/keyword-spacing
|
|
237
237
|
*/
|
|
238
238
|
'style/keyword-spacing'?: Linter.RuleEntry<StyleKeywordSpacing>
|
|
239
239
|
/**
|
|
240
240
|
* Enforce position of line comments
|
|
241
|
-
* @see https://eslint.style/rules/
|
|
241
|
+
* @see https://eslint.style/rules/line-comment-position
|
|
242
242
|
*/
|
|
243
243
|
'style/line-comment-position'?: Linter.RuleEntry<StyleLineCommentPosition>
|
|
244
244
|
/**
|
|
245
245
|
* Enforce consistent linebreak style
|
|
246
|
-
* @see https://eslint.style/rules/
|
|
246
|
+
* @see https://eslint.style/rules/linebreak-style
|
|
247
247
|
*/
|
|
248
248
|
'style/linebreak-style'?: Linter.RuleEntry<StyleLinebreakStyle>
|
|
249
249
|
/**
|
|
250
250
|
* Require empty lines around comments
|
|
251
|
-
* @see https://eslint.style/rules/
|
|
251
|
+
* @see https://eslint.style/rules/lines-around-comment
|
|
252
252
|
*/
|
|
253
253
|
'style/lines-around-comment'?: Linter.RuleEntry<StyleLinesAroundComment>
|
|
254
254
|
/**
|
|
255
255
|
* Require or disallow an empty line between class members
|
|
256
|
-
* @see https://eslint.style/rules/
|
|
256
|
+
* @see https://eslint.style/rules/lines-between-class-members
|
|
257
257
|
*/
|
|
258
258
|
'style/lines-between-class-members'?: Linter.RuleEntry<StyleLinesBetweenClassMembers>
|
|
259
259
|
/**
|
|
260
260
|
* Enforce a maximum line length
|
|
261
|
-
* @see https://eslint.style/rules/
|
|
261
|
+
* @see https://eslint.style/rules/max-len
|
|
262
262
|
*/
|
|
263
263
|
'style/max-len'?: Linter.RuleEntry<StyleMaxLen>
|
|
264
264
|
/**
|
|
265
265
|
* Enforce a maximum number of statements allowed per line
|
|
266
|
-
* @see https://eslint.style/rules/
|
|
266
|
+
* @see https://eslint.style/rules/max-statements-per-line
|
|
267
267
|
*/
|
|
268
268
|
'style/max-statements-per-line'?: Linter.RuleEntry<StyleMaxStatementsPerLine>
|
|
269
269
|
/**
|
|
270
270
|
* Require a specific member delimiter style for interfaces and type literals
|
|
271
|
-
* @see https://eslint.style/rules/
|
|
271
|
+
* @see https://eslint.style/rules/member-delimiter-style
|
|
272
272
|
*/
|
|
273
273
|
'style/member-delimiter-style'?: Linter.RuleEntry<StyleMemberDelimiterStyle>
|
|
274
274
|
/**
|
|
275
275
|
* Enforce a particular style for multiline comments
|
|
276
|
-
* @see https://eslint.style/rules/
|
|
276
|
+
* @see https://eslint.style/rules/multiline-comment-style
|
|
277
277
|
*/
|
|
278
278
|
'style/multiline-comment-style'?: Linter.RuleEntry<StyleMultilineCommentStyle>
|
|
279
279
|
/**
|
|
280
280
|
* Enforce newlines between operands of ternary expressions
|
|
281
|
-
* @see https://eslint.style/rules/
|
|
281
|
+
* @see https://eslint.style/rules/multiline-ternary
|
|
282
282
|
*/
|
|
283
283
|
'style/multiline-ternary'?: Linter.RuleEntry<StyleMultilineTernary>
|
|
284
284
|
/**
|
|
285
285
|
* Enforce or disallow parentheses when invoking a constructor with no arguments
|
|
286
|
-
* @see https://eslint.style/rules/
|
|
286
|
+
* @see https://eslint.style/rules/new-parens
|
|
287
287
|
*/
|
|
288
288
|
'style/new-parens'?: Linter.RuleEntry<StyleNewParens>
|
|
289
289
|
/**
|
|
290
290
|
* Require a newline after each call in a method chain
|
|
291
|
-
* @see https://eslint.style/rules/
|
|
291
|
+
* @see https://eslint.style/rules/newline-per-chained-call
|
|
292
292
|
*/
|
|
293
293
|
'style/newline-per-chained-call'?: Linter.RuleEntry<StyleNewlinePerChainedCall>
|
|
294
294
|
/**
|
|
295
295
|
* Disallow arrow functions where they could be confused with comparisons
|
|
296
|
-
* @see https://eslint.style/rules/
|
|
296
|
+
* @see https://eslint.style/rules/no-confusing-arrow
|
|
297
297
|
*/
|
|
298
298
|
'style/no-confusing-arrow'?: Linter.RuleEntry<StyleNoConfusingArrow>
|
|
299
299
|
/**
|
|
300
300
|
* Disallow unnecessary parentheses
|
|
301
|
-
* @see https://eslint.style/rules/
|
|
301
|
+
* @see https://eslint.style/rules/no-extra-parens
|
|
302
302
|
*/
|
|
303
303
|
'style/no-extra-parens'?: Linter.RuleEntry<StyleNoExtraParens>
|
|
304
304
|
/**
|
|
305
305
|
* Disallow unnecessary semicolons
|
|
306
|
-
* @see https://eslint.style/rules/
|
|
306
|
+
* @see https://eslint.style/rules/no-extra-semi
|
|
307
307
|
*/
|
|
308
308
|
'style/no-extra-semi'?: Linter.RuleEntry<[]>
|
|
309
309
|
/**
|
|
310
310
|
* Disallow leading or trailing decimal points in numeric literals
|
|
311
|
-
* @see https://eslint.style/rules/
|
|
311
|
+
* @see https://eslint.style/rules/no-floating-decimal
|
|
312
312
|
*/
|
|
313
313
|
'style/no-floating-decimal'?: Linter.RuleEntry<[]>
|
|
314
314
|
/**
|
|
315
315
|
* Disallow mixed binary operators
|
|
316
|
-
* @see https://eslint.style/rules/
|
|
316
|
+
* @see https://eslint.style/rules/no-mixed-operators
|
|
317
317
|
*/
|
|
318
318
|
'style/no-mixed-operators'?: Linter.RuleEntry<StyleNoMixedOperators>
|
|
319
319
|
/**
|
|
320
320
|
* Disallow mixed spaces and tabs for indentation
|
|
321
|
-
* @see https://eslint.style/rules/
|
|
321
|
+
* @see https://eslint.style/rules/no-mixed-spaces-and-tabs
|
|
322
322
|
*/
|
|
323
323
|
'style/no-mixed-spaces-and-tabs'?: Linter.RuleEntry<StyleNoMixedSpacesAndTabs>
|
|
324
324
|
/**
|
|
325
325
|
* Disallow multiple spaces
|
|
326
|
-
* @see https://eslint.style/rules/
|
|
326
|
+
* @see https://eslint.style/rules/no-multi-spaces
|
|
327
327
|
*/
|
|
328
328
|
'style/no-multi-spaces'?: Linter.RuleEntry<StyleNoMultiSpaces>
|
|
329
329
|
/**
|
|
330
330
|
* Disallow multiple empty lines
|
|
331
|
-
* @see https://eslint.style/rules/
|
|
331
|
+
* @see https://eslint.style/rules/no-multiple-empty-lines
|
|
332
332
|
*/
|
|
333
333
|
'style/no-multiple-empty-lines'?: Linter.RuleEntry<StyleNoMultipleEmptyLines>
|
|
334
334
|
/**
|
|
335
335
|
* Disallow all tabs
|
|
336
|
-
* @see https://eslint.style/rules/
|
|
336
|
+
* @see https://eslint.style/rules/no-tabs
|
|
337
337
|
*/
|
|
338
338
|
'style/no-tabs'?: Linter.RuleEntry<StyleNoTabs>
|
|
339
339
|
/**
|
|
340
340
|
* Disallow trailing whitespace at the end of lines
|
|
341
|
-
* @see https://eslint.style/rules/
|
|
341
|
+
* @see https://eslint.style/rules/no-trailing-spaces
|
|
342
342
|
*/
|
|
343
343
|
'style/no-trailing-spaces'?: Linter.RuleEntry<StyleNoTrailingSpaces>
|
|
344
344
|
/**
|
|
345
345
|
* Disallow whitespace before properties
|
|
346
|
-
* @see https://eslint.style/rules/
|
|
346
|
+
* @see https://eslint.style/rules/no-whitespace-before-property
|
|
347
347
|
*/
|
|
348
348
|
'style/no-whitespace-before-property'?: Linter.RuleEntry<[]>
|
|
349
349
|
/**
|
|
350
350
|
* Enforce the location of single-line statements
|
|
351
|
-
* @see https://eslint.style/rules/
|
|
351
|
+
* @see https://eslint.style/rules/nonblock-statement-body-position
|
|
352
352
|
*/
|
|
353
353
|
'style/nonblock-statement-body-position'?: Linter.RuleEntry<StyleNonblockStatementBodyPosition>
|
|
354
354
|
/**
|
|
355
355
|
* Enforce consistent line breaks after opening and before closing braces
|
|
356
|
-
* @see https://eslint.style/rules/
|
|
356
|
+
* @see https://eslint.style/rules/object-curly-newline
|
|
357
357
|
*/
|
|
358
358
|
'style/object-curly-newline'?: Linter.RuleEntry<StyleObjectCurlyNewline>
|
|
359
359
|
/**
|
|
360
360
|
* Enforce consistent spacing inside braces
|
|
361
|
-
* @see https://eslint.style/rules/
|
|
361
|
+
* @see https://eslint.style/rules/object-curly-spacing
|
|
362
362
|
*/
|
|
363
363
|
'style/object-curly-spacing'?: Linter.RuleEntry<StyleObjectCurlySpacing>
|
|
364
364
|
/**
|
|
365
365
|
* Enforce placing object properties on separate lines
|
|
366
|
-
* @see https://eslint.style/rules/
|
|
366
|
+
* @see https://eslint.style/rules/object-property-newline
|
|
367
367
|
*/
|
|
368
368
|
'style/object-property-newline'?: Linter.RuleEntry<StyleObjectPropertyNewline>
|
|
369
369
|
/**
|
|
370
370
|
* Require or disallow newlines around variable declarations
|
|
371
|
-
* @see https://eslint.style/rules/
|
|
371
|
+
* @see https://eslint.style/rules/one-var-declaration-per-line
|
|
372
372
|
*/
|
|
373
373
|
'style/one-var-declaration-per-line'?: Linter.RuleEntry<StyleOneVarDeclarationPerLine>
|
|
374
374
|
/**
|
|
375
375
|
* Enforce consistent linebreak style for operators
|
|
376
|
-
* @see https://eslint.style/rules/
|
|
376
|
+
* @see https://eslint.style/rules/operator-linebreak
|
|
377
377
|
*/
|
|
378
378
|
'style/operator-linebreak'?: Linter.RuleEntry<StyleOperatorLinebreak>
|
|
379
379
|
/**
|
|
380
380
|
* Require or disallow padding within blocks
|
|
381
|
-
* @see https://eslint.style/rules/
|
|
381
|
+
* @see https://eslint.style/rules/padded-blocks
|
|
382
382
|
*/
|
|
383
383
|
'style/padded-blocks'?: Linter.RuleEntry<StylePaddedBlocks>
|
|
384
384
|
/**
|
|
385
385
|
* Require or disallow padding lines between statements
|
|
386
|
-
* @see https://eslint.style/rules/
|
|
386
|
+
* @see https://eslint.style/rules/padding-line-between-statements
|
|
387
387
|
*/
|
|
388
388
|
'style/padding-line-between-statements'?: Linter.RuleEntry<StylePaddingLineBetweenStatements>
|
|
389
389
|
/**
|
|
390
390
|
* Require quotes around object literal, type literal, interfaces and enums property names
|
|
391
|
-
* @see https://eslint.style/rules/
|
|
391
|
+
* @see https://eslint.style/rules/quote-props
|
|
392
392
|
*/
|
|
393
393
|
'style/quote-props'?: Linter.RuleEntry<StyleQuoteProps>
|
|
394
394
|
/**
|
|
395
395
|
* Enforce the consistent use of either backticks, double, or single quotes
|
|
396
|
-
* @see https://eslint.style/rules/
|
|
396
|
+
* @see https://eslint.style/rules/quotes
|
|
397
397
|
*/
|
|
398
398
|
'style/quotes'?: Linter.RuleEntry<StyleQuotes>
|
|
399
399
|
/**
|
|
400
400
|
* Enforce spacing between rest and spread operators and their expressions
|
|
401
|
-
* @see https://eslint.style/rules/
|
|
401
|
+
* @see https://eslint.style/rules/rest-spread-spacing
|
|
402
402
|
*/
|
|
403
403
|
'style/rest-spread-spacing'?: Linter.RuleEntry<StyleRestSpreadSpacing>
|
|
404
404
|
/**
|
|
405
405
|
* Require or disallow semicolons instead of ASI
|
|
406
|
-
* @see https://eslint.style/rules/
|
|
406
|
+
* @see https://eslint.style/rules/semi
|
|
407
407
|
*/
|
|
408
408
|
'style/semi'?: Linter.RuleEntry<StyleSemi>
|
|
409
409
|
/**
|
|
410
410
|
* Enforce consistent spacing before and after semicolons
|
|
411
|
-
* @see https://eslint.style/rules/
|
|
411
|
+
* @see https://eslint.style/rules/semi-spacing
|
|
412
412
|
*/
|
|
413
413
|
'style/semi-spacing'?: Linter.RuleEntry<StyleSemiSpacing>
|
|
414
414
|
/**
|
|
415
415
|
* Enforce location of semicolons
|
|
416
|
-
* @see https://eslint.style/rules/
|
|
416
|
+
* @see https://eslint.style/rules/semi-style
|
|
417
417
|
*/
|
|
418
418
|
'style/semi-style'?: Linter.RuleEntry<StyleSemiStyle>
|
|
419
419
|
/**
|
|
420
420
|
* Enforce consistent spacing before blocks
|
|
421
|
-
* @see https://eslint.style/rules/
|
|
421
|
+
* @see https://eslint.style/rules/space-before-blocks
|
|
422
422
|
*/
|
|
423
423
|
'style/space-before-blocks'?: Linter.RuleEntry<StyleSpaceBeforeBlocks>
|
|
424
424
|
/**
|
|
425
425
|
* Enforce consistent spacing before function parenthesis
|
|
426
|
-
* @see https://eslint.style/rules/
|
|
426
|
+
* @see https://eslint.style/rules/space-before-function-paren
|
|
427
427
|
*/
|
|
428
428
|
'style/space-before-function-paren'?: Linter.RuleEntry<StyleSpaceBeforeFunctionParen>
|
|
429
429
|
/**
|
|
430
430
|
* Enforce consistent spacing inside parentheses
|
|
431
|
-
* @see https://eslint.style/rules/
|
|
431
|
+
* @see https://eslint.style/rules/space-in-parens
|
|
432
432
|
*/
|
|
433
433
|
'style/space-in-parens'?: Linter.RuleEntry<StyleSpaceInParens>
|
|
434
434
|
/**
|
|
435
435
|
* Require spacing around infix operators
|
|
436
|
-
* @see https://eslint.style/rules/
|
|
436
|
+
* @see https://eslint.style/rules/space-infix-ops
|
|
437
437
|
*/
|
|
438
438
|
'style/space-infix-ops'?: Linter.RuleEntry<StyleSpaceInfixOps>
|
|
439
439
|
/**
|
|
440
440
|
* Enforce consistent spacing before or after unary operators
|
|
441
|
-
* @see https://eslint.style/rules/
|
|
441
|
+
* @see https://eslint.style/rules/space-unary-ops
|
|
442
442
|
*/
|
|
443
443
|
'style/space-unary-ops'?: Linter.RuleEntry<StyleSpaceUnaryOps>
|
|
444
444
|
/**
|
|
445
445
|
* Enforce consistent spacing after the `//` or `/*` in a comment
|
|
446
|
-
* @see https://eslint.style/rules/
|
|
446
|
+
* @see https://eslint.style/rules/spaced-comment
|
|
447
447
|
*/
|
|
448
448
|
'style/spaced-comment'?: Linter.RuleEntry<StyleSpacedComment>
|
|
449
449
|
/**
|
|
450
450
|
* Enforce spacing around colons of switch statements
|
|
451
|
-
* @see https://eslint.style/rules/
|
|
451
|
+
* @see https://eslint.style/rules/switch-colon-spacing
|
|
452
452
|
*/
|
|
453
453
|
'style/switch-colon-spacing'?: Linter.RuleEntry<StyleSwitchColonSpacing>
|
|
454
454
|
/**
|
|
455
455
|
* Require or disallow spacing around embedded expressions of template strings
|
|
456
|
-
* @see https://eslint.style/rules/
|
|
456
|
+
* @see https://eslint.style/rules/template-curly-spacing
|
|
457
457
|
*/
|
|
458
458
|
'style/template-curly-spacing'?: Linter.RuleEntry<StyleTemplateCurlySpacing>
|
|
459
459
|
/**
|
|
460
460
|
* Require or disallow spacing between template tags and their literals
|
|
461
|
-
* @see https://eslint.style/rules/
|
|
461
|
+
* @see https://eslint.style/rules/template-tag-spacing
|
|
462
462
|
*/
|
|
463
463
|
'style/template-tag-spacing'?: Linter.RuleEntry<StyleTemplateTagSpacing>
|
|
464
464
|
/**
|
|
465
465
|
* Require consistent spacing around type annotations
|
|
466
|
-
* @see https://eslint.style/rules/
|
|
466
|
+
* @see https://eslint.style/rules/type-annotation-spacing
|
|
467
467
|
*/
|
|
468
468
|
'style/type-annotation-spacing'?: Linter.RuleEntry<StyleTypeAnnotationSpacing>
|
|
469
469
|
/**
|
|
470
470
|
* Enforces consistent spacing inside TypeScript type generics
|
|
471
|
-
* @see https://eslint.style/rules/
|
|
471
|
+
* @see https://eslint.style/rules/type-generic-spacing
|
|
472
472
|
*/
|
|
473
473
|
'style/type-generic-spacing'?: Linter.RuleEntry<[]>
|
|
474
474
|
/**
|
|
475
475
|
* Expect space before the type declaration in the named tuple
|
|
476
|
-
* @see https://eslint.style/rules/
|
|
476
|
+
* @see https://eslint.style/rules/type-named-tuple-spacing
|
|
477
477
|
*/
|
|
478
478
|
'style/type-named-tuple-spacing'?: Linter.RuleEntry<[]>
|
|
479
479
|
/**
|
|
480
480
|
* Require parentheses around immediate `function` invocations
|
|
481
|
-
* @see https://eslint.style/rules/
|
|
481
|
+
* @see https://eslint.style/rules/wrap-iife
|
|
482
482
|
*/
|
|
483
483
|
'style/wrap-iife'?: Linter.RuleEntry<StyleWrapIife>
|
|
484
484
|
/**
|
|
485
485
|
* Require parenthesis around regex literals
|
|
486
|
-
* @see https://eslint.style/rules/
|
|
486
|
+
* @see https://eslint.style/rules/wrap-regex
|
|
487
487
|
*/
|
|
488
488
|
'style/wrap-regex'?: Linter.RuleEntry<[]>
|
|
489
489
|
/**
|
|
490
490
|
* Require or disallow spacing around the `*` in `yield*` expressions
|
|
491
|
-
* @see https://eslint.style/rules/
|
|
491
|
+
* @see https://eslint.style/rules/yield-star-spacing
|
|
492
492
|
*/
|
|
493
493
|
'style/yield-star-spacing'?: Linter.RuleEntry<StyleYieldStarSpacing>
|
|
494
494
|
}
|
|
@@ -662,16 +662,6 @@ type StyleCurlyNewline = []|[(("always" | "never") | {
|
|
|
662
662
|
minElements?: number
|
|
663
663
|
consistent?: boolean
|
|
664
664
|
})
|
|
665
|
-
TSEnumBody?: (("always" | "never") | {
|
|
666
|
-
multiline?: boolean
|
|
667
|
-
minElements?: number
|
|
668
|
-
consistent?: boolean
|
|
669
|
-
})
|
|
670
|
-
TSInterfaceBody?: (("always" | "never") | {
|
|
671
|
-
multiline?: boolean
|
|
672
|
-
minElements?: number
|
|
673
|
-
consistent?: boolean
|
|
674
|
-
})
|
|
675
665
|
TSModuleBlock?: (("always" | "never") | {
|
|
676
666
|
multiline?: boolean
|
|
677
667
|
minElements?: number
|
|
@@ -685,14 +675,50 @@ type StyleCurlyNewline = []|[(("always" | "never") | {
|
|
|
685
675
|
type StyleDotLocation = []|[("object" | "property")]
|
|
686
676
|
// ----- style/eol-last -----
|
|
687
677
|
type StyleEolLast = []|[("always" | "never" | "unix" | "windows")]
|
|
688
|
-
// ----- style/
|
|
689
|
-
type
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
678
|
+
// ----- style/exp-list-style -----
|
|
679
|
+
type StyleExpListStyle = []|[{
|
|
680
|
+
singleLine?: _StyleExpListStyle_SingleLineConfig
|
|
681
|
+
multiLine?: _StyleExpListStyle_MultiLineConfig
|
|
682
|
+
overrides?: {
|
|
683
|
+
"[]"?: _StyleExpListStyle_BaseConfig
|
|
684
|
+
"{}"?: _StyleExpListStyle_BaseConfig
|
|
685
|
+
"<>"?: _StyleExpListStyle_BaseConfig
|
|
686
|
+
"()"?: _StyleExpListStyle_BaseConfig
|
|
687
|
+
ArrayExpression?: _StyleExpListStyle_BaseConfig
|
|
688
|
+
ArrayPattern?: _StyleExpListStyle_BaseConfig
|
|
689
|
+
ArrowFunctionExpression?: _StyleExpListStyle_BaseConfig
|
|
690
|
+
CallExpression?: _StyleExpListStyle_BaseConfig
|
|
691
|
+
ExportNamedDeclaration?: _StyleExpListStyle_BaseConfig
|
|
692
|
+
FunctionDeclaration?: _StyleExpListStyle_BaseConfig
|
|
693
|
+
FunctionExpression?: _StyleExpListStyle_BaseConfig
|
|
694
|
+
ImportDeclaration?: _StyleExpListStyle_BaseConfig
|
|
695
|
+
ImportAttributes?: _StyleExpListStyle_BaseConfig
|
|
696
|
+
NewExpression?: _StyleExpListStyle_BaseConfig
|
|
697
|
+
ObjectExpression?: _StyleExpListStyle_BaseConfig
|
|
698
|
+
ObjectPattern?: _StyleExpListStyle_BaseConfig
|
|
699
|
+
TSDeclareFunction?: _StyleExpListStyle_BaseConfig
|
|
700
|
+
TSFunctionType?: _StyleExpListStyle_BaseConfig
|
|
701
|
+
TSInterfaceBody?: _StyleExpListStyle_BaseConfig
|
|
702
|
+
TSEnumBody?: _StyleExpListStyle_BaseConfig
|
|
703
|
+
TSTupleType?: _StyleExpListStyle_BaseConfig
|
|
704
|
+
TSTypeLiteral?: _StyleExpListStyle_BaseConfig
|
|
705
|
+
TSTypeParameterDeclaration?: _StyleExpListStyle_BaseConfig
|
|
706
|
+
TSTypeParameterInstantiation?: _StyleExpListStyle_BaseConfig
|
|
707
|
+
JSONArrayExpression?: _StyleExpListStyle_BaseConfig
|
|
708
|
+
JSONObjectExpression?: _StyleExpListStyle_BaseConfig
|
|
694
709
|
}
|
|
695
|
-
}]
|
|
710
|
+
}]
|
|
711
|
+
interface _StyleExpListStyle_SingleLineConfig {
|
|
712
|
+
spacing?: ("always" | "never")
|
|
713
|
+
maxItems?: number
|
|
714
|
+
}
|
|
715
|
+
interface _StyleExpListStyle_MultiLineConfig {
|
|
716
|
+
minItems?: number
|
|
717
|
+
}
|
|
718
|
+
interface _StyleExpListStyle_BaseConfig {
|
|
719
|
+
singleLine?: _StyleExpListStyle_SingleLineConfig
|
|
720
|
+
multiline?: _StyleExpListStyle_MultiLineConfig
|
|
721
|
+
}
|
|
696
722
|
// ----- style/function-call-argument-newline -----
|
|
697
723
|
type StyleFunctionCallArgumentNewline = []|[("always" | "never" | "consistent")]
|
|
698
724
|
// ----- style/function-call-spacing -----
|
|
@@ -723,6 +749,10 @@ type StyleGeneratorStarSpacing = []|[(("before" | "after" | "both" | "neither")
|
|
|
723
749
|
before?: boolean
|
|
724
750
|
after?: boolean
|
|
725
751
|
})
|
|
752
|
+
shorthand?: (("before" | "after" | "both" | "neither") | {
|
|
753
|
+
before?: boolean
|
|
754
|
+
after?: boolean
|
|
755
|
+
})
|
|
726
756
|
})]
|
|
727
757
|
// ----- style/implicit-arrow-linebreak -----
|
|
728
758
|
type StyleImplicitArrowLinebreak = []|[("beside" | "below")]
|
|
@@ -733,16 +763,20 @@ type StyleIndent = []|[("tab" | number)]|[("tab" | number), {
|
|
|
733
763
|
var?: (number | ("first" | "off"))
|
|
734
764
|
let?: (number | ("first" | "off"))
|
|
735
765
|
const?: (number | ("first" | "off"))
|
|
766
|
+
using?: (number | ("first" | "off"))
|
|
736
767
|
})
|
|
768
|
+
assignmentOperator?: (number | "off")
|
|
737
769
|
outerIIFEBody?: (number | "off")
|
|
738
770
|
MemberExpression?: (number | "off")
|
|
739
771
|
FunctionDeclaration?: {
|
|
740
772
|
parameters?: (number | ("first" | "off"))
|
|
741
773
|
body?: number
|
|
774
|
+
returnType?: number
|
|
742
775
|
}
|
|
743
776
|
FunctionExpression?: {
|
|
744
777
|
parameters?: (number | ("first" | "off"))
|
|
745
778
|
body?: number
|
|
779
|
+
returnType?: number
|
|
746
780
|
}
|
|
747
781
|
StaticBlock?: {
|
|
748
782
|
body?: number
|
|
@@ -754,7 +788,11 @@ type StyleIndent = []|[("tab" | number)]|[("tab" | number), {
|
|
|
754
788
|
ObjectExpression?: (number | ("first" | "off"))
|
|
755
789
|
ImportDeclaration?: (number | ("first" | "off"))
|
|
756
790
|
flatTernaryExpressions?: boolean
|
|
757
|
-
offsetTernaryExpressions?: boolean
|
|
791
|
+
offsetTernaryExpressions?: (boolean | {
|
|
792
|
+
CallExpression?: boolean
|
|
793
|
+
AwaitExpression?: boolean
|
|
794
|
+
NewExpression?: boolean
|
|
795
|
+
})
|
|
758
796
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean
|
|
759
797
|
ignoredNodes?: string[]
|
|
760
798
|
ignoreComments?: boolean
|
|
@@ -783,31 +821,52 @@ type StyleJsxCurlyNewline = []|[(("consistent" | "never") | {
|
|
|
783
821
|
multiline?: ("consistent" | "require" | "forbid")
|
|
784
822
|
})]
|
|
785
823
|
// ----- style/jsx-curly-spacing -----
|
|
786
|
-
type StyleJsxCurlySpacing = []|[(
|
|
787
|
-
|
|
788
|
-
children?: _StyleJsxCurlySpacingBasicConfigOrBoolean
|
|
789
|
-
[k: string]: unknown | undefined
|
|
790
|
-
}) | ("always" | "never"))]|[((_StyleJsxCurlySpacing_BasicConfig & {
|
|
791
|
-
attributes?: _StyleJsxCurlySpacingBasicConfigOrBoolean
|
|
792
|
-
children?: _StyleJsxCurlySpacingBasicConfigOrBoolean
|
|
793
|
-
[k: string]: unknown | undefined
|
|
794
|
-
}) | ("always" | "never")), {
|
|
824
|
+
type StyleJsxCurlySpacing = []|[({
|
|
825
|
+
when?: ("always" | "never")
|
|
795
826
|
allowMultiline?: boolean
|
|
796
827
|
spacing?: {
|
|
797
828
|
objectLiterals?: ("always" | "never")
|
|
798
|
-
[k: string]: unknown | undefined
|
|
799
829
|
}
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
830
|
+
attributes?: ({
|
|
831
|
+
when?: ("always" | "never")
|
|
832
|
+
allowMultiline?: boolean
|
|
833
|
+
spacing?: {
|
|
834
|
+
objectLiterals?: ("always" | "never")
|
|
835
|
+
}
|
|
836
|
+
} | boolean)
|
|
837
|
+
children?: ({
|
|
838
|
+
when?: ("always" | "never")
|
|
839
|
+
allowMultiline?: boolean
|
|
840
|
+
spacing?: {
|
|
841
|
+
objectLiterals?: ("always" | "never")
|
|
842
|
+
}
|
|
843
|
+
} | boolean)
|
|
844
|
+
} | ("always" | "never"))]|[({
|
|
803
845
|
when?: ("always" | "never")
|
|
804
846
|
allowMultiline?: boolean
|
|
805
847
|
spacing?: {
|
|
806
848
|
objectLiterals?: ("always" | "never")
|
|
807
|
-
[k: string]: unknown | undefined
|
|
808
849
|
}
|
|
809
|
-
|
|
810
|
-
|
|
850
|
+
attributes?: ({
|
|
851
|
+
when?: ("always" | "never")
|
|
852
|
+
allowMultiline?: boolean
|
|
853
|
+
spacing?: {
|
|
854
|
+
objectLiterals?: ("always" | "never")
|
|
855
|
+
}
|
|
856
|
+
} | boolean)
|
|
857
|
+
children?: ({
|
|
858
|
+
when?: ("always" | "never")
|
|
859
|
+
allowMultiline?: boolean
|
|
860
|
+
spacing?: {
|
|
861
|
+
objectLiterals?: ("always" | "never")
|
|
862
|
+
}
|
|
863
|
+
} | boolean)
|
|
864
|
+
} | ("always" | "never")), {
|
|
865
|
+
allowMultiline?: boolean
|
|
866
|
+
spacing?: {
|
|
867
|
+
objectLiterals?: ("always" | "never")
|
|
868
|
+
}
|
|
869
|
+
}]
|
|
811
870
|
// ----- style/jsx-equals-spacing -----
|
|
812
871
|
type StyleJsxEqualsSpacing = []|[("always" | "never")]
|
|
813
872
|
// ----- style/jsx-first-prop-new-line -----
|
|
@@ -823,14 +882,12 @@ type StyleJsxIndent = []|[("tab" | number)]|[("tab" | number), {
|
|
|
823
882
|
type StyleJsxIndentProps = []|[(("tab" | "first") | number | {
|
|
824
883
|
indentMode?: (("tab" | "first") | number)
|
|
825
884
|
ignoreTernaryOperator?: boolean
|
|
826
|
-
[k: string]: unknown | undefined
|
|
827
885
|
})]
|
|
828
886
|
// ----- style/jsx-max-props-per-line -----
|
|
829
887
|
type StyleJsxMaxPropsPerLine = []|[({
|
|
830
888
|
maximum?: {
|
|
831
889
|
single?: number
|
|
832
890
|
multi?: number
|
|
833
|
-
[k: string]: unknown | undefined
|
|
834
891
|
}
|
|
835
892
|
} | {
|
|
836
893
|
maximum?: number
|
|
@@ -867,7 +924,8 @@ type StyleJsxSortProps = []|[{
|
|
|
867
924
|
multiline?: ("ignore" | "first" | "last")
|
|
868
925
|
ignoreCase?: boolean
|
|
869
926
|
noSortAlphabetically?: boolean
|
|
870
|
-
reservedFirst?: (
|
|
927
|
+
reservedFirst?: (string[] | boolean)
|
|
928
|
+
reservedLast?: string[]
|
|
871
929
|
locale?: string
|
|
872
930
|
}]
|
|
873
931
|
// ----- style/jsx-tag-spacing -----
|
|
@@ -899,6 +957,7 @@ type StyleKeySpacing = []|[({
|
|
|
899
957
|
mode?: ("strict" | "minimum")
|
|
900
958
|
beforeColon?: boolean
|
|
901
959
|
afterColon?: boolean
|
|
960
|
+
ignoredNodes?: ("ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportAllDeclaration" | "TSTypeLiteral" | "TSInterfaceBody" | "ClassBody")[]
|
|
902
961
|
} | {
|
|
903
962
|
singleLine?: {
|
|
904
963
|
mode?: ("strict" | "minimum")
|
|
@@ -943,18 +1002,6 @@ type StyleKeywordSpacing = []|[{
|
|
|
943
1002
|
before?: boolean
|
|
944
1003
|
after?: boolean
|
|
945
1004
|
}
|
|
946
|
-
as?: {
|
|
947
|
-
before?: boolean
|
|
948
|
-
after?: boolean
|
|
949
|
-
}
|
|
950
|
-
async?: {
|
|
951
|
-
before?: boolean
|
|
952
|
-
after?: boolean
|
|
953
|
-
}
|
|
954
|
-
await?: {
|
|
955
|
-
before?: boolean
|
|
956
|
-
after?: boolean
|
|
957
|
-
}
|
|
958
1005
|
boolean?: {
|
|
959
1006
|
before?: boolean
|
|
960
1007
|
after?: boolean
|
|
@@ -1047,18 +1094,10 @@ type StyleKeywordSpacing = []|[{
|
|
|
1047
1094
|
before?: boolean
|
|
1048
1095
|
after?: boolean
|
|
1049
1096
|
}
|
|
1050
|
-
from?: {
|
|
1051
|
-
before?: boolean
|
|
1052
|
-
after?: boolean
|
|
1053
|
-
}
|
|
1054
1097
|
function?: {
|
|
1055
1098
|
before?: boolean
|
|
1056
1099
|
after?: boolean
|
|
1057
1100
|
}
|
|
1058
|
-
get?: {
|
|
1059
|
-
before?: boolean
|
|
1060
|
-
after?: boolean
|
|
1061
|
-
}
|
|
1062
1101
|
goto?: {
|
|
1063
1102
|
before?: boolean
|
|
1064
1103
|
after?: boolean
|
|
@@ -1091,10 +1130,6 @@ type StyleKeywordSpacing = []|[{
|
|
|
1091
1130
|
before?: boolean
|
|
1092
1131
|
after?: boolean
|
|
1093
1132
|
}
|
|
1094
|
-
let?: {
|
|
1095
|
-
before?: boolean
|
|
1096
|
-
after?: boolean
|
|
1097
|
-
}
|
|
1098
1133
|
long?: {
|
|
1099
1134
|
before?: boolean
|
|
1100
1135
|
after?: boolean
|
|
@@ -1111,10 +1146,6 @@ type StyleKeywordSpacing = []|[{
|
|
|
1111
1146
|
before?: boolean
|
|
1112
1147
|
after?: boolean
|
|
1113
1148
|
}
|
|
1114
|
-
of?: {
|
|
1115
|
-
before?: boolean
|
|
1116
|
-
after?: boolean
|
|
1117
|
-
}
|
|
1118
1149
|
package?: {
|
|
1119
1150
|
before?: boolean
|
|
1120
1151
|
after?: boolean
|
|
@@ -1135,14 +1166,6 @@ type StyleKeywordSpacing = []|[{
|
|
|
1135
1166
|
before?: boolean
|
|
1136
1167
|
after?: boolean
|
|
1137
1168
|
}
|
|
1138
|
-
satisfies?: {
|
|
1139
|
-
before?: boolean
|
|
1140
|
-
after?: boolean
|
|
1141
|
-
}
|
|
1142
|
-
set?: {
|
|
1143
|
-
before?: boolean
|
|
1144
|
-
after?: boolean
|
|
1145
|
-
}
|
|
1146
1169
|
short?: {
|
|
1147
1170
|
before?: boolean
|
|
1148
1171
|
after?: boolean
|
|
@@ -1211,7 +1234,43 @@ type StyleKeywordSpacing = []|[{
|
|
|
1211
1234
|
before?: boolean
|
|
1212
1235
|
after?: boolean
|
|
1213
1236
|
}
|
|
1214
|
-
|
|
1237
|
+
arguments?: {
|
|
1238
|
+
before?: boolean
|
|
1239
|
+
after?: boolean
|
|
1240
|
+
}
|
|
1241
|
+
as?: {
|
|
1242
|
+
before?: boolean
|
|
1243
|
+
after?: boolean
|
|
1244
|
+
}
|
|
1245
|
+
async?: {
|
|
1246
|
+
before?: boolean
|
|
1247
|
+
after?: boolean
|
|
1248
|
+
}
|
|
1249
|
+
await?: {
|
|
1250
|
+
before?: boolean
|
|
1251
|
+
after?: boolean
|
|
1252
|
+
}
|
|
1253
|
+
eval?: {
|
|
1254
|
+
before?: boolean
|
|
1255
|
+
after?: boolean
|
|
1256
|
+
}
|
|
1257
|
+
from?: {
|
|
1258
|
+
before?: boolean
|
|
1259
|
+
after?: boolean
|
|
1260
|
+
}
|
|
1261
|
+
get?: {
|
|
1262
|
+
before?: boolean
|
|
1263
|
+
after?: boolean
|
|
1264
|
+
}
|
|
1265
|
+
let?: {
|
|
1266
|
+
before?: boolean
|
|
1267
|
+
after?: boolean
|
|
1268
|
+
}
|
|
1269
|
+
of?: {
|
|
1270
|
+
before?: boolean
|
|
1271
|
+
after?: boolean
|
|
1272
|
+
}
|
|
1273
|
+
set?: {
|
|
1215
1274
|
before?: boolean
|
|
1216
1275
|
after?: boolean
|
|
1217
1276
|
}
|
|
@@ -1219,6 +1278,22 @@ type StyleKeywordSpacing = []|[{
|
|
|
1219
1278
|
before?: boolean
|
|
1220
1279
|
after?: boolean
|
|
1221
1280
|
}
|
|
1281
|
+
using?: {
|
|
1282
|
+
before?: boolean
|
|
1283
|
+
after?: boolean
|
|
1284
|
+
}
|
|
1285
|
+
yield?: {
|
|
1286
|
+
before?: boolean
|
|
1287
|
+
after?: boolean
|
|
1288
|
+
}
|
|
1289
|
+
accessor?: {
|
|
1290
|
+
before?: boolean
|
|
1291
|
+
after?: boolean
|
|
1292
|
+
}
|
|
1293
|
+
satisfies?: {
|
|
1294
|
+
before?: boolean
|
|
1295
|
+
after?: boolean
|
|
1296
|
+
}
|
|
1222
1297
|
}
|
|
1223
1298
|
}]
|
|
1224
1299
|
// ----- style/line-comment-position -----
|
|
@@ -1385,11 +1460,11 @@ interface _StyleMemberDelimiterStyle_DelimiterConfig {
|
|
|
1385
1460
|
// ----- style/multiline-comment-style -----
|
|
1386
1461
|
type StyleMultilineCommentStyle = ([]|[("starred-block" | "bare-block")] | []|["separate-lines"]|["separate-lines", {
|
|
1387
1462
|
checkJSDoc?: boolean
|
|
1463
|
+
checkExclamation?: boolean
|
|
1388
1464
|
}])
|
|
1389
1465
|
// ----- style/multiline-ternary -----
|
|
1390
1466
|
type StyleMultilineTernary = []|[("always" | "always-multiline" | "never")]|[("always" | "always-multiline" | "never"), {
|
|
1391
1467
|
ignoreJSX?: boolean
|
|
1392
|
-
[k: string]: unknown | undefined
|
|
1393
1468
|
}]
|
|
1394
1469
|
// ----- style/new-parens -----
|
|
1395
1470
|
type StyleNewParens = []|[("always" | "never")]
|
|
@@ -1414,6 +1489,13 @@ type StyleNoExtraParens = ([]|["functions"] | []|["all"]|["all", {
|
|
|
1414
1489
|
enforceForNewInMemberExpressions?: boolean
|
|
1415
1490
|
enforceForFunctionPrototypeMethods?: boolean
|
|
1416
1491
|
allowParensAfterCommentPattern?: string
|
|
1492
|
+
nestedConditionalExpressions?: boolean
|
|
1493
|
+
allowNodesInSpreadElement?: {
|
|
1494
|
+
ConditionalExpression?: boolean
|
|
1495
|
+
LogicalExpression?: boolean
|
|
1496
|
+
AwaitExpression?: boolean
|
|
1497
|
+
}
|
|
1498
|
+
ignoredNodes?: string[]
|
|
1417
1499
|
}])
|
|
1418
1500
|
// ----- style/no-mixed-operators -----
|
|
1419
1501
|
type StyleNoMixedOperators = []|[{
|
|
@@ -1491,16 +1573,33 @@ type StyleObjectCurlyNewline = []|[((("always" | "never") | {
|
|
|
1491
1573
|
minProperties?: number
|
|
1492
1574
|
consistent?: boolean
|
|
1493
1575
|
})
|
|
1576
|
+
TSEnumBody?: (("always" | "never") | {
|
|
1577
|
+
multiline?: boolean
|
|
1578
|
+
minProperties?: number
|
|
1579
|
+
consistent?: boolean
|
|
1580
|
+
})
|
|
1494
1581
|
})]
|
|
1495
1582
|
// ----- style/object-curly-spacing -----
|
|
1496
1583
|
type StyleObjectCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
1497
1584
|
arraysInObjects?: boolean
|
|
1498
1585
|
objectsInObjects?: boolean
|
|
1586
|
+
overrides?: {
|
|
1587
|
+
ObjectPattern?: ("always" | "never")
|
|
1588
|
+
ObjectExpression?: ("always" | "never")
|
|
1589
|
+
ImportDeclaration?: ("always" | "never")
|
|
1590
|
+
ImportAttributes?: ("always" | "never")
|
|
1591
|
+
ExportNamedDeclaration?: ("always" | "never")
|
|
1592
|
+
ExportAllDeclaration?: ("always" | "never")
|
|
1593
|
+
TSMappedType?: ("always" | "never")
|
|
1594
|
+
TSTypeLiteral?: ("always" | "never")
|
|
1595
|
+
TSInterfaceBody?: ("always" | "never")
|
|
1596
|
+
TSEnumBody?: ("always" | "never")
|
|
1597
|
+
}
|
|
1598
|
+
emptyObjects?: ("ignore" | "always" | "never")
|
|
1499
1599
|
}]
|
|
1500
1600
|
// ----- style/object-property-newline -----
|
|
1501
1601
|
type StyleObjectPropertyNewline = []|[{
|
|
1502
1602
|
allowAllPropertiesOnSameLine?: boolean
|
|
1503
|
-
allowMultiplePropertiesPerLine?: boolean
|
|
1504
1603
|
}]
|
|
1505
1604
|
// ----- style/one-var-declaration-per-line -----
|
|
1506
1605
|
type StyleOneVarDeclarationPerLine = []|[("always" | "initializations")]
|
|
@@ -1511,24 +1610,25 @@ type StyleOperatorLinebreak = []|[(("after" | "before" | "none") | null)]|[(("af
|
|
|
1511
1610
|
}
|
|
1512
1611
|
}]
|
|
1513
1612
|
// ----- style/padded-blocks -----
|
|
1514
|
-
type StylePaddedBlocks = []|[(("always" | "never") | {
|
|
1515
|
-
blocks?: ("always" | "never")
|
|
1516
|
-
switches?: ("always" | "never")
|
|
1517
|
-
classes?: ("always" | "never")
|
|
1518
|
-
})]|[(("always" | "never") | {
|
|
1519
|
-
blocks?: ("always" | "never")
|
|
1520
|
-
switches?: ("always" | "never")
|
|
1521
|
-
classes?: ("always" | "never")
|
|
1613
|
+
type StylePaddedBlocks = []|[(("always" | "never" | "start" | "end") | {
|
|
1614
|
+
blocks?: ("always" | "never" | "start" | "end")
|
|
1615
|
+
switches?: ("always" | "never" | "start" | "end")
|
|
1616
|
+
classes?: ("always" | "never" | "start" | "end")
|
|
1617
|
+
})]|[(("always" | "never" | "start" | "end") | {
|
|
1618
|
+
blocks?: ("always" | "never" | "start" | "end")
|
|
1619
|
+
switches?: ("always" | "never" | "start" | "end")
|
|
1620
|
+
classes?: ("always" | "never" | "start" | "end")
|
|
1522
1621
|
}), {
|
|
1523
1622
|
allowSingleLineBlocks?: boolean
|
|
1524
1623
|
}]
|
|
1525
1624
|
// ----- style/padding-line-between-statements -----
|
|
1526
1625
|
type _StylePaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
|
|
1527
|
-
type
|
|
1626
|
+
type _StylePaddingLineBetweenStatementsStatementOption = (_StylePaddingLineBetweenStatementsStatementType | [_StylePaddingLineBetweenStatementsStatementType, ...(_StylePaddingLineBetweenStatementsStatementType)[]])
|
|
1627
|
+
type _StylePaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "return" | "singleline-return" | "multiline-return" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using" | "type" | "singleline-type" | "multiline-type")
|
|
1528
1628
|
type StylePaddingLineBetweenStatements = {
|
|
1529
1629
|
blankLine: _StylePaddingLineBetweenStatementsPaddingType
|
|
1530
|
-
prev:
|
|
1531
|
-
next:
|
|
1630
|
+
prev: _StylePaddingLineBetweenStatementsStatementOption
|
|
1631
|
+
next: _StylePaddingLineBetweenStatementsStatementOption
|
|
1532
1632
|
}[]
|
|
1533
1633
|
// ----- style/quote-props -----
|
|
1534
1634
|
type StyleQuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent-as-needed")] | []|[("always" | "as-needed" | "consistent" | "consistent-as-needed")]|[("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
@@ -1539,7 +1639,7 @@ type StyleQuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent
|
|
|
1539
1639
|
// ----- style/quotes -----
|
|
1540
1640
|
type StyleQuotes = []|[("single" | "double" | "backtick")]|[("single" | "double" | "backtick"), ("avoid-escape" | {
|
|
1541
1641
|
avoidEscape?: boolean
|
|
1542
|
-
allowTemplateLiterals?: boolean
|
|
1642
|
+
allowTemplateLiterals?: (boolean | ("never" | "avoidEscape" | "always"))
|
|
1543
1643
|
ignoreStringLiterals?: boolean
|
|
1544
1644
|
})]
|
|
1545
1645
|
// ----- style/rest-spread-spacing -----
|
|
@@ -1563,12 +1663,14 @@ type StyleSpaceBeforeBlocks = []|[(("always" | "never") | {
|
|
|
1563
1663
|
keywords?: ("always" | "never" | "off")
|
|
1564
1664
|
functions?: ("always" | "never" | "off")
|
|
1565
1665
|
classes?: ("always" | "never" | "off")
|
|
1666
|
+
modules?: ("always" | "never" | "off")
|
|
1566
1667
|
})]
|
|
1567
1668
|
// ----- style/space-before-function-paren -----
|
|
1568
1669
|
type StyleSpaceBeforeFunctionParen = []|[(("always" | "never") | {
|
|
1569
1670
|
anonymous?: ("always" | "never" | "ignore")
|
|
1570
1671
|
named?: ("always" | "never" | "ignore")
|
|
1571
1672
|
asyncArrow?: ("always" | "never" | "ignore")
|
|
1673
|
+
catch?: ("always" | "never" | "ignore")
|
|
1572
1674
|
})]
|
|
1573
1675
|
// ----- style/space-in-parens -----
|
|
1574
1676
|
type StyleSpaceInParens = []|[("always" | "never")]|[("always" | "never"), {
|
|
@@ -1577,6 +1679,7 @@ type StyleSpaceInParens = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
1577
1679
|
// ----- style/space-infix-ops -----
|
|
1578
1680
|
type StyleSpaceInfixOps = []|[{
|
|
1579
1681
|
int32Hint?: boolean
|
|
1682
|
+
ignoreTypes?: boolean
|
|
1580
1683
|
}]
|
|
1581
1684
|
// ----- style/space-unary-ops -----
|
|
1582
1685
|
type StyleSpaceUnaryOps = []|[{
|