linted 21.0.0-rc.14 → 21.0.0-rc.16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/rules/index.d.ts +4 -70
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/js/enable.d.ts.map +1 -1
- package/dist/rules/js/enable.js +36 -9
- package/dist/rules/js/enable.js.map +1 -1
- package/dist/rules/js/stylistic.d.ts.map +1 -1
- package/dist/rules/js/stylistic.js +72 -18
- package/dist/rules/js/stylistic.js.map +1 -1
- package/dist/rules/json/enable.d.ts +2 -35
- package/dist/rules/json/enable.d.ts.map +1 -1
- package/dist/rules/json/enable.js +11 -38
- package/dist/rules/json/enable.js.map +1 -1
- package/dist/rules/json/index.d.ts +2 -35
- package/dist/rules/json/index.d.ts.map +1 -1
- package/dist/rules/svelte/enable.d.ts.map +1 -1
- package/dist/rules/svelte/enable.js +4 -1
- package/dist/rules/svelte/enable.js.map +1 -1
- package/dist/rules/ts/enable.d.ts.map +1 -1
- package/dist/rules/ts/enable.js +20 -5
- package/dist/rules/ts/enable.js.map +1 -1
- package/dist/rules/yml/enable.d.ts.map +1 -1
- package/dist/rules/yml/enable.js +12 -3
- package/dist/rules/yml/enable.js.map +1 -1
- package/dist/rules/yml/enable_x.d.ts.map +1 -1
- package/dist/rules/yml/enable_x.js +4 -1
- package/dist/rules/yml/enable_x.js.map +1 -1
- package/package.json +1 -1
- package/src/rules/js/enable.ts +36 -9
- package/src/rules/js/stylistic.ts +72 -18
- package/src/rules/json/enable.ts +28 -54
- package/src/rules/svelte/enable.ts +4 -1
- package/src/rules/ts/enable.ts +20 -5
- package/src/rules/yml/enable.ts +12 -3
- package/src/rules/yml/enable_x.ts +4 -1
package/src/rules/json/enable.ts
CHANGED
@@ -6,6 +6,7 @@ import {
|
|
6
6
|
Last,
|
7
7
|
Never,
|
8
8
|
Strict,
|
9
|
+
Consistent,
|
9
10
|
} from "../../_strings";
|
10
11
|
|
11
12
|
export default [
|
@@ -18,7 +19,7 @@ export default [
|
|
18
19
|
multiline: true,
|
19
20
|
minItems: null,
|
20
21
|
},
|
21
|
-
]
|
22
|
+
] /* https://eslint.org/docs/latest/rules/array-bracket-newline */,
|
22
23
|
"array-bracket-spacing": [
|
23
24
|
ERROR,
|
24
25
|
Never,
|
@@ -27,37 +28,29 @@ export default [
|
|
27
28
|
objectsInArrays: false,
|
28
29
|
arraysInArrays: false,
|
29
30
|
},
|
30
|
-
]
|
31
|
+
] /* https://eslint.org/docs/latest/rules/array-bracket-spacing */,
|
31
32
|
"array-element-newline": [
|
32
33
|
ERROR,
|
33
|
-
|
34
|
-
|
35
|
-
consistent: true,
|
36
|
-
multiline: true,
|
37
|
-
minItems: 4,
|
38
|
-
},
|
39
|
-
ArrayPattern: {
|
40
|
-
consistent: true,
|
41
|
-
multiline: true,
|
42
|
-
minItems: 4,
|
43
|
-
},
|
44
|
-
},
|
45
|
-
],
|
34
|
+
Consistent,
|
35
|
+
] /* https://eslint.org/docs/latest/rules/array-element-newline */,
|
46
36
|
"brace-style": [
|
47
37
|
ERROR,
|
48
38
|
"stroustrup",
|
49
39
|
{
|
50
40
|
allowSingleLine: true,
|
51
41
|
},
|
52
|
-
]
|
53
|
-
"comma-dangle": [
|
42
|
+
] /* https://eslint.org/docs/latest/rules/brace-style */,
|
43
|
+
"comma-dangle": [
|
44
|
+
ERROR,
|
45
|
+
AlwaysMultiline,
|
46
|
+
] /* https://eslint.org/docs/latest/rules/comma-dangle */,
|
54
47
|
"comma-spacing": [
|
55
48
|
ERROR,
|
56
49
|
{
|
57
50
|
before: false,
|
58
51
|
after: true,
|
59
52
|
},
|
60
|
-
]
|
53
|
+
] /* https://eslint.org/docs/latest/rules/comma-spacing */,
|
61
54
|
"comma-style": [
|
62
55
|
ERROR,
|
63
56
|
Last,
|
@@ -76,8 +69,11 @@ export default [
|
|
76
69
|
NewExpression: false,
|
77
70
|
},
|
78
71
|
},
|
79
|
-
]
|
80
|
-
"eol-last": [
|
72
|
+
] /* https://eslint.org/docs/latest/rules/comma-style */,
|
73
|
+
"eol-last": [
|
74
|
+
ERROR,
|
75
|
+
Always,
|
76
|
+
] /* https://eslint.org/docs/latest/rules/eol-last */,
|
81
77
|
"key-spacing": [
|
82
78
|
ERROR,
|
83
79
|
{
|
@@ -85,7 +81,7 @@ export default [
|
|
85
81
|
afterColon: true,
|
86
82
|
mode: Strict,
|
87
83
|
},
|
88
|
-
]
|
84
|
+
] /* https://eslint.org/docs/latest/rules/key-spacing */,
|
89
85
|
indent: [
|
90
86
|
ERROR,
|
91
87
|
2,
|
@@ -106,8 +102,8 @@ export default [
|
|
106
102
|
offsetTernaryExpressions: true,
|
107
103
|
ignoreComments: false,
|
108
104
|
},
|
109
|
-
]
|
110
|
-
"no-mixed-spaces-and-tabs": ERROR
|
105
|
+
] /* https://eslint.org/docs/latest/rules/indent */,
|
106
|
+
"no-mixed-spaces-and-tabs": ERROR /* https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs */,
|
111
107
|
"no-multi-spaces": [
|
112
108
|
ERROR,
|
113
109
|
{
|
@@ -116,9 +112,8 @@ export default [
|
|
116
112
|
Property: false,
|
117
113
|
ImportAttributes: false,
|
118
114
|
},
|
119
|
-
includeTabs: true,
|
120
115
|
},
|
121
|
-
]
|
116
|
+
] /* https://eslint.org/docs/latest/rules/no-multi-spaces */,
|
122
117
|
"no-multiple-empty-lines": [
|
123
118
|
ERROR,
|
124
119
|
{
|
@@ -126,46 +121,25 @@ export default [
|
|
126
121
|
maxEOF: 1,
|
127
122
|
maxBOF: 0,
|
128
123
|
},
|
129
|
-
]
|
124
|
+
] /* https://eslint.org/docs/latest/rules/no-multiple-empty-lines */,
|
130
125
|
"no-tabs": [
|
131
126
|
ERROR,
|
132
127
|
{
|
133
128
|
allowIndentationTabs: false,
|
134
129
|
},
|
135
|
-
]
|
130
|
+
] /* https://eslint.org/docs/latest/rules/no-tabs */,
|
136
131
|
"no-trailing-spaces": [
|
137
132
|
ERROR,
|
138
133
|
{
|
139
134
|
skipBlankLines: false,
|
140
135
|
ignoreComments: false,
|
141
136
|
},
|
142
|
-
]
|
143
|
-
"no-whitespace-before-property": ERROR
|
137
|
+
] /* https://eslint.org/docs/latest/rules/no-trailing-spaces */,
|
138
|
+
"no-whitespace-before-property": ERROR /* https://eslint.org/docs/latest/rules/no-whitespace-before-property */,
|
144
139
|
"object-curly-newline": [
|
145
140
|
ERROR,
|
146
|
-
|
147
|
-
|
148
|
-
consistent: true,
|
149
|
-
multiline: true,
|
150
|
-
minProperties: 4,
|
151
|
-
},
|
152
|
-
ObjectPattern: {
|
153
|
-
consistent: true,
|
154
|
-
multiline: true,
|
155
|
-
minProperties: 4,
|
156
|
-
},
|
157
|
-
ImportDeclaration: {
|
158
|
-
consistent: true,
|
159
|
-
multiline: true,
|
160
|
-
minProperties: 4,
|
161
|
-
},
|
162
|
-
ExportDeclaration: {
|
163
|
-
consistent: true,
|
164
|
-
multiline: true,
|
165
|
-
minProperties: 4,
|
166
|
-
},
|
167
|
-
},
|
168
|
-
],
|
141
|
+
Consistent,
|
142
|
+
] /* https://eslint.org/docs/latest/rules/object-curly-newline */,
|
169
143
|
"object-curly-spacing": [
|
170
144
|
ERROR,
|
171
145
|
Always,
|
@@ -173,12 +147,12 @@ export default [
|
|
173
147
|
arraysInObjects: true,
|
174
148
|
objectsInObjects: true,
|
175
149
|
},
|
176
|
-
]
|
150
|
+
] /* https://eslint.org/docs/latest/rules/object-curly-spacing */,
|
177
151
|
"object-property-newline": [
|
178
152
|
ERROR,
|
179
153
|
{
|
180
154
|
allowAllPropertiesOnSameLine: true,
|
181
155
|
},
|
182
|
-
]
|
156
|
+
] /* https://eslint.org/docs/latest/rules/object-property-newline */,
|
183
157
|
},
|
184
158
|
] as const;
|
package/src/rules/ts/enable.ts
CHANGED
@@ -32,9 +32,18 @@ export default [
|
|
32
32
|
},
|
33
33
|
],
|
34
34
|
"@typescript-eslint/ban-tslint-comment": ERROR,
|
35
|
-
"@typescript-eslint/class-literal-property-style": [
|
36
|
-
|
37
|
-
|
35
|
+
"@typescript-eslint/class-literal-property-style": [
|
36
|
+
ERROR,
|
37
|
+
"fields",
|
38
|
+
],
|
39
|
+
"@typescript-eslint/consistent-generic-constructors": [
|
40
|
+
ERROR,
|
41
|
+
"constructor",
|
42
|
+
],
|
43
|
+
"@typescript-eslint/consistent-indexed-object-style": [
|
44
|
+
ERROR,
|
45
|
+
"record",
|
46
|
+
],
|
38
47
|
"@typescript-eslint/consistent-type-assertions": [
|
39
48
|
ERROR,
|
40
49
|
{
|
@@ -242,7 +251,10 @@ export default [
|
|
242
251
|
|
243
252
|
},
|
244
253
|
],
|
245
|
-
"@typescript-eslint/method-signature-style": [
|
254
|
+
"@typescript-eslint/method-signature-style": [
|
255
|
+
ERROR,
|
256
|
+
"property",
|
257
|
+
],
|
246
258
|
"@typescript-eslint/naming-convention": OFF,
|
247
259
|
"@typescript-eslint/no-array-delete": ERROR,
|
248
260
|
"@typescript-eslint/no-base-to-string": [
|
@@ -504,7 +516,10 @@ export default [
|
|
504
516
|
allowRegExp: false,
|
505
517
|
}, /* investigate: make stricter */
|
506
518
|
],
|
507
|
-
"@typescript-eslint/return-await": [
|
519
|
+
"@typescript-eslint/return-await": [
|
520
|
+
ERROR,
|
521
|
+
"in-try-catch",
|
522
|
+
] /* BUG: doc incorrectly states that this extends the DEPRECATED (since 8.46) no-return-await: https://typescript-eslint.io/rules/return-await */,
|
508
523
|
"@typescript-eslint/strict-boolean-expressions": [
|
509
524
|
ERROR,
|
510
525
|
{
|
package/src/rules/yml/enable.ts
CHANGED
@@ -11,8 +11,14 @@ export default [
|
|
11
11
|
enable,
|
12
12
|
{
|
13
13
|
// https://ota-meshi.github.io/eslint-plugin-yml/rules/#yaml-rules
|
14
|
-
"yml/block-mapping-colon-indicator-newline": [
|
15
|
-
|
14
|
+
"yml/block-mapping-colon-indicator-newline": [
|
15
|
+
ERROR,
|
16
|
+
Never,
|
17
|
+
],
|
18
|
+
"yml/block-mapping-question-indicator-newline": [
|
19
|
+
ERROR,
|
20
|
+
Never,
|
21
|
+
],
|
16
22
|
"yml/block-mapping": [
|
17
23
|
ERROR,
|
18
24
|
{
|
@@ -51,7 +57,10 @@ export default [
|
|
51
57
|
"yml/no-empty-sequence-entry": ERROR,
|
52
58
|
"yml/no-tab-indent": ERROR,
|
53
59
|
"yml/no-trailing-zeros": ERROR,
|
54
|
-
"yml/plain-scalar": [
|
60
|
+
"yml/plain-scalar": [
|
61
|
+
ERROR,
|
62
|
+
Always,
|
63
|
+
],
|
55
64
|
"yml/quotes": [
|
56
65
|
ERROR,
|
57
66
|
{
|