@newsteam/eslint-config 0.0.193 → 0.0.195
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/cjs/index.js +1 -0
- package/dist/cjs/overrides/typescript.js +0 -1
- package/dist/cjs/plugins/react/base.js +3 -1
- package/dist/cjs/plugins/react/jsx.js +48 -14
- package/dist/cjs/plugins/stylistic.d.ts +196 -0
- package/dist/cjs/plugins/stylistic.js +737 -0
- package/dist/cjs/plugins/typescript.d.ts +1 -1
- package/dist/cjs/plugins/typescript.js +19 -11
- package/dist/cjs/rules.d.ts +0 -162
- package/dist/cjs/rules.js +0 -580
- package/package.json +12 -10
package/dist/cjs/index.js
CHANGED
|
@@ -356,9 +356,11 @@ module.exports = {
|
|
|
356
356
|
/*
|
|
357
357
|
* Prevent extra closing tags for components without children (fixable)
|
|
358
358
|
*
|
|
359
|
+
* Handled by @stylistic
|
|
360
|
+
*
|
|
359
361
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
|
|
360
362
|
*/
|
|
361
|
-
"react/self-closing-comp": "
|
|
363
|
+
"react/self-closing-comp": "off",
|
|
362
364
|
/*
|
|
363
365
|
* Enforce component methods order (fixable)
|
|
364
366
|
*
|
|
@@ -15,24 +15,32 @@ module.exports = {
|
|
|
15
15
|
/*
|
|
16
16
|
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
|
|
17
17
|
*
|
|
18
|
+
* Handled by @stylistic
|
|
19
|
+
*
|
|
18
20
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md
|
|
19
21
|
*/
|
|
20
|
-
"react/jsx-child-element-spacing": "
|
|
22
|
+
"react/jsx-child-element-spacing": "off",
|
|
21
23
|
/*
|
|
22
24
|
* Validate closing bracket location in JSX (fixable)
|
|
23
25
|
*
|
|
26
|
+
* Handled by @stylistic
|
|
27
|
+
*
|
|
24
28
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md
|
|
25
29
|
*/
|
|
26
|
-
"react/jsx-closing-bracket-location": "
|
|
30
|
+
"react/jsx-closing-bracket-location": "off",
|
|
27
31
|
/*
|
|
28
32
|
* Validate closing tag location in JSX (fixable)
|
|
29
33
|
*
|
|
34
|
+
* Handled by @stylistic
|
|
35
|
+
*
|
|
30
36
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md
|
|
31
37
|
*/
|
|
32
|
-
"react/jsx-closing-tag-location": "
|
|
38
|
+
"react/jsx-closing-tag-location": "off",
|
|
33
39
|
/*
|
|
34
40
|
* Enforce curly braces or disallow unnecessary curly braces in JSX
|
|
35
41
|
*
|
|
42
|
+
* Handled by @stylistic
|
|
43
|
+
*
|
|
36
44
|
* This conflicts with react/jsx-no-literals. Leaving off for now.
|
|
37
45
|
*
|
|
38
46
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
|
|
@@ -41,16 +49,20 @@ module.exports = {
|
|
|
41
49
|
/*
|
|
42
50
|
* Enforce linebreaks in curly braces in JSX attributes and expressions. (fixable)
|
|
43
51
|
*
|
|
52
|
+
* Handled by @stylistic
|
|
53
|
+
*
|
|
44
54
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md
|
|
45
55
|
*/
|
|
46
|
-
"react/jsx-curly-newline": ["
|
|
56
|
+
"react/jsx-curly-newline": ["off", "consistent"],
|
|
47
57
|
/*
|
|
48
58
|
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions (fixable)
|
|
49
59
|
*
|
|
60
|
+
* Handled by @stylistic
|
|
61
|
+
*
|
|
50
62
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
|
|
51
63
|
*/
|
|
52
64
|
"react/jsx-curly-spacing": [
|
|
53
|
-
"
|
|
65
|
+
"off",
|
|
54
66
|
{
|
|
55
67
|
children: { when: "always" },
|
|
56
68
|
when: "always",
|
|
@@ -59,9 +71,11 @@ module.exports = {
|
|
|
59
71
|
/*
|
|
60
72
|
* Enforce or disallow spaces around equal signs in JSX attributes (fixable)
|
|
61
73
|
*
|
|
74
|
+
* Handled by @stylistic
|
|
75
|
+
*
|
|
62
76
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md
|
|
63
77
|
*/
|
|
64
|
-
"react/jsx-equals-spacing": "
|
|
78
|
+
"react/jsx-equals-spacing": "off",
|
|
65
79
|
/*
|
|
66
80
|
* Restrict file extensions that may contain JSX
|
|
67
81
|
*
|
|
@@ -81,9 +95,11 @@ module.exports = {
|
|
|
81
95
|
/*
|
|
82
96
|
* Enforce position of the first prop in JSX (fixable)
|
|
83
97
|
*
|
|
98
|
+
* Handled by @stylistic
|
|
99
|
+
*
|
|
84
100
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md
|
|
85
101
|
*/
|
|
86
|
-
"react/jsx-first-prop-new-line": "
|
|
102
|
+
"react/jsx-first-prop-new-line": "off",
|
|
87
103
|
/*
|
|
88
104
|
* Enforce shorthand or standard form for React fragments
|
|
89
105
|
*
|
|
@@ -102,15 +118,19 @@ module.exports = {
|
|
|
102
118
|
/*
|
|
103
119
|
* Validate JSX indentation (fixable)
|
|
104
120
|
*
|
|
121
|
+
* Handled by @stylistic
|
|
122
|
+
*
|
|
105
123
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md
|
|
106
124
|
*/
|
|
107
|
-
"react/jsx-indent": "
|
|
125
|
+
"react/jsx-indent": "off",
|
|
108
126
|
/*
|
|
109
127
|
* Validate props indentation in JSX (fixable)
|
|
110
128
|
*
|
|
129
|
+
* Handled by @stylistic
|
|
130
|
+
*
|
|
111
131
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md
|
|
112
132
|
*/
|
|
113
|
-
"react/jsx-indent-props": "
|
|
133
|
+
"react/jsx-indent-props": "off",
|
|
114
134
|
/*
|
|
115
135
|
* Validate JSX has key prop when in array or iterator
|
|
116
136
|
*
|
|
@@ -131,6 +151,8 @@ module.exports = {
|
|
|
131
151
|
/*
|
|
132
152
|
* Limit maximum of props on a single line in JSX (fixable)
|
|
133
153
|
*
|
|
154
|
+
* Handled by @stylistic
|
|
155
|
+
*
|
|
134
156
|
* This is off for now because it causes --fix to get into a fight with
|
|
135
157
|
* 'react/jsx-indent', causing an infinite loop of fixing
|
|
136
158
|
*
|
|
@@ -140,6 +162,8 @@ module.exports = {
|
|
|
140
162
|
/*
|
|
141
163
|
* Enforce a new line after jsx elements and expressions (fixable)
|
|
142
164
|
*
|
|
165
|
+
* Handled by @stylistic
|
|
166
|
+
*
|
|
143
167
|
* This is off for now because it this would make too much empty space
|
|
144
168
|
*
|
|
145
169
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-newline.md
|
|
@@ -212,9 +236,11 @@ module.exports = {
|
|
|
212
236
|
/*
|
|
213
237
|
* Limit to one expression per line in JSX
|
|
214
238
|
*
|
|
239
|
+
* Handled by @stylistic
|
|
240
|
+
*
|
|
215
241
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-one-expression-per-line.md
|
|
216
242
|
*/
|
|
217
|
-
"react/jsx-one-expression-per-line": "
|
|
243
|
+
"react/jsx-one-expression-per-line": "off",
|
|
218
244
|
/*
|
|
219
245
|
* Enforce PascalCase for user-defined JSX components
|
|
220
246
|
*
|
|
@@ -224,9 +250,11 @@ module.exports = {
|
|
|
224
250
|
/*
|
|
225
251
|
* Disallow multiple spaces between inline JSX props (fixable)
|
|
226
252
|
*
|
|
253
|
+
* Handled by @stylistic
|
|
254
|
+
*
|
|
227
255
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-multi-spaces.md
|
|
228
256
|
*/
|
|
229
|
-
"react/jsx-props-no-multi-spaces": "
|
|
257
|
+
"react/jsx-props-no-multi-spaces": "off",
|
|
230
258
|
/*
|
|
231
259
|
* Disallow JSX props spreading
|
|
232
260
|
*
|
|
@@ -239,10 +267,12 @@ module.exports = {
|
|
|
239
267
|
/*
|
|
240
268
|
* Enforce props alphabetical sorting (fixable)
|
|
241
269
|
*
|
|
270
|
+
* Handled by @stylistic
|
|
271
|
+
*
|
|
242
272
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
|
|
243
273
|
*/
|
|
244
274
|
"react/jsx-sort-props": [
|
|
245
|
-
"
|
|
275
|
+
"off",
|
|
246
276
|
{
|
|
247
277
|
ignoreCase: true,
|
|
248
278
|
}
|
|
@@ -250,9 +280,11 @@ module.exports = {
|
|
|
250
280
|
/*
|
|
251
281
|
* Validate whitespace in and around the JSX opening and closing brackets (fixable)
|
|
252
282
|
*
|
|
283
|
+
* Handled by @stylistic
|
|
284
|
+
*
|
|
253
285
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md
|
|
254
286
|
*/
|
|
255
|
-
"react/jsx-tag-spacing": "
|
|
287
|
+
"react/jsx-tag-spacing": "off",
|
|
256
288
|
/*
|
|
257
289
|
* Prevent React to be incorrectly marked as unused
|
|
258
290
|
*
|
|
@@ -268,8 +300,10 @@ module.exports = {
|
|
|
268
300
|
/*
|
|
269
301
|
* Prevent missing parentheses around multilines JSX (fixable)
|
|
270
302
|
*
|
|
303
|
+
* Handled by @stylistic
|
|
304
|
+
*
|
|
271
305
|
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md
|
|
272
306
|
*/
|
|
273
|
-
"react/jsx-wrap-multilines": "
|
|
307
|
+
"react/jsx-wrap-multilines": "off",
|
|
274
308
|
},
|
|
275
309
|
};
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
plugins: string[];
|
|
3
|
+
rules: {
|
|
4
|
+
"@stylistic/array-bracket-newline": string[];
|
|
5
|
+
"@stylistic/array-bracket-spacing": string;
|
|
6
|
+
"@stylistic/array-element-newline": string[];
|
|
7
|
+
"@stylistic/arrow-parens": string;
|
|
8
|
+
"@stylistic/arrow-spacing": string;
|
|
9
|
+
"@stylistic/block-spacing": string;
|
|
10
|
+
"@stylistic/brace-style": string;
|
|
11
|
+
"@stylistic/comma-dangle": (string | {
|
|
12
|
+
arrays: string;
|
|
13
|
+
exports: string;
|
|
14
|
+
functions: string;
|
|
15
|
+
imports: string;
|
|
16
|
+
objects: string;
|
|
17
|
+
})[];
|
|
18
|
+
"@stylistic/comma-spacing": string;
|
|
19
|
+
"@stylistic/comma-style": string;
|
|
20
|
+
"@stylistic/computed-property-spacing": string;
|
|
21
|
+
"@stylistic/dot-location": string[];
|
|
22
|
+
"@stylistic/eol-last": string;
|
|
23
|
+
"@stylistic/func-call-spacing": string;
|
|
24
|
+
"@stylistic/function-call-argument-newline": string[];
|
|
25
|
+
"@stylistic/function-call-spacing": string;
|
|
26
|
+
"@stylistic/function-paren-newline": string[];
|
|
27
|
+
"@stylistic/generator-star-spacing": string;
|
|
28
|
+
"@stylistic/implicit-arrow-linebreak": string;
|
|
29
|
+
"@stylistic/indent": (string | number | {
|
|
30
|
+
MemberExpression: number;
|
|
31
|
+
SwitchCase: number;
|
|
32
|
+
})[];
|
|
33
|
+
"@stylistic/jsx-child-element-spacing": string;
|
|
34
|
+
"@stylistic/jsx-closing-bracket-location": string;
|
|
35
|
+
"@stylistic/jsx-closing-tag-location": string;
|
|
36
|
+
"@stylistic/jsx-curly-brace-presence": string;
|
|
37
|
+
"@stylistic/jsx-curly-newline": string[];
|
|
38
|
+
"@stylistic/jsx-curly-spacing": (string | {
|
|
39
|
+
children: {
|
|
40
|
+
when: string;
|
|
41
|
+
};
|
|
42
|
+
when: string;
|
|
43
|
+
})[];
|
|
44
|
+
"@stylistic/jsx-equals-spacing": string;
|
|
45
|
+
"@stylistic/jsx-first-prop-new-line": string;
|
|
46
|
+
"@stylistic/jsx-indent": string;
|
|
47
|
+
"@stylistic/jsx-indent-props": string;
|
|
48
|
+
"@stylistic/jsx-max-props-per-line": string;
|
|
49
|
+
"@stylistic/jsx-newline": string;
|
|
50
|
+
"@stylistic/jsx-one-expression-per-line": string;
|
|
51
|
+
"@stylistic/jsx-props-no-multi-spaces": string;
|
|
52
|
+
"@stylistic/jsx-quotes": string;
|
|
53
|
+
"@stylistic/jsx-self-closing-comp": string;
|
|
54
|
+
"@stylistic/jsx-sort-props": (string | {
|
|
55
|
+
ignoreCase: boolean;
|
|
56
|
+
})[];
|
|
57
|
+
"@stylistic/jsx-tag-spacing": string;
|
|
58
|
+
"@stylistic/jsx-wrap-multilines": string;
|
|
59
|
+
"@stylistic/key-spacing": (string | {
|
|
60
|
+
afterColon: boolean;
|
|
61
|
+
beforeColon: boolean;
|
|
62
|
+
mode: string;
|
|
63
|
+
})[];
|
|
64
|
+
"@stylistic/keyword-spacing": (string | {
|
|
65
|
+
after: boolean;
|
|
66
|
+
before: boolean;
|
|
67
|
+
overrides: {
|
|
68
|
+
as: {
|
|
69
|
+
after: boolean;
|
|
70
|
+
before: boolean;
|
|
71
|
+
};
|
|
72
|
+
case: {
|
|
73
|
+
after: boolean;
|
|
74
|
+
};
|
|
75
|
+
class: {
|
|
76
|
+
after: boolean;
|
|
77
|
+
};
|
|
78
|
+
const: {
|
|
79
|
+
after: boolean;
|
|
80
|
+
};
|
|
81
|
+
default: {
|
|
82
|
+
after: boolean;
|
|
83
|
+
before: boolean;
|
|
84
|
+
};
|
|
85
|
+
export: {
|
|
86
|
+
after: boolean;
|
|
87
|
+
};
|
|
88
|
+
extends: {
|
|
89
|
+
after: boolean;
|
|
90
|
+
before: boolean;
|
|
91
|
+
};
|
|
92
|
+
from: {
|
|
93
|
+
after: boolean;
|
|
94
|
+
before: boolean;
|
|
95
|
+
};
|
|
96
|
+
import: {
|
|
97
|
+
after: boolean;
|
|
98
|
+
};
|
|
99
|
+
let: {
|
|
100
|
+
after: boolean;
|
|
101
|
+
};
|
|
102
|
+
of: {
|
|
103
|
+
after: boolean;
|
|
104
|
+
before: boolean;
|
|
105
|
+
};
|
|
106
|
+
return: {
|
|
107
|
+
after: boolean;
|
|
108
|
+
};
|
|
109
|
+
this: {
|
|
110
|
+
before: boolean;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
})[];
|
|
114
|
+
"@stylistic/linebreak-style": string;
|
|
115
|
+
"@stylistic/lines-around-comment": string;
|
|
116
|
+
"@stylistic/lines-between-class-members": (string | {
|
|
117
|
+
exceptAfterSingleLine: boolean;
|
|
118
|
+
})[];
|
|
119
|
+
"@stylistic/max-len": (string | {
|
|
120
|
+
code: number;
|
|
121
|
+
ignoreComments: boolean;
|
|
122
|
+
})[];
|
|
123
|
+
"@stylistic/max-statements-per-line": (string | {
|
|
124
|
+
max: number;
|
|
125
|
+
})[];
|
|
126
|
+
"@stylistic/member-delimiter-style": string;
|
|
127
|
+
"@stylistic/multiline-ternary": string[];
|
|
128
|
+
"@stylistic/new-parens": string;
|
|
129
|
+
"@stylistic/newline-per-chained-call": (string | {
|
|
130
|
+
ignoreChainWithDepth: number;
|
|
131
|
+
})[];
|
|
132
|
+
"@stylistic/no-confusing-arrow": string;
|
|
133
|
+
"@stylistic/no-extra-parens": (string | {
|
|
134
|
+
ignoreJSX: string;
|
|
135
|
+
})[];
|
|
136
|
+
"@stylistic/no-extra-semi": string;
|
|
137
|
+
"@stylistic/no-floating-decimal": string;
|
|
138
|
+
"@stylistic/no-mixed-operators": string;
|
|
139
|
+
"@stylistic/no-mixed-spaces-and-tabs": string;
|
|
140
|
+
"@stylistic/no-multi-spaces": string;
|
|
141
|
+
"@stylistic/no-multiple-empty-lines": string;
|
|
142
|
+
"@stylistic/no-tabs": string;
|
|
143
|
+
"@stylistic/no-trailing-spaces": string;
|
|
144
|
+
"@stylistic/no-whitespace-before-property": string;
|
|
145
|
+
"@stylistic/nonblock-statement-body-position": string;
|
|
146
|
+
"@stylistic/object-curly-newline": (string | {
|
|
147
|
+
consistent: boolean;
|
|
148
|
+
minProperties: number;
|
|
149
|
+
multiline: boolean;
|
|
150
|
+
})[];
|
|
151
|
+
"@stylistic/object-curly-spacing": string[];
|
|
152
|
+
"@stylistic/object-property-newline": string;
|
|
153
|
+
"@stylistic/one-var-declaration-per-line": string;
|
|
154
|
+
"@stylistic/operator-linebreak": string;
|
|
155
|
+
"@stylistic/padded-blocks": (string | {
|
|
156
|
+
classes: string;
|
|
157
|
+
switches: string;
|
|
158
|
+
})[];
|
|
159
|
+
"@stylistic/padding-line-between-statements": (string | {
|
|
160
|
+
blankLine: string;
|
|
161
|
+
next: string[];
|
|
162
|
+
prev: string[];
|
|
163
|
+
})[];
|
|
164
|
+
"@stylistic/quote-props": string[];
|
|
165
|
+
"@stylistic/quotes": string;
|
|
166
|
+
"@stylistic/rest-spread-spacing": string;
|
|
167
|
+
"@stylistic/semi": string;
|
|
168
|
+
"@stylistic/semi-spacing": string;
|
|
169
|
+
"@stylistic/semi-style": string[];
|
|
170
|
+
"@stylistic/space-before-blocks": (string | {
|
|
171
|
+
classes: string;
|
|
172
|
+
functions: string;
|
|
173
|
+
keywords: string;
|
|
174
|
+
})[];
|
|
175
|
+
"@stylistic/space-before-function-paren": (string | {
|
|
176
|
+
anonymous: string;
|
|
177
|
+
asyncArrow: string;
|
|
178
|
+
named: string;
|
|
179
|
+
})[];
|
|
180
|
+
"@stylistic/space-in-parens": string[];
|
|
181
|
+
"@stylistic/space-infix-ops": string;
|
|
182
|
+
"@stylistic/space-unary-ops": string;
|
|
183
|
+
"@stylistic/spaced-comment": string;
|
|
184
|
+
"@stylistic/switch-colon-spacing": (string | {
|
|
185
|
+
after: boolean;
|
|
186
|
+
before: boolean;
|
|
187
|
+
})[];
|
|
188
|
+
"@stylistic/template-curly-spacing": string[];
|
|
189
|
+
"@stylistic/template-tag-spacing": string;
|
|
190
|
+
"@stylistic/type-annotation-spacing": string;
|
|
191
|
+
"@stylistic/wrap-iife": string;
|
|
192
|
+
"@stylistic/wrap-regex": string;
|
|
193
|
+
"@stylistic/yield-star-spacing": string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
export = _default;
|