@perfective/eslint-config 0.29.1 → 0.30.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/LICENSE +1 -1
- package/README.adoc +24 -19
- package/README.md +20 -17
- package/config/node.d.ts +7 -0
- package/config/node.js +7 -11
- package/config/plugin.d.ts +9 -0
- package/config/plugin.js +22 -26
- package/config.js +1 -6
- package/cypress.d.ts +5 -0
- package/cypress.js +31 -58
- package/index.d.ts +58 -26
- package/index.js +100 -145
- package/jest-dom.js +8 -11
- package/jest.d.ts +6 -0
- package/jest.js +29 -24
- package/package.json +18 -18
- package/rules/array-func/index.d.ts +1 -2
- package/rules/array-func/index.js +14 -50
- package/rules/cypress/index.d.ts +11 -3
- package/rules/cypress/index.js +23 -57
- package/rules/eslint/index.js +6 -9
- package/rules/eslint/layout-formatting.js +64 -67
- package/rules/eslint/possible-problems.js +96 -99
- package/rules/eslint/suggestions.js +181 -182
- package/rules/eslint-comments/best-practices.js +8 -11
- package/rules/eslint-comments/index.d.ts +1 -2
- package/rules/eslint-comments/index.js +9 -45
- package/rules/eslint-comments/stylistic-issues.js +9 -18
- package/rules/import/helpful-warnings.js +11 -14
- package/rules/import/index.js +11 -14
- package/rules/import/module-systems.js +10 -13
- package/rules/import/rules/no-extraneous-dependencies.d.ts +3 -0
- package/rules/import/rules/no-extraneous-dependencies.js +20 -21
- package/rules/import/static-analysis.js +26 -29
- package/rules/import/style-guide.js +33 -36
- package/rules/jest/index.js +98 -72
- package/rules/jest/typescript-eslint.js +5 -8
- package/rules/jest-dom/index.js +19 -55
- package/rules/jsdoc/index.d.ts +1 -1
- package/rules/jsdoc/index.js +158 -344
- package/rules/n/index.d.ts +1 -1
- package/rules/n/index.js +64 -98
- package/rules/prefer-arrow/index.d.ts +1 -2
- package/rules/prefer-arrow/index.js +14 -50
- package/rules/promise/index.d.ts +1 -2
- package/rules/promise/index.js +35 -73
- package/rules/rxjs/index.d.ts +1 -1
- package/rules/rxjs/index.js +60 -96
- package/rules/security/index.d.ts +1 -2
- package/rules/security/index.js +22 -58
- package/rules/simple-import-sort/index.js +12 -48
- package/rules/simple-import-sort/rules/imports.d.ts +11 -0
- package/rules/simple-import-sort/rules/imports.js +18 -32
- package/rules/stylistic/js/index.d.ts +9 -2
- package/rules/stylistic/js/index.js +198 -236
- package/rules/stylistic/jsx/index.d.ts +8 -2
- package/rules/stylistic/jsx/index.js +81 -117
- package/rules/stylistic/plus/index.d.ts +6 -2
- package/rules/stylistic/plus/index.js +14 -50
- package/rules/stylistic/ts/index.d.ts +8 -2
- package/rules/stylistic/ts/index.js +135 -169
- package/rules/testing-library/index.js +41 -77
- package/rules/typescript-eslint/extension-rules.js +113 -116
- package/rules/typescript-eslint/index.d.ts +2 -0
- package/rules/typescript-eslint/index.js +9 -45
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +5 -0
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +24 -30
- package/rules/typescript-eslint/supported-rules.d.ts +2 -0
- package/rules/typescript-eslint/supported-rules.js +256 -319
- package/rules/unicorn/index.d.ts +7 -2
- package/rules/unicorn/index.js +178 -209
- package/rules/unicorn/rules/prevent-abbreviations.d.ts +8 -0
- package/rules/unicorn/rules/prevent-abbreviations.js +30 -8
- package/rules.js +4 -14
- package/rxjs.d.ts +5 -0
- package/rxjs.js +21 -57
- package/testing-library.js +8 -11
|
@@ -1,48 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.simpleImportSortConfig = void 0;
|
|
37
|
-
const eslintPluginSimpleImportSort = __importStar(require("eslint-plugin-simple-import-sort"));
|
|
38
|
-
const imports_1 = require("./rules/imports");
|
|
39
|
-
exports.simpleImportSortConfig = {
|
|
40
|
-
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
41
|
-
plugins: {
|
|
42
|
-
'simple-import-sort': eslintPluginSimpleImportSort,
|
|
43
|
-
},
|
|
44
|
-
rules: {
|
|
45
|
-
'simple-import-sort/exports': 'warn',
|
|
46
|
-
'simple-import-sort/imports': ['warn', (0, imports_1.simpleImportSortImports)()],
|
|
47
|
-
},
|
|
48
|
-
};
|
|
1
|
+
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
2
|
+
import { simpleImportSortImports } from "./rules/imports.js";
|
|
3
|
+
export const simpleImportSortConfig = {
|
|
4
|
+
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
5
|
+
plugins: {
|
|
6
|
+
'simple-import-sort': eslintPluginSimpleImportSort
|
|
7
|
+
},
|
|
8
|
+
rules: {
|
|
9
|
+
'simple-import-sort/exports': 'warn',
|
|
10
|
+
'simple-import-sort/imports': ['warn', simpleImportSortImports()]
|
|
11
|
+
}
|
|
12
|
+
};
|
|
@@ -3,6 +3,17 @@ export type Group = Match[];
|
|
|
3
3
|
export interface SimpleImportSortImports {
|
|
4
4
|
groups: Group[];
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for the "simple-import-sort/imports" ESLint rule.
|
|
8
|
+
*
|
|
9
|
+
* @param internal - A list of internal scopes. Each scope will sorted in its own group.
|
|
10
|
+
*/
|
|
6
11
|
export declare function simpleImportSortImports(internal?: string[]): SimpleImportSortImports;
|
|
12
|
+
/**
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
7
15
|
export declare function scopedPackages(exclude: string[]): Group;
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
8
19
|
export declare function internalPackages(internal: string[]): Group[];
|
|
@@ -1,46 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.internalPackages = internalPackages;
|
|
6
|
-
function simpleImportSortImports(internal = []) {
|
|
7
|
-
return {
|
|
8
|
-
groups: [
|
|
9
|
-
sideEffects(),
|
|
10
|
-
nodePrefixedModules(),
|
|
11
|
-
unscopedPackages(),
|
|
12
|
-
scopedPackages(internal),
|
|
13
|
-
...internalPackages(internal),
|
|
14
|
-
parentImports(),
|
|
15
|
-
relativeImports(),
|
|
16
|
-
styleImports(),
|
|
17
|
-
].filter(group => group.length > 0),
|
|
18
|
-
};
|
|
1
|
+
export function simpleImportSortImports(internal = []) {
|
|
2
|
+
return {
|
|
3
|
+
groups: [sideEffects(), nodePrefixedModules(), unscopedPackages(), scopedPackages(internal), ...internalPackages(internal), parentImports(), relativeImports(), styleImports()].filter(group => group.length > 0)
|
|
4
|
+
};
|
|
19
5
|
}
|
|
20
6
|
function sideEffects() {
|
|
21
|
-
|
|
7
|
+
return ['^\\u0000'];
|
|
22
8
|
}
|
|
23
9
|
function nodePrefixedModules() {
|
|
24
|
-
|
|
10
|
+
return ['^node:'];
|
|
25
11
|
}
|
|
26
12
|
function unscopedPackages() {
|
|
27
|
-
|
|
13
|
+
return ['^[a-zA-Z]'];
|
|
28
14
|
}
|
|
29
|
-
function scopedPackages(exclude) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
export function scopedPackages(exclude) {
|
|
16
|
+
if (exclude.length === 0) {
|
|
17
|
+
return ['^@'];
|
|
18
|
+
}
|
|
19
|
+
return [`^(?!${exclude.join('|')})@`];
|
|
34
20
|
}
|
|
35
|
-
function internalPackages(internal) {
|
|
36
|
-
|
|
21
|
+
export function internalPackages(internal) {
|
|
22
|
+
return internal.map(scope => [`^${scope}`]);
|
|
37
23
|
}
|
|
38
24
|
function parentImports() {
|
|
39
|
-
|
|
25
|
+
return ['^\\.\\.(?!/?$)', '^\\.\\./?$'];
|
|
40
26
|
}
|
|
41
27
|
function relativeImports() {
|
|
42
|
-
|
|
28
|
+
return ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'];
|
|
43
29
|
}
|
|
44
30
|
function styleImports() {
|
|
45
|
-
|
|
46
|
-
}
|
|
31
|
+
return ['^.+\\.s?css$'];
|
|
32
|
+
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import * as eslintPluginStylisticJs from '@stylistic/eslint-plugin-js';
|
|
2
1
|
export declare const stylisticJsConfig: {
|
|
3
2
|
plugins: {
|
|
4
|
-
'@stylistic/js':
|
|
3
|
+
'@stylistic/js': {
|
|
4
|
+
rules: import("@stylistic/eslint-plugin-js").Rules;
|
|
5
|
+
configs: {
|
|
6
|
+
"disable-legacy": import("eslint").Linter.Config;
|
|
7
|
+
"all": import("eslint").Linter.Config;
|
|
8
|
+
"all-flat": import("eslint").Linter.Config;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
5
11
|
};
|
|
6
12
|
rules: {
|
|
7
13
|
'@stylistic/js/array-bracket-newline': string[];
|
|
@@ -100,6 +106,7 @@ export declare const stylisticJsConfig: {
|
|
|
100
106
|
'@stylistic/js/no-extra-parens': (string | {
|
|
101
107
|
ignoreJSX: string;
|
|
102
108
|
nestedBinaryExpressions: boolean;
|
|
109
|
+
nestedConditionalExpressions: boolean;
|
|
103
110
|
enforceForArrowConditionals: boolean;
|
|
104
111
|
ternaryOperandBinaryExpressions: boolean;
|
|
105
112
|
})[];
|
|
@@ -1,236 +1,198 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
'
|
|
143
|
-
'
|
|
144
|
-
'
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
'@stylistic/js/semi-spacing': ['warn', {
|
|
200
|
-
before: false,
|
|
201
|
-
after: true,
|
|
202
|
-
}],
|
|
203
|
-
'@stylistic/js/semi-style': ['warn', 'last'],
|
|
204
|
-
'@stylistic/js/space-before-blocks': ['warn', 'always'],
|
|
205
|
-
'@stylistic/js/space-before-function-paren': ['warn', {
|
|
206
|
-
anonymous: 'always',
|
|
207
|
-
named: 'never',
|
|
208
|
-
asyncArrow: 'always',
|
|
209
|
-
}],
|
|
210
|
-
'@stylistic/js/space-in-parens': ['warn', 'never'],
|
|
211
|
-
'@stylistic/js/space-infix-ops': ['warn', {
|
|
212
|
-
int32Hint: false,
|
|
213
|
-
}],
|
|
214
|
-
'@stylistic/js/space-unary-ops': ['warn', {
|
|
215
|
-
words: true,
|
|
216
|
-
nonwords: false,
|
|
217
|
-
}],
|
|
218
|
-
'@stylistic/js/spaced-comment': ['warn', 'always', {
|
|
219
|
-
line: {
|
|
220
|
-
markers: ['/ <reference'],
|
|
221
|
-
},
|
|
222
|
-
}],
|
|
223
|
-
'@stylistic/js/switch-colon-spacing': ['warn', {
|
|
224
|
-
after: true,
|
|
225
|
-
before: false,
|
|
226
|
-
}],
|
|
227
|
-
'@stylistic/js/template-curly-spacing': ['warn', 'never'],
|
|
228
|
-
'@stylistic/js/template-tag-spacing': ['warn', 'never'],
|
|
229
|
-
'@stylistic/js/wrap-iife': ['warn', 'outside'],
|
|
230
|
-
'@stylistic/js/wrap-regex': 'warn',
|
|
231
|
-
'@stylistic/js/yield-star-spacing': ['warn', {
|
|
232
|
-
before: true,
|
|
233
|
-
after: false,
|
|
234
|
-
}],
|
|
235
|
-
},
|
|
236
|
-
};
|
|
1
|
+
import eslintPluginStylisticJs from '@stylistic/eslint-plugin-js';
|
|
2
|
+
export const stylisticJsConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
'@stylistic/js': eslintPluginStylisticJs
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'@stylistic/js/array-bracket-newline': ['warn', 'consistent'],
|
|
8
|
+
'@stylistic/js/array-bracket-spacing': ['warn', 'never'],
|
|
9
|
+
'@stylistic/js/array-element-newline': ['warn', 'consistent'],
|
|
10
|
+
'@stylistic/js/arrow-parens': ['warn', 'as-needed'],
|
|
11
|
+
'@stylistic/js/arrow-spacing': ['warn', {
|
|
12
|
+
before: true,
|
|
13
|
+
after: true
|
|
14
|
+
}],
|
|
15
|
+
'@stylistic/js/block-spacing': ['warn', 'always'],
|
|
16
|
+
'@stylistic/js/brace-style': ['warn', 'stroustrup', {
|
|
17
|
+
allowSingleLine: false
|
|
18
|
+
}],
|
|
19
|
+
'@stylistic/js/comma-dangle': ['warn', {
|
|
20
|
+
arrays: 'always-multiline',
|
|
21
|
+
objects: 'always-multiline',
|
|
22
|
+
imports: 'always-multiline',
|
|
23
|
+
exports: 'always-multiline',
|
|
24
|
+
functions: 'always-multiline'
|
|
25
|
+
}],
|
|
26
|
+
'@stylistic/js/comma-spacing': ['warn', {
|
|
27
|
+
before: false,
|
|
28
|
+
after: true
|
|
29
|
+
}],
|
|
30
|
+
'@stylistic/js/comma-style': ['warn', 'last'],
|
|
31
|
+
'@stylistic/js/computed-property-spacing': ['warn', 'never'],
|
|
32
|
+
'@stylistic/js/dot-location': ['warn', 'property'],
|
|
33
|
+
'@stylistic/js/eol-last': ['warn', 'always'],
|
|
34
|
+
'@stylistic/js/func-call-spacing': 'off',
|
|
35
|
+
'@stylistic/js/function-call-argument-newline': ['warn', 'consistent'],
|
|
36
|
+
'@stylistic/js/function-call-spacing': ['warn', 'never'],
|
|
37
|
+
'@stylistic/js/function-paren-newline': ['warn', 'consistent'],
|
|
38
|
+
'@stylistic/js/generator-star-spacing': ['warn', {
|
|
39
|
+
before: true,
|
|
40
|
+
after: false
|
|
41
|
+
}],
|
|
42
|
+
'@stylistic/js/implicit-arrow-linebreak': ['warn', 'beside'],
|
|
43
|
+
'@stylistic/js/indent': ['warn', 4, {
|
|
44
|
+
SwitchCase: 1
|
|
45
|
+
}],
|
|
46
|
+
'@stylistic/js/jsx-quotes': ['warn', 'prefer-double'],
|
|
47
|
+
'@stylistic/js/key-spacing': ['warn', {
|
|
48
|
+
beforeColon: false,
|
|
49
|
+
afterColon: true,
|
|
50
|
+
mode: 'strict'
|
|
51
|
+
}],
|
|
52
|
+
'@stylistic/js/keyword-spacing': ['warn', {
|
|
53
|
+
before: true,
|
|
54
|
+
after: true
|
|
55
|
+
}],
|
|
56
|
+
'@stylistic/js/line-comment-position': ['error', {
|
|
57
|
+
position: 'above',
|
|
58
|
+
ignorePattern: '^ == .+'
|
|
59
|
+
}],
|
|
60
|
+
'@stylistic/js/linebreak-style': ['warn', 'unix'],
|
|
61
|
+
'@stylistic/js/lines-around-comment': ['warn', {
|
|
62
|
+
beforeBlockComment: true,
|
|
63
|
+
afterBlockComment: false,
|
|
64
|
+
beforeLineComment: false,
|
|
65
|
+
afterLineComment: false,
|
|
66
|
+
allowBlockStart: false,
|
|
67
|
+
allowBlockEnd: false,
|
|
68
|
+
allowObjectStart: false,
|
|
69
|
+
allowObjectEnd: false,
|
|
70
|
+
allowArrayStart: false,
|
|
71
|
+
allowArrayEnd: false,
|
|
72
|
+
allowClassStart: true,
|
|
73
|
+
allowClassEnd: false,
|
|
74
|
+
afterHashbangComment: true
|
|
75
|
+
}],
|
|
76
|
+
'@stylistic/js/lines-between-class-members': ['warn', 'always', {
|
|
77
|
+
exceptAfterSingleLine: true
|
|
78
|
+
}],
|
|
79
|
+
'@stylistic/js/max-len': ['error', {
|
|
80
|
+
code: 120,
|
|
81
|
+
tabWidth: 4,
|
|
82
|
+
ignoreRegExpLiterals: true,
|
|
83
|
+
ignoreUrls: true
|
|
84
|
+
}],
|
|
85
|
+
'@stylistic/js/max-statements-per-line': ['error', {
|
|
86
|
+
max: 1
|
|
87
|
+
}],
|
|
88
|
+
'@stylistic/js/multiline-comment-style': ['warn', 'separate-lines', {
|
|
89
|
+
checkJSDoc: false
|
|
90
|
+
}],
|
|
91
|
+
'@stylistic/js/multiline-ternary': ['warn', 'always-multiline'],
|
|
92
|
+
'@stylistic/js/new-parens': 'warn',
|
|
93
|
+
'@stylistic/js/newline-per-chained-call': ['off', {
|
|
94
|
+
ignoreChainWithDepth: 3
|
|
95
|
+
}],
|
|
96
|
+
'@stylistic/js/no-confusing-arrow': ['warn', {
|
|
97
|
+
allowParens: true,
|
|
98
|
+
onlyOneSimpleParam: false
|
|
99
|
+
}],
|
|
100
|
+
'@stylistic/js/no-extra-parens': ['warn', 'all', {
|
|
101
|
+
ignoreJSX: 'all',
|
|
102
|
+
nestedBinaryExpressions: false,
|
|
103
|
+
nestedConditionalExpressions: false,
|
|
104
|
+
enforceForArrowConditionals: false,
|
|
105
|
+
ternaryOperandBinaryExpressions: false
|
|
106
|
+
}],
|
|
107
|
+
'@stylistic/js/no-extra-semi': 'warn',
|
|
108
|
+
'@stylistic/js/no-floating-decimal': 'warn',
|
|
109
|
+
'@stylistic/js/no-mixed-operators': ['error', {
|
|
110
|
+
groups: [['+', '-'], ['*', '/', '%', '**'], ['&', '|', '^', '~', '<<', '>>', '>>>'], ['==', '!=', '===', '!==', '>', '>=', '<', '<='], ['&&', '||', '?:', '??'], ['in', 'instanceof']],
|
|
111
|
+
allowSamePrecedence: true
|
|
112
|
+
}],
|
|
113
|
+
'@stylistic/js/no-mixed-spaces-and-tabs': 'error',
|
|
114
|
+
'@stylistic/js/no-multi-spaces': 'warn',
|
|
115
|
+
'@stylistic/js/no-multiple-empty-lines': ['warn', {
|
|
116
|
+
max: 1,
|
|
117
|
+
maxEOF: 0,
|
|
118
|
+
maxBOF: 0
|
|
119
|
+
}],
|
|
120
|
+
'@stylistic/js/no-tabs': 'error',
|
|
121
|
+
'@stylistic/js/no-trailing-spaces': 'warn',
|
|
122
|
+
'@stylistic/js/no-whitespace-before-property': 'warn',
|
|
123
|
+
'@stylistic/js/nonblock-statement-body-position': ['warn', 'below'],
|
|
124
|
+
'@stylistic/js/object-curly-newline': ['warn', {
|
|
125
|
+
ImportDeclaration: {
|
|
126
|
+
multiline: true
|
|
127
|
+
},
|
|
128
|
+
ExportDeclaration: {
|
|
129
|
+
multiline: true
|
|
130
|
+
}
|
|
131
|
+
}],
|
|
132
|
+
'@stylistic/js/object-curly-spacing': ['warn', 'always', {
|
|
133
|
+
arraysInObjects: true,
|
|
134
|
+
objectsInObjects: true
|
|
135
|
+
}],
|
|
136
|
+
'@stylistic/js/object-property-newline': ['warn', {
|
|
137
|
+
allowAllPropertiesOnSameLine: true
|
|
138
|
+
}],
|
|
139
|
+
'@stylistic/js/one-var-declaration-per-line': ['warn', 'always'],
|
|
140
|
+
'@stylistic/js/operator-linebreak': ['warn', 'before', {
|
|
141
|
+
overrides: {
|
|
142
|
+
'=': 'none',
|
|
143
|
+
'==': 'none',
|
|
144
|
+
'!=': 'none',
|
|
145
|
+
'>=': 'none',
|
|
146
|
+
'<=': 'none',
|
|
147
|
+
'===': 'none',
|
|
148
|
+
'+=': 'none'
|
|
149
|
+
}
|
|
150
|
+
}],
|
|
151
|
+
'@stylistic/js/padded-blocks': ['warn', 'never'],
|
|
152
|
+
'@stylistic/js/padding-line-between-statements': 'off',
|
|
153
|
+
'@stylistic/js/quote-props': ['warn', 'consistent-as-needed'],
|
|
154
|
+
'@stylistic/js/quotes': ['warn', 'single', {
|
|
155
|
+
avoidEscape: true,
|
|
156
|
+
allowTemplateLiterals: true,
|
|
157
|
+
ignoreStringLiterals: false
|
|
158
|
+
}],
|
|
159
|
+
'@stylistic/js/rest-spread-spacing': ['warn', 'never'],
|
|
160
|
+
'@stylistic/js/semi': ['warn', 'always'],
|
|
161
|
+
'@stylistic/js/semi-spacing': ['warn', {
|
|
162
|
+
before: false,
|
|
163
|
+
after: true
|
|
164
|
+
}],
|
|
165
|
+
'@stylistic/js/semi-style': ['warn', 'last'],
|
|
166
|
+
'@stylistic/js/space-before-blocks': ['warn', 'always'],
|
|
167
|
+
'@stylistic/js/space-before-function-paren': ['warn', {
|
|
168
|
+
anonymous: 'always',
|
|
169
|
+
named: 'never',
|
|
170
|
+
asyncArrow: 'always'
|
|
171
|
+
}],
|
|
172
|
+
'@stylistic/js/space-in-parens': ['warn', 'never'],
|
|
173
|
+
'@stylistic/js/space-infix-ops': ['warn', {
|
|
174
|
+
int32Hint: false
|
|
175
|
+
}],
|
|
176
|
+
'@stylistic/js/space-unary-ops': ['warn', {
|
|
177
|
+
words: true,
|
|
178
|
+
nonwords: false
|
|
179
|
+
}],
|
|
180
|
+
'@stylistic/js/spaced-comment': ['warn', 'always', {
|
|
181
|
+
line: {
|
|
182
|
+
markers: ['/ <reference']
|
|
183
|
+
}
|
|
184
|
+
}],
|
|
185
|
+
'@stylistic/js/switch-colon-spacing': ['warn', {
|
|
186
|
+
after: true,
|
|
187
|
+
before: false
|
|
188
|
+
}],
|
|
189
|
+
'@stylistic/js/template-curly-spacing': ['warn', 'never'],
|
|
190
|
+
'@stylistic/js/template-tag-spacing': ['warn', 'never'],
|
|
191
|
+
'@stylistic/js/wrap-iife': ['warn', 'outside'],
|
|
192
|
+
'@stylistic/js/wrap-regex': 'warn',
|
|
193
|
+
'@stylistic/js/yield-star-spacing': ['warn', {
|
|
194
|
+
before: true,
|
|
195
|
+
after: false
|
|
196
|
+
}]
|
|
197
|
+
}
|
|
198
|
+
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import * as eslintPluginStylisticJsx from '@stylistic/eslint-plugin-jsx';
|
|
2
1
|
export declare const stylisticJsxConfig: {
|
|
3
2
|
plugins: {
|
|
4
|
-
'@stylistic/jsx':
|
|
3
|
+
'@stylistic/jsx': {
|
|
4
|
+
rules: import("@stylistic/eslint-plugin-jsx").Rules;
|
|
5
|
+
configs: {
|
|
6
|
+
"disable-legacy": import("eslint").Linter.Config;
|
|
7
|
+
"all": import("eslint").Linter.Config;
|
|
8
|
+
"all-flat": import("eslint").Linter.Config;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
5
11
|
};
|
|
6
12
|
rules: {
|
|
7
13
|
'@stylistic/jsx/jsx-child-element-spacing': string;
|