@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,117 +1,81 @@
|
|
|
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
|
-
allowLeadingUnderscore: false,
|
|
83
|
-
allowNamespace: false,
|
|
84
|
-
ignore: [],
|
|
85
|
-
}],
|
|
86
|
-
'@stylistic/jsx/jsx-props-no-multi-spaces': 'warn',
|
|
87
|
-
'@stylistic/jsx/jsx-self-closing-comp': ['warn', {
|
|
88
|
-
component: true,
|
|
89
|
-
html: true,
|
|
90
|
-
}],
|
|
91
|
-
'@stylistic/jsx/jsx-sort-props': ['warn', {
|
|
92
|
-
ignoreCase: false,
|
|
93
|
-
callbacksLast: true,
|
|
94
|
-
shorthandFirst: true,
|
|
95
|
-
shorthandLast: false,
|
|
96
|
-
multiline: 'ignore',
|
|
97
|
-
noSortAlphabetically: false,
|
|
98
|
-
reservedFirst: true,
|
|
99
|
-
locale: 'auto',
|
|
100
|
-
}],
|
|
101
|
-
'@stylistic/jsx/jsx-tag-spacing': ['warn', {
|
|
102
|
-
closingSlash: 'never',
|
|
103
|
-
beforeSelfClosing: 'always',
|
|
104
|
-
afterOpening: 'never',
|
|
105
|
-
beforeClosing: 'never',
|
|
106
|
-
}],
|
|
107
|
-
'@stylistic/jsx/jsx-wrap-multilines': ['warn', {
|
|
108
|
-
declaration: 'parens-new-line',
|
|
109
|
-
assignment: 'parens-new-line',
|
|
110
|
-
return: 'parens-new-line',
|
|
111
|
-
arrow: 'parens-new-line',
|
|
112
|
-
condition: 'parens-new-line',
|
|
113
|
-
logical: 'parens-new-line',
|
|
114
|
-
prop: 'parens-new-line',
|
|
115
|
-
}],
|
|
116
|
-
},
|
|
117
|
-
};
|
|
1
|
+
import eslintPluginStylisticJsx from '@stylistic/eslint-plugin-jsx';
|
|
2
|
+
export const stylisticJsxConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
'@stylistic/jsx': eslintPluginStylisticJsx
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'@stylistic/jsx/jsx-child-element-spacing': 'error',
|
|
8
|
+
'@stylistic/jsx/jsx-closing-bracket-location': ['warn', {
|
|
9
|
+
selfClosing: 'after-props',
|
|
10
|
+
nonEmpty: 'after-props'
|
|
11
|
+
}],
|
|
12
|
+
'@stylistic/jsx/jsx-closing-tag-location': ['warn', 'tag-aligned'],
|
|
13
|
+
'@stylistic/jsx/jsx-curly-brace-presence': ['warn', {
|
|
14
|
+
props: 'never',
|
|
15
|
+
children: 'always',
|
|
16
|
+
propElementValues: 'always'
|
|
17
|
+
}],
|
|
18
|
+
'@stylistic/jsx/jsx-curly-newline': ['warn', 'never'],
|
|
19
|
+
'@stylistic/jsx/jsx-curly-spacing': ['warn', {
|
|
20
|
+
when: 'never',
|
|
21
|
+
attributes: {
|
|
22
|
+
allowMultiline: false
|
|
23
|
+
},
|
|
24
|
+
children: {
|
|
25
|
+
allowMultiline: false
|
|
26
|
+
}
|
|
27
|
+
}],
|
|
28
|
+
'@stylistic/jsx/jsx-equals-spacing': ['warn', 'never'],
|
|
29
|
+
'@stylistic/jsx/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
|
|
30
|
+
'@stylistic/jsx/jsx-function-call-newline': ['warn', 'multiline'],
|
|
31
|
+
'@stylistic/jsx/jsx-indent': 'off',
|
|
32
|
+
'@stylistic/jsx/jsx-indent-props': ['warn', {
|
|
33
|
+
indentMode: 1,
|
|
34
|
+
ignoreTernaryOperator: false
|
|
35
|
+
}],
|
|
36
|
+
'@stylistic/jsx/jsx-max-props-per-line': ['warn', {
|
|
37
|
+
maximum: 1,
|
|
38
|
+
when: 'always'
|
|
39
|
+
}],
|
|
40
|
+
'@stylistic/jsx/jsx-newline': 'off',
|
|
41
|
+
'@stylistic/jsx/jsx-one-expression-per-line': ['warn', {
|
|
42
|
+
allow: 'single-child'
|
|
43
|
+
}],
|
|
44
|
+
'@stylistic/jsx/jsx-pascal-case': ['error', {
|
|
45
|
+
allowAllCaps: false,
|
|
46
|
+
allowLeadingUnderscore: false,
|
|
47
|
+
allowNamespace: false,
|
|
48
|
+
ignore: []
|
|
49
|
+
}],
|
|
50
|
+
'@stylistic/jsx/jsx-props-no-multi-spaces': 'warn',
|
|
51
|
+
'@stylistic/jsx/jsx-self-closing-comp': ['warn', {
|
|
52
|
+
component: true,
|
|
53
|
+
html: true
|
|
54
|
+
}],
|
|
55
|
+
'@stylistic/jsx/jsx-sort-props': ['warn', {
|
|
56
|
+
ignoreCase: false,
|
|
57
|
+
callbacksLast: true,
|
|
58
|
+
shorthandFirst: true,
|
|
59
|
+
shorthandLast: false,
|
|
60
|
+
multiline: 'ignore',
|
|
61
|
+
noSortAlphabetically: false,
|
|
62
|
+
reservedFirst: true,
|
|
63
|
+
locale: 'auto'
|
|
64
|
+
}],
|
|
65
|
+
'@stylistic/jsx/jsx-tag-spacing': ['warn', {
|
|
66
|
+
closingSlash: 'never',
|
|
67
|
+
beforeSelfClosing: 'always',
|
|
68
|
+
afterOpening: 'never',
|
|
69
|
+
beforeClosing: 'never'
|
|
70
|
+
}],
|
|
71
|
+
'@stylistic/jsx/jsx-wrap-multilines': ['warn', {
|
|
72
|
+
declaration: 'parens-new-line',
|
|
73
|
+
assignment: 'parens-new-line',
|
|
74
|
+
return: 'parens-new-line',
|
|
75
|
+
arrow: 'parens-new-line',
|
|
76
|
+
condition: 'parens-new-line',
|
|
77
|
+
logical: 'parens-new-line',
|
|
78
|
+
prop: 'parens-new-line'
|
|
79
|
+
}]
|
|
80
|
+
}
|
|
81
|
+
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import * as eslintPluginStylisticPlus from '@stylistic/eslint-plugin-plus';
|
|
2
1
|
export declare const stylisticPlusConfig: {
|
|
3
2
|
plugins: {
|
|
4
|
-
'@stylistic/plus':
|
|
3
|
+
'@stylistic/plus': {
|
|
4
|
+
rules: import("@stylistic/eslint-plugin-plus").Rules;
|
|
5
|
+
configs: {
|
|
6
|
+
"disable-legacy": import("eslint").Linter.Config;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
5
9
|
};
|
|
6
10
|
rules: {
|
|
7
11
|
'@stylistic/plus/curly-newline': (string | {
|
|
@@ -1,50 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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.stylisticPlusConfig = void 0;
|
|
37
|
-
const eslintPluginStylisticPlus = __importStar(require("@stylistic/eslint-plugin-plus"));
|
|
38
|
-
exports.stylisticPlusConfig = {
|
|
39
|
-
plugins: {
|
|
40
|
-
'@stylistic/plus': eslintPluginStylisticPlus,
|
|
41
|
-
},
|
|
42
|
-
rules: {
|
|
43
|
-
'@stylistic/plus/curly-newline': ['warn', {
|
|
44
|
-
minElements: 1,
|
|
45
|
-
}],
|
|
46
|
-
'@stylistic/plus/indent-binary-ops': ['warn', 4],
|
|
47
|
-
'@stylistic/plus/type-generic-spacing': 'warn',
|
|
48
|
-
'@stylistic/plus/type-named-tuple-spacing': 'warn',
|
|
49
|
-
},
|
|
50
|
-
};
|
|
1
|
+
import eslintPluginStylisticPlus from '@stylistic/eslint-plugin-plus';
|
|
2
|
+
export const stylisticPlusConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
'@stylistic/plus': eslintPluginStylisticPlus
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'@stylistic/plus/curly-newline': ['warn', {
|
|
8
|
+
minElements: 1
|
|
9
|
+
}],
|
|
10
|
+
'@stylistic/plus/indent-binary-ops': ['warn', 4],
|
|
11
|
+
'@stylistic/plus/type-generic-spacing': 'warn',
|
|
12
|
+
'@stylistic/plus/type-named-tuple-spacing': 'warn'
|
|
13
|
+
}
|
|
14
|
+
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import * as eslintPluginStylisticTs from '@stylistic/eslint-plugin-ts';
|
|
2
1
|
export declare const stylisticTsConfig: {
|
|
3
2
|
plugins: {
|
|
4
|
-
'@stylistic/ts':
|
|
3
|
+
'@stylistic/ts': {
|
|
4
|
+
rules: import("@stylistic/eslint-plugin-ts").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/block-spacing': string;
|
|
@@ -1,169 +1,135 @@
|
|
|
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
|
-
'@stylistic/ts/object-curly-spacing': ['warn', 'always', {
|
|
137
|
-
arraysInObjects: true,
|
|
138
|
-
objectsInObjects: true,
|
|
139
|
-
}],
|
|
140
|
-
'@stylistic/js/object-property-newline': 'off',
|
|
141
|
-
'@stylistic/ts/object-property-newline': ['warn', {
|
|
142
|
-
allowAllPropertiesOnSameLine: true,
|
|
143
|
-
}],
|
|
144
|
-
'@stylistic/js/padding-line-between-statements': 'off',
|
|
145
|
-
'@stylistic/ts/padding-line-between-statements': 'off',
|
|
146
|
-
'@stylistic/js/quote-props': 'off',
|
|
147
|
-
'@stylistic/ts/quote-props': ['warn', 'consistent-as-needed'],
|
|
148
|
-
'@stylistic/js/quotes': 'off',
|
|
149
|
-
'@stylistic/ts/quotes': ['warn', 'single', {
|
|
150
|
-
avoidEscape: true,
|
|
151
|
-
allowTemplateLiterals: true,
|
|
152
|
-
}],
|
|
153
|
-
'@stylistic/js/semi': 'off',
|
|
154
|
-
'@stylistic/ts/semi': ['warn', 'always'],
|
|
155
|
-
'@stylistic/js/space-before-blocks': 'off',
|
|
156
|
-
'@stylistic/ts/space-before-blocks': ['warn', 'always'],
|
|
157
|
-
'@stylistic/js/space-before-function-paren': 'off',
|
|
158
|
-
'@stylistic/ts/space-before-function-paren': ['warn', {
|
|
159
|
-
anonymous: 'always',
|
|
160
|
-
named: 'never',
|
|
161
|
-
asyncArrow: 'always',
|
|
162
|
-
}],
|
|
163
|
-
'@stylistic/js/space-infix-ops': 'off',
|
|
164
|
-
'@stylistic/ts/space-infix-ops': ['warn', {
|
|
165
|
-
int32Hint: false,
|
|
166
|
-
}],
|
|
167
|
-
'@stylistic/ts/type-annotation-spacing': 'warn',
|
|
168
|
-
},
|
|
169
|
-
};
|
|
1
|
+
import eslintPluginStylisticTs from '@stylistic/eslint-plugin-ts';
|
|
2
|
+
export const stylisticTsConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
'@stylistic/ts': eslintPluginStylisticTs
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'@stylistic/js/block-spacing': 'off',
|
|
8
|
+
'@stylistic/ts/block-spacing': ['warn', 'always'],
|
|
9
|
+
'@stylistic/js/brace-style': 'off',
|
|
10
|
+
'@stylistic/ts/brace-style': ['warn', 'stroustrup', {
|
|
11
|
+
allowSingleLine: false
|
|
12
|
+
}],
|
|
13
|
+
'@stylistic/js/comma-dangle': 'off',
|
|
14
|
+
'@stylistic/ts/comma-dangle': ['warn', {
|
|
15
|
+
arrays: 'always-multiline',
|
|
16
|
+
enums: 'always-multiline',
|
|
17
|
+
exports: 'always-multiline',
|
|
18
|
+
functions: 'always-multiline',
|
|
19
|
+
generics: 'always-multiline',
|
|
20
|
+
imports: 'always-multiline',
|
|
21
|
+
objects: 'always-multiline',
|
|
22
|
+
tuples: 'always-multiline'
|
|
23
|
+
}],
|
|
24
|
+
'@stylistic/js/comma-spacing': 'off',
|
|
25
|
+
'@stylistic/ts/comma-spacing': ['warn', {
|
|
26
|
+
before: false,
|
|
27
|
+
after: true
|
|
28
|
+
}],
|
|
29
|
+
'@stylistic/js/func-call-spacing': 'off',
|
|
30
|
+
'@stylistic/ts/func-call-spacing': 'off',
|
|
31
|
+
'@stylistic/js/function-call-spacing': 'off',
|
|
32
|
+
'@stylistic/ts/function-call-spacing': ['warn', 'never'],
|
|
33
|
+
'@stylistic/js/indent': 'off',
|
|
34
|
+
'@stylistic/ts/indent': ['warn', 4, {
|
|
35
|
+
SwitchCase: 1,
|
|
36
|
+
ignoredNodes: ['TSTypeParameterInstantiation']
|
|
37
|
+
}],
|
|
38
|
+
'@stylistic/js/key-spacing': 'off',
|
|
39
|
+
'@stylistic/ts/key-spacing': ['warn', {
|
|
40
|
+
beforeColon: false,
|
|
41
|
+
afterColon: true,
|
|
42
|
+
mode: 'strict'
|
|
43
|
+
}],
|
|
44
|
+
'@stylistic/js/keyword-spacing': 'off',
|
|
45
|
+
'@stylistic/ts/keyword-spacing': ['warn', {
|
|
46
|
+
before: true,
|
|
47
|
+
after: true
|
|
48
|
+
}],
|
|
49
|
+
'@stylistic/js/lines-around-comment': 'off',
|
|
50
|
+
'@stylistic/ts/lines-around-comment': ['warn', {
|
|
51
|
+
beforeBlockComment: true,
|
|
52
|
+
afterBlockComment: false,
|
|
53
|
+
beforeLineComment: false,
|
|
54
|
+
afterLineComment: false,
|
|
55
|
+
allowBlockStart: false,
|
|
56
|
+
allowBlockEnd: false,
|
|
57
|
+
allowObjectStart: false,
|
|
58
|
+
allowObjectEnd: false,
|
|
59
|
+
allowArrayStart: false,
|
|
60
|
+
allowArrayEnd: false,
|
|
61
|
+
allowClassStart: true,
|
|
62
|
+
allowClassEnd: false,
|
|
63
|
+
allowInterfaceStart: true,
|
|
64
|
+
allowInterfaceEnd: true,
|
|
65
|
+
allowTypeStart: true,
|
|
66
|
+
allowTypeEnd: true
|
|
67
|
+
}],
|
|
68
|
+
'@stylistic/js/lines-between-class-members': 'off',
|
|
69
|
+
'@stylistic/ts/lines-between-class-members': ['warn', 'always', {
|
|
70
|
+
exceptAfterSingleLine: true,
|
|
71
|
+
exceptAfterOverload: true
|
|
72
|
+
}],
|
|
73
|
+
'@stylistic/ts/member-delimiter-style': ['warn', {
|
|
74
|
+
multiline: {
|
|
75
|
+
delimiter: 'semi',
|
|
76
|
+
requireLast: true
|
|
77
|
+
},
|
|
78
|
+
singleline: {
|
|
79
|
+
delimiter: 'semi',
|
|
80
|
+
requireLast: true
|
|
81
|
+
},
|
|
82
|
+
multilineDetection: 'brackets'
|
|
83
|
+
}],
|
|
84
|
+
'@stylistic/js/no-extra-parens': 'off',
|
|
85
|
+
'@stylistic/ts/no-extra-parens': ['warn', 'all', {
|
|
86
|
+
ignoreJSX: 'all',
|
|
87
|
+
nestedBinaryExpressions: false,
|
|
88
|
+
enforceForArrowConditionals: false
|
|
89
|
+
}],
|
|
90
|
+
'@stylistic/js/no-extra-semi': 'off',
|
|
91
|
+
'@stylistic/ts/no-extra-semi': 'warn',
|
|
92
|
+
'@stylistic/js/object-curly-newline': 'off',
|
|
93
|
+
'@stylistic/ts/object-curly-newline': ['warn', {
|
|
94
|
+
ImportDeclaration: {
|
|
95
|
+
multiline: true
|
|
96
|
+
},
|
|
97
|
+
ExportDeclaration: {
|
|
98
|
+
multiline: true
|
|
99
|
+
}
|
|
100
|
+
}],
|
|
101
|
+
'@stylistic/js/object-curly-spacing': 'off',
|
|
102
|
+
'@stylistic/ts/object-curly-spacing': ['warn', 'always', {
|
|
103
|
+
arraysInObjects: true,
|
|
104
|
+
objectsInObjects: true
|
|
105
|
+
}],
|
|
106
|
+
'@stylistic/js/object-property-newline': 'off',
|
|
107
|
+
'@stylistic/ts/object-property-newline': ['warn', {
|
|
108
|
+
allowAllPropertiesOnSameLine: true
|
|
109
|
+
}],
|
|
110
|
+
'@stylistic/js/padding-line-between-statements': 'off',
|
|
111
|
+
'@stylistic/ts/padding-line-between-statements': 'off',
|
|
112
|
+
'@stylistic/js/quote-props': 'off',
|
|
113
|
+
'@stylistic/ts/quote-props': ['warn', 'consistent-as-needed'],
|
|
114
|
+
'@stylistic/js/quotes': 'off',
|
|
115
|
+
'@stylistic/ts/quotes': ['warn', 'single', {
|
|
116
|
+
avoidEscape: true,
|
|
117
|
+
allowTemplateLiterals: true
|
|
118
|
+
}],
|
|
119
|
+
'@stylistic/js/semi': 'off',
|
|
120
|
+
'@stylistic/ts/semi': ['warn', 'always'],
|
|
121
|
+
'@stylistic/js/space-before-blocks': 'off',
|
|
122
|
+
'@stylistic/ts/space-before-blocks': ['warn', 'always'],
|
|
123
|
+
'@stylistic/js/space-before-function-paren': 'off',
|
|
124
|
+
'@stylistic/ts/space-before-function-paren': ['warn', {
|
|
125
|
+
anonymous: 'always',
|
|
126
|
+
named: 'never',
|
|
127
|
+
asyncArrow: 'always'
|
|
128
|
+
}],
|
|
129
|
+
'@stylistic/js/space-infix-ops': 'off',
|
|
130
|
+
'@stylistic/ts/space-infix-ops': ['warn', {
|
|
131
|
+
int32Hint: false
|
|
132
|
+
}],
|
|
133
|
+
'@stylistic/ts/type-annotation-spacing': 'warn'
|
|
134
|
+
}
|
|
135
|
+
};
|