@perfective/eslint-config 0.23.4 → 0.24.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/README.adoc +4 -2
- package/README.md +4 -2
- package/index.js +9 -0
- package/package.json +12 -11
- package/rules/eslint/layout-formatting.js +59 -158
- package/rules/eslint/suggestions.js +7 -24
- package/rules/jsdoc/index.js +1 -0
- package/rules/stylistic/js/index.js +192 -0
- package/rules/stylistic/jsx/index.js +83 -0
- package/rules/stylistic/plus/index.js +11 -0
- package/rules/stylistic/ts/index.js +124 -0
- package/rules/typescript-eslint/extension-rules.js +20 -80
- package/rules/typescript-eslint/supported-rules.js +10 -14
package/README.adoc
CHANGED
|
@@ -5,8 +5,9 @@ a https://eslint.org/docs/latest/developer-guide/shareable-configs[shareable ESL
|
|
|
5
5
|
that is used for the development of the `@perfective` packages.
|
|
6
6
|
These rules are primarily configured for TypeScript projects.
|
|
7
7
|
|
|
8
|
-
In addition to the core https://eslint.org/docs/latest/rules/[ESLint
|
|
9
|
-
|
|
8
|
+
In addition to the core https://eslint.org/docs/latest/rules/[ESLint],
|
|
9
|
+
`link:https://typescript-eslint.io/rules/[@typescript-eslint]`,
|
|
10
|
+
and https://eslint.style[ESLint Stylistic] plugin rules,
|
|
10
11
|
`@perfective/eslint-config` includes configurations for the ESLint plugins:
|
|
11
12
|
|
|
12
13
|
* `link:https://github.com/freaktechnik/eslint-plugin-array-func[eslint-plugin-array-func]`;
|
|
@@ -43,6 +44,7 @@ from issues that will be fixed automatically.
|
|
|
43
44
|
npm install --save-dev \
|
|
44
45
|
@perfective/eslint-config \
|
|
45
46
|
@babel/eslint-parser \
|
|
47
|
+
@stylistic/eslint-plugin \
|
|
46
48
|
@typescript-eslint/eslint-plugin \
|
|
47
49
|
@typescript-eslint/eslint-plugin-tslint \
|
|
48
50
|
@typescript-eslint/parser \
|
package/README.md
CHANGED
|
@@ -5,8 +5,9 @@ a [shareable ESLint configuration](https://eslint.org/docs/latest/developer-guid
|
|
|
5
5
|
that is used for the development of the `@perfective` packages.
|
|
6
6
|
These rules are primarily configured for TypeScript projects.
|
|
7
7
|
|
|
8
|
-
In addition to the core [ESLint rules](https://eslint.org/docs/latest/rules/)
|
|
9
|
-
|
|
8
|
+
In addition to the core [ESLint rules](https://eslint.org/docs/latest/rules/),
|
|
9
|
+
[`@typescript-eslint`](https://typescript-eslint.io/rules/),
|
|
10
|
+
and [ESlint Stylistic](https://eslint.style) plugin rules,
|
|
10
11
|
`@perfective/eslint-config` includes configurations for the ESLint plugins:
|
|
11
12
|
|
|
12
13
|
- [`eslint-plugin-array-func`](https://github.com/freaktechnik/eslint-plugin-array-func);
|
|
@@ -41,6 +42,7 @@ from issues that will be fixed automatically.
|
|
|
41
42
|
npm install --save-dev \
|
|
42
43
|
@perfective/eslint-config \
|
|
43
44
|
@babel/eslint-parser \
|
|
45
|
+
@stylistic/eslint-plugin \
|
|
44
46
|
@typescript-eslint/eslint-plugin \
|
|
45
47
|
@typescript-eslint/eslint-plugin-tslint \
|
|
46
48
|
@typescript-eslint/parser \
|
package/index.js
CHANGED
|
@@ -20,6 +20,8 @@ module.exports = {
|
|
|
20
20
|
'./rules/promise',
|
|
21
21
|
'./rules/simple-import-sort',
|
|
22
22
|
'./rules/sonarjs',
|
|
23
|
+
'./rules/stylistic/js',
|
|
24
|
+
'./rules/stylistic/plus',
|
|
23
25
|
'./rules/unicorn',
|
|
24
26
|
],
|
|
25
27
|
},
|
|
@@ -67,6 +69,7 @@ module.exports = {
|
|
|
67
69
|
'./rules/typescript-eslint',
|
|
68
70
|
'./rules/typescript-eslint/tslint',
|
|
69
71
|
'./rules/deprecation',
|
|
72
|
+
'./rules/stylistic/ts',
|
|
70
73
|
(0, plugin_1.optionalRules)('rxjs'),
|
|
71
74
|
].filter(Boolean),
|
|
72
75
|
settings: {
|
|
@@ -84,6 +87,12 @@ module.exports = {
|
|
|
84
87
|
},
|
|
85
88
|
},
|
|
86
89
|
},
|
|
90
|
+
{
|
|
91
|
+
files: ['*.jsx', '*.tsx'],
|
|
92
|
+
extends: [
|
|
93
|
+
'./rules/stylistic/jsx',
|
|
94
|
+
],
|
|
95
|
+
},
|
|
87
96
|
(0, plugin_1.optionalOverrides)('jest', {
|
|
88
97
|
files: ['*.@(spec|test).[jt]s?(x)'],
|
|
89
98
|
env: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perfective/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "ESLint shareable rules configuration",
|
|
5
5
|
"keywords": ["code quality", "code standard", "code style", "eslint", "eslint config", "lint", "perfective", "tslint", "tslint config", "typescript"],
|
|
6
6
|
"author": "Andrey Mikheychik <a.mikheychik@gmail.com>",
|
|
@@ -11,29 +11,30 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@babel/eslint-parser": "^7.23.
|
|
15
|
-
"@
|
|
16
|
-
"@typescript-eslint/eslint-plugin
|
|
17
|
-
"@typescript-eslint/
|
|
18
|
-
"eslint": "^
|
|
14
|
+
"@babel/eslint-parser": "^7.23.10",
|
|
15
|
+
"@stylistic/eslint-plugin": "^1.7.0",
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
17
|
+
"@typescript-eslint/eslint-plugin-tslint": "^6.21.0",
|
|
18
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
19
|
+
"eslint": "^8.57.0",
|
|
19
20
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
20
21
|
"eslint-plugin-array-func": "^4.0.0",
|
|
21
22
|
"eslint-plugin-cypress": "^2.15.1",
|
|
22
23
|
"eslint-plugin-deprecation": "^2.0.0",
|
|
23
24
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
24
25
|
"eslint-plugin-import": "^2.29.1",
|
|
25
|
-
"eslint-plugin-jest": "^27.
|
|
26
|
+
"eslint-plugin-jest": "^27.9.0",
|
|
26
27
|
"eslint-plugin-jest-dom": "^5.1.0",
|
|
27
28
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
28
|
-
"eslint-plugin-jsdoc": "^
|
|
29
|
+
"eslint-plugin-jsdoc": "^48.2.1",
|
|
29
30
|
"eslint-plugin-node": "^11.1.0",
|
|
30
31
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
31
32
|
"eslint-plugin-promise": "^6.1.1",
|
|
32
33
|
"eslint-plugin-rxjs": "^5.0.3",
|
|
33
|
-
"eslint-plugin-simple-import-sort": "^
|
|
34
|
-
"eslint-plugin-sonarjs": "^0.
|
|
34
|
+
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
35
|
+
"eslint-plugin-sonarjs": "^0.24.0",
|
|
35
36
|
"eslint-plugin-testing-library": "^6.2.0",
|
|
36
|
-
"eslint-plugin-unicorn": "^
|
|
37
|
+
"eslint-plugin-unicorn": "^51.0.1",
|
|
37
38
|
"tslint": "^6.1.3"
|
|
38
39
|
},
|
|
39
40
|
"peerDependenciesMeta": {
|
|
@@ -1,169 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
module.exports = {
|
|
3
3
|
rules: {
|
|
4
|
-
'array-bracket-newline':
|
|
5
|
-
'array-bracket-spacing':
|
|
6
|
-
'array-element-newline':
|
|
7
|
-
'arrow-parens':
|
|
8
|
-
'arrow-spacing':
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}],
|
|
27
|
-
'comma-style': ['warn', 'last'],
|
|
28
|
-
'computed-property-spacing': ['warn', 'never'],
|
|
29
|
-
'dot-location': ['warn', 'property'],
|
|
30
|
-
'eol-last': ['warn', 'always'],
|
|
31
|
-
'func-call-spacing': ['warn', 'never'],
|
|
32
|
-
'function-call-argument-newline': ['warn', 'consistent'],
|
|
33
|
-
'function-paren-newline': ['warn', 'consistent'],
|
|
34
|
-
'generator-star-spacing': ['warn', {
|
|
35
|
-
before: true,
|
|
36
|
-
after: false,
|
|
37
|
-
}],
|
|
38
|
-
'implicit-arrow-linebreak': ['warn', 'beside'],
|
|
39
|
-
'indent': ['warn', 4, {
|
|
40
|
-
SwitchCase: 1,
|
|
41
|
-
}],
|
|
42
|
-
'jsx-quotes': ['warn', 'prefer-double'],
|
|
43
|
-
'key-spacing': ['warn', {
|
|
44
|
-
beforeColon: false,
|
|
45
|
-
afterColon: true,
|
|
46
|
-
mode: 'strict',
|
|
47
|
-
}],
|
|
48
|
-
'keyword-spacing': ['warn', {
|
|
49
|
-
before: true,
|
|
50
|
-
after: true,
|
|
51
|
-
}],
|
|
4
|
+
'array-bracket-newline': 'off',
|
|
5
|
+
'array-bracket-spacing': 'off',
|
|
6
|
+
'array-element-newline': 'off',
|
|
7
|
+
'arrow-parens': 'off',
|
|
8
|
+
'arrow-spacing': 'off',
|
|
9
|
+
'block-spacing': 'off',
|
|
10
|
+
'brace-style': 'off',
|
|
11
|
+
'comma-dangle': 'off',
|
|
12
|
+
'comma-spacing': 'off',
|
|
13
|
+
'comma-style': 'off',
|
|
14
|
+
'computed-property-spacing': 'off',
|
|
15
|
+
'dot-location': 'off',
|
|
16
|
+
'eol-last': 'off',
|
|
17
|
+
'func-call-spacing': 'off',
|
|
18
|
+
'function-call-argument-newline': 'off',
|
|
19
|
+
'function-paren-newline': 'off',
|
|
20
|
+
'generator-star-spacing': 'off',
|
|
21
|
+
'implicit-arrow-linebreak': 'off',
|
|
22
|
+
'indent': 'off',
|
|
23
|
+
'jsx-quotes': 'off',
|
|
24
|
+
'key-spacing': 'off',
|
|
25
|
+
'keyword-spacing': 'off',
|
|
52
26
|
'line-comment-position': ['error', {
|
|
53
27
|
position: 'above',
|
|
54
28
|
ignorePattern: '^ == .+',
|
|
55
29
|
}],
|
|
56
|
-
'linebreak-style':
|
|
57
|
-
'lines-around-comment':
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
'
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
'
|
|
76
|
-
|
|
77
|
-
tabWidth: 4,
|
|
78
|
-
ignoreRegExpLiterals: true,
|
|
79
|
-
ignoreUrls: true,
|
|
80
|
-
}],
|
|
81
|
-
'max-statements-per-line': ['error', {
|
|
82
|
-
max: 1,
|
|
83
|
-
}],
|
|
84
|
-
'multiline-ternary': ['warn', 'always-multiline'],
|
|
85
|
-
'new-parens': 'warn',
|
|
86
|
-
'newline-per-chained-call': ['off', {
|
|
87
|
-
ignoreChainWithDepth: 3,
|
|
88
|
-
}],
|
|
89
|
-
'no-extra-parens': ['warn', 'all', {
|
|
90
|
-
ignoreJSX: 'all',
|
|
91
|
-
nestedBinaryExpressions: false,
|
|
92
|
-
enforceForArrowConditionals: false,
|
|
93
|
-
ternaryOperandBinaryExpressions: false,
|
|
94
|
-
}],
|
|
95
|
-
'no-mixed-spaces-and-tabs': 'error',
|
|
96
|
-
'no-multi-spaces': 'warn',
|
|
97
|
-
'no-multiple-empty-lines': ['warn', {
|
|
98
|
-
max: 1,
|
|
99
|
-
maxEOF: 0,
|
|
100
|
-
maxBOF: 0,
|
|
101
|
-
}],
|
|
102
|
-
'no-tabs': 'error',
|
|
103
|
-
'no-trailing-spaces': 'warn',
|
|
104
|
-
'no-whitespace-before-property': 'warn',
|
|
105
|
-
'nonblock-statement-body-position': ['warn', 'below'],
|
|
106
|
-
'object-curly-newline': ['warn', {
|
|
107
|
-
ImportDeclaration: { multiline: true },
|
|
108
|
-
ExportDeclaration: { multiline: true },
|
|
109
|
-
}],
|
|
110
|
-
'object-curly-spacing': ['warn', 'always', {
|
|
111
|
-
arraysInObjects: true,
|
|
112
|
-
objectsInObjects: true,
|
|
113
|
-
}],
|
|
114
|
-
'object-property-newline': ['warn', {
|
|
115
|
-
allowAllPropertiesOnSameLine: true,
|
|
116
|
-
}],
|
|
117
|
-
'operator-linebreak': ['warn', 'before', {
|
|
118
|
-
overrides: {
|
|
119
|
-
'=': 'none',
|
|
120
|
-
'==': 'none',
|
|
121
|
-
'!=': 'none',
|
|
122
|
-
'>=': 'none',
|
|
123
|
-
'<=': 'none',
|
|
124
|
-
'===': 'none',
|
|
125
|
-
'+=': 'none',
|
|
126
|
-
},
|
|
127
|
-
}],
|
|
128
|
-
'padded-blocks': ['warn', 'never'],
|
|
30
|
+
'linebreak-style': 'off',
|
|
31
|
+
'lines-around-comment': 'off',
|
|
32
|
+
'lines-between-class-members': 'off',
|
|
33
|
+
'max-len': 'off',
|
|
34
|
+
'max-statements-per-line': 'off',
|
|
35
|
+
'multiline-ternary': 'off',
|
|
36
|
+
'new-parens': 'off',
|
|
37
|
+
'newline-per-chained-call': 'off',
|
|
38
|
+
'no-extra-parens': 'off',
|
|
39
|
+
'no-mixed-spaces-and-tabs': 'off',
|
|
40
|
+
'no-multi-spaces': 'off',
|
|
41
|
+
'no-multiple-empty-lines': 'off',
|
|
42
|
+
'no-tabs': 'off',
|
|
43
|
+
'no-trailing-spaces': 'off',
|
|
44
|
+
'no-whitespace-before-property': 'off',
|
|
45
|
+
'nonblock-statement-body-position': 'off',
|
|
46
|
+
'object-curly-newline': 'off',
|
|
47
|
+
'object-curly-spacing': 'off',
|
|
48
|
+
'object-property-newline': 'off',
|
|
49
|
+
'operator-linebreak': 'off',
|
|
50
|
+
'padded-blocks': 'off',
|
|
129
51
|
'padding-line-between-statements': 'off',
|
|
130
|
-
'quotes':
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
'
|
|
135
|
-
'
|
|
136
|
-
'
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
'
|
|
141
|
-
'
|
|
142
|
-
'
|
|
143
|
-
anonymous: 'always',
|
|
144
|
-
named: 'never',
|
|
145
|
-
asyncArrow: 'always',
|
|
146
|
-
}],
|
|
147
|
-
'space-in-parens': ['warn', 'never'],
|
|
148
|
-
'space-infix-ops': ['warn', {
|
|
149
|
-
int32Hint: false,
|
|
150
|
-
}],
|
|
151
|
-
'space-unary-ops': ['warn', {
|
|
152
|
-
words: true,
|
|
153
|
-
nonwords: false,
|
|
154
|
-
}],
|
|
155
|
-
'switch-colon-spacing': ['warn', {
|
|
156
|
-
after: true,
|
|
157
|
-
before: false,
|
|
158
|
-
}],
|
|
159
|
-
'template-curly-spacing': ['warn', 'never'],
|
|
160
|
-
'template-tag-spacing': ['warn', 'never'],
|
|
52
|
+
'quotes': 'off',
|
|
53
|
+
'rest-spread-spacing': 'off',
|
|
54
|
+
'semi': 'off',
|
|
55
|
+
'semi-spacing': 'off',
|
|
56
|
+
'semi-style': 'off',
|
|
57
|
+
'space-before-blocks': 'off',
|
|
58
|
+
'space-before-function-paren': 'off',
|
|
59
|
+
'space-in-parens': 'off',
|
|
60
|
+
'space-infix-ops': 'off',
|
|
61
|
+
'space-unary-ops': 'off',
|
|
62
|
+
'switch-colon-spacing': 'off',
|
|
63
|
+
'template-curly-spacing': 'off',
|
|
64
|
+
'template-tag-spacing': 'off',
|
|
161
65
|
'unicode-bom': ['warn', 'never'],
|
|
162
|
-
'wrap-iife':
|
|
163
|
-
'wrap-regex': '
|
|
164
|
-
'yield-star-spacing':
|
|
165
|
-
before: true,
|
|
166
|
-
after: false,
|
|
167
|
-
}],
|
|
66
|
+
'wrap-iife': 'off',
|
|
67
|
+
'wrap-regex': 'off',
|
|
68
|
+
'yield-star-spacing': 'off',
|
|
168
69
|
},
|
|
169
70
|
};
|
|
@@ -57,10 +57,7 @@ module.exports = {
|
|
|
57
57
|
'no-bitwise': 'error',
|
|
58
58
|
'no-caller': 'error',
|
|
59
59
|
'no-case-declarations': 'error',
|
|
60
|
-
'no-confusing-arrow':
|
|
61
|
-
allowParens: true,
|
|
62
|
-
onlyOneSimpleParam: false,
|
|
63
|
-
}],
|
|
60
|
+
'no-confusing-arrow': 'off',
|
|
64
61
|
'no-console': 'error',
|
|
65
62
|
'no-continue': 'error',
|
|
66
63
|
'no-delete-var': 'error',
|
|
@@ -77,8 +74,8 @@ module.exports = {
|
|
|
77
74
|
'no-extra-bind': 'warn',
|
|
78
75
|
'no-extra-boolean-cast': 'warn',
|
|
79
76
|
'no-extra-label': 'warn',
|
|
80
|
-
'no-extra-semi': '
|
|
81
|
-
'no-floating-decimal': '
|
|
77
|
+
'no-extra-semi': 'off',
|
|
78
|
+
'no-floating-decimal': 'off',
|
|
82
79
|
'no-global-assign': 'error',
|
|
83
80
|
'no-implicit-coercion': 'warn',
|
|
84
81
|
'no-implicit-globals': 'error',
|
|
@@ -94,17 +91,7 @@ module.exports = {
|
|
|
94
91
|
'no-lonely-if': 'warn',
|
|
95
92
|
'no-loop-func': 'error',
|
|
96
93
|
'no-magic-numbers': 'off',
|
|
97
|
-
'no-mixed-operators':
|
|
98
|
-
groups: [
|
|
99
|
-
['+', '-'],
|
|
100
|
-
['*', '/', '%', '**'],
|
|
101
|
-
['&', '|', '^', '~', '<<', '>>', '>>>'],
|
|
102
|
-
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
|
103
|
-
['&&', '||', '?:', '??'],
|
|
104
|
-
['in', 'instanceof'],
|
|
105
|
-
],
|
|
106
|
-
allowSamePrecedence: true,
|
|
107
|
-
}],
|
|
94
|
+
'no-mixed-operators': 'off',
|
|
108
95
|
'no-multi-assign': 'error',
|
|
109
96
|
'no-multi-str': 'error',
|
|
110
97
|
'no-negated-condition': 'off',
|
|
@@ -163,7 +150,7 @@ module.exports = {
|
|
|
163
150
|
'no-with': 'error',
|
|
164
151
|
'object-shorthand': ['warn', 'always'],
|
|
165
152
|
'one-var': ['warn', 'never'],
|
|
166
|
-
'one-var-declaration-per-line':
|
|
153
|
+
'one-var-declaration-per-line': 'off',
|
|
167
154
|
'operator-assignment': ['warn', 'always'],
|
|
168
155
|
'prefer-arrow-callback': 'warn',
|
|
169
156
|
'prefer-const': 'warn',
|
|
@@ -178,7 +165,7 @@ module.exports = {
|
|
|
178
165
|
'prefer-rest-params': 'error',
|
|
179
166
|
'prefer-spread': 'error',
|
|
180
167
|
'prefer-template': 'warn',
|
|
181
|
-
'quote-props':
|
|
168
|
+
'quote-props': 'off',
|
|
182
169
|
'radix': 'error',
|
|
183
170
|
'require-await': 'error',
|
|
184
171
|
'require-unicode-regexp': 'error',
|
|
@@ -186,11 +173,7 @@ module.exports = {
|
|
|
186
173
|
'sort-imports': 'off',
|
|
187
174
|
'sort-keys': 'off',
|
|
188
175
|
'sort-vars': 'off',
|
|
189
|
-
'spaced-comment':
|
|
190
|
-
line: {
|
|
191
|
-
markers: ['/ <reference'],
|
|
192
|
-
},
|
|
193
|
-
}],
|
|
176
|
+
'spaced-comment': 'off',
|
|
194
177
|
'strict': 'warn',
|
|
195
178
|
'symbol-description': 'error',
|
|
196
179
|
'vars-on-top': 'error',
|
package/rules/jsdoc/index.js
CHANGED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = {
|
|
3
|
+
plugins: [
|
|
4
|
+
'@stylistic/js',
|
|
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/linebreak-style': ['warn', 'unix'],
|
|
57
|
+
'@stylistic/js/lines-around-comment': ['warn', {
|
|
58
|
+
beforeBlockComment: true,
|
|
59
|
+
afterBlockComment: false,
|
|
60
|
+
beforeLineComment: false,
|
|
61
|
+
afterLineComment: false,
|
|
62
|
+
allowBlockStart: false,
|
|
63
|
+
allowBlockEnd: false,
|
|
64
|
+
allowObjectStart: false,
|
|
65
|
+
allowObjectEnd: false,
|
|
66
|
+
allowArrayStart: false,
|
|
67
|
+
allowArrayEnd: false,
|
|
68
|
+
allowClassStart: true,
|
|
69
|
+
allowClassEnd: false,
|
|
70
|
+
afterHashbangComment: true,
|
|
71
|
+
}],
|
|
72
|
+
'@stylistic/js/lines-between-class-members': ['warn', 'always', {
|
|
73
|
+
exceptAfterSingleLine: true,
|
|
74
|
+
}],
|
|
75
|
+
'@stylistic/js/max-len': ['error', {
|
|
76
|
+
code: 120,
|
|
77
|
+
tabWidth: 4,
|
|
78
|
+
ignoreRegExpLiterals: true,
|
|
79
|
+
ignoreUrls: true,
|
|
80
|
+
}],
|
|
81
|
+
'@stylistic/js/max-statements-per-line': ['error', {
|
|
82
|
+
max: 1,
|
|
83
|
+
}],
|
|
84
|
+
'@stylistic/js/multiline-ternary': ['warn', 'always-multiline'],
|
|
85
|
+
'@stylistic/js/new-parens': 'warn',
|
|
86
|
+
'@stylistic/js/newline-per-chained-call': ['off', {
|
|
87
|
+
ignoreChainWithDepth: 3,
|
|
88
|
+
}],
|
|
89
|
+
'@stylistic/js/no-confusing-arrow': ['warn', {
|
|
90
|
+
allowParens: true,
|
|
91
|
+
onlyOneSimpleParam: false,
|
|
92
|
+
}],
|
|
93
|
+
'@stylistic/js/no-extra-parens': ['warn', 'all', {
|
|
94
|
+
ignoreJSX: 'all',
|
|
95
|
+
nestedBinaryExpressions: false,
|
|
96
|
+
enforceForArrowConditionals: false,
|
|
97
|
+
ternaryOperandBinaryExpressions: false,
|
|
98
|
+
}],
|
|
99
|
+
'@stylistic/js/no-extra-semi': 'warn',
|
|
100
|
+
'@stylistic/js/no-floating-decimal': 'warn',
|
|
101
|
+
'@stylistic/js/no-mixed-operators': ['error', {
|
|
102
|
+
groups: [
|
|
103
|
+
['+', '-'],
|
|
104
|
+
['*', '/', '%', '**'],
|
|
105
|
+
['&', '|', '^', '~', '<<', '>>', '>>>'],
|
|
106
|
+
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
|
107
|
+
['&&', '||', '?:', '??'],
|
|
108
|
+
['in', 'instanceof'],
|
|
109
|
+
],
|
|
110
|
+
allowSamePrecedence: true,
|
|
111
|
+
}],
|
|
112
|
+
'@stylistic/js/no-mixed-spaces-and-tabs': 'error',
|
|
113
|
+
'@stylistic/js/no-multi-spaces': 'warn',
|
|
114
|
+
'@stylistic/js/no-multiple-empty-lines': ['warn', {
|
|
115
|
+
max: 1,
|
|
116
|
+
maxEOF: 0,
|
|
117
|
+
maxBOF: 0,
|
|
118
|
+
}],
|
|
119
|
+
'@stylistic/js/no-tabs': 'error',
|
|
120
|
+
'@stylistic/js/no-trailing-spaces': 'warn',
|
|
121
|
+
'@stylistic/js/no-whitespace-before-property': 'warn',
|
|
122
|
+
'@stylistic/js/nonblock-statement-body-position': ['warn', 'below'],
|
|
123
|
+
'@stylistic/js/object-curly-newline': ['warn', {
|
|
124
|
+
ImportDeclaration: { multiline: true },
|
|
125
|
+
ExportDeclaration: { multiline: true },
|
|
126
|
+
}],
|
|
127
|
+
'@stylistic/js/object-curly-spacing': ['warn', 'always', {
|
|
128
|
+
arraysInObjects: true,
|
|
129
|
+
objectsInObjects: true,
|
|
130
|
+
}],
|
|
131
|
+
'@stylistic/js/object-property-newline': ['warn', {
|
|
132
|
+
allowAllPropertiesOnSameLine: true,
|
|
133
|
+
}],
|
|
134
|
+
'@stylistic/js/one-var-declaration-per-line': ['warn', 'always'],
|
|
135
|
+
'@stylistic/js/operator-linebreak': ['warn', 'before', {
|
|
136
|
+
overrides: {
|
|
137
|
+
'=': 'none',
|
|
138
|
+
'==': 'none',
|
|
139
|
+
'!=': 'none',
|
|
140
|
+
'>=': 'none',
|
|
141
|
+
'<=': 'none',
|
|
142
|
+
'===': 'none',
|
|
143
|
+
'+=': 'none',
|
|
144
|
+
},
|
|
145
|
+
}],
|
|
146
|
+
'@stylistic/js/padded-blocks': ['warn', 'never'],
|
|
147
|
+
'@stylistic/js/padding-line-between-statements': 'off',
|
|
148
|
+
'@stylistic/js/quote-props': ['warn', 'consistent-as-needed'],
|
|
149
|
+
'@stylistic/js/quotes': ['warn', 'single', {
|
|
150
|
+
avoidEscape: true,
|
|
151
|
+
allowTemplateLiterals: true,
|
|
152
|
+
}],
|
|
153
|
+
'@stylistic/js/rest-spread-spacing': ['warn', 'never'],
|
|
154
|
+
'@stylistic/js/semi': ['warn', 'always'],
|
|
155
|
+
'@stylistic/js/semi-spacing': ['warn', {
|
|
156
|
+
before: false,
|
|
157
|
+
after: true,
|
|
158
|
+
}],
|
|
159
|
+
'@stylistic/js/semi-style': ['warn', 'last'],
|
|
160
|
+
'@stylistic/js/space-before-blocks': ['warn', 'always'],
|
|
161
|
+
'@stylistic/js/space-before-function-paren': ['warn', {
|
|
162
|
+
anonymous: 'always',
|
|
163
|
+
named: 'never',
|
|
164
|
+
asyncArrow: 'always',
|
|
165
|
+
}],
|
|
166
|
+
'@stylistic/js/space-in-parens': ['warn', 'never'],
|
|
167
|
+
'@stylistic/js/space-infix-ops': ['warn', {
|
|
168
|
+
int32Hint: false,
|
|
169
|
+
}],
|
|
170
|
+
'@stylistic/js/space-unary-ops': ['warn', {
|
|
171
|
+
words: true,
|
|
172
|
+
nonwords: false,
|
|
173
|
+
}],
|
|
174
|
+
'@stylistic/js/spaced-comment': ['warn', 'always', {
|
|
175
|
+
line: {
|
|
176
|
+
markers: ['/ <reference'],
|
|
177
|
+
},
|
|
178
|
+
}],
|
|
179
|
+
'@stylistic/js/switch-colon-spacing': ['warn', {
|
|
180
|
+
after: true,
|
|
181
|
+
before: false,
|
|
182
|
+
}],
|
|
183
|
+
'@stylistic/js/template-curly-spacing': ['warn', 'never'],
|
|
184
|
+
'@stylistic/js/template-tag-spacing': ['warn', 'never'],
|
|
185
|
+
'@stylistic/js/wrap-iife': ['warn', 'outside'],
|
|
186
|
+
'@stylistic/js/wrap-regex': 'warn',
|
|
187
|
+
'@stylistic/js/yield-star-spacing': ['warn', {
|
|
188
|
+
before: true,
|
|
189
|
+
after: false,
|
|
190
|
+
}],
|
|
191
|
+
},
|
|
192
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = {
|
|
3
|
+
plugins: [
|
|
4
|
+
'@stylistic/jsx',
|
|
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',
|
|
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-indent': ['warn', 4, {
|
|
31
|
+
checkAttributes: true,
|
|
32
|
+
indentLogicalExpressions: true,
|
|
33
|
+
}],
|
|
34
|
+
'@stylistic/jsx/jsx-indent-props': ['warn', {
|
|
35
|
+
indentMode: 1,
|
|
36
|
+
ignoreTernaryOperator: false,
|
|
37
|
+
}],
|
|
38
|
+
'@stylistic/jsx/jsx-max-props-per-line': ['warn', {
|
|
39
|
+
maximum: 1,
|
|
40
|
+
when: 'always',
|
|
41
|
+
}],
|
|
42
|
+
'@stylistic/jsx/jsx-newline': 'off',
|
|
43
|
+
'@stylistic/jsx/jsx-one-expression-per-line': ['warn', {
|
|
44
|
+
allow: 'single-child',
|
|
45
|
+
}],
|
|
46
|
+
'@stylistic/jsx/pascal-case': ['error', {
|
|
47
|
+
allowAllCaps: false,
|
|
48
|
+
allowLeadingUnderscore: false,
|
|
49
|
+
allowNamespace: false,
|
|
50
|
+
ignore: [],
|
|
51
|
+
}],
|
|
52
|
+
'@stylistic/jsx/jsx-props-no-multi-spaces': 'warn',
|
|
53
|
+
'@stylistic/jsx/jsx-self-closing-comp': ['warn', {
|
|
54
|
+
component: true,
|
|
55
|
+
html: true,
|
|
56
|
+
}],
|
|
57
|
+
'@stylistic/jsx/jsx-sort-props': ['warn', {
|
|
58
|
+
ignoreCase: false,
|
|
59
|
+
callbacksLast: true,
|
|
60
|
+
shorthandFirst: true,
|
|
61
|
+
shorthandLast: false,
|
|
62
|
+
multiline: 'ignore',
|
|
63
|
+
noSortAlphabetically: false,
|
|
64
|
+
reservedFirst: true,
|
|
65
|
+
locale: 'auto',
|
|
66
|
+
}],
|
|
67
|
+
'@stylistic/jsx/jsx-tag-spacing': ['warn', {
|
|
68
|
+
closingSlash: 'never',
|
|
69
|
+
beforeSelfClosing: 'always',
|
|
70
|
+
afterOpening: 'never',
|
|
71
|
+
beforeClosing: 'never',
|
|
72
|
+
}],
|
|
73
|
+
'@stylistic/jsx/jsx-wrap-multilines': ['warn', {
|
|
74
|
+
declaration: 'parens-new-line',
|
|
75
|
+
assignment: 'parens-new-line',
|
|
76
|
+
return: 'parens-new-line',
|
|
77
|
+
arrow: 'parens-new-line',
|
|
78
|
+
condition: 'parens-new-line',
|
|
79
|
+
logical: 'parens-new-line',
|
|
80
|
+
prop: 'parens-new-line',
|
|
81
|
+
}],
|
|
82
|
+
},
|
|
83
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = {
|
|
3
|
+
plugins: [
|
|
4
|
+
'@stylistic/ts',
|
|
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: [
|
|
37
|
+
'TSTypeParameterInstantiation',
|
|
38
|
+
],
|
|
39
|
+
}],
|
|
40
|
+
'@stylistic/js/key-spacing': 'off',
|
|
41
|
+
'@stylistic/ts/key-spacing': ['warn', {
|
|
42
|
+
beforeColon: false,
|
|
43
|
+
afterColon: true,
|
|
44
|
+
mode: 'strict',
|
|
45
|
+
}],
|
|
46
|
+
'@stylistic/js/keyword-spacing': 'off',
|
|
47
|
+
'@stylistic/ts/keyword-spacing': ['warn', {
|
|
48
|
+
before: true,
|
|
49
|
+
after: true,
|
|
50
|
+
}],
|
|
51
|
+
'@stylistic/js/lines-around-comment': 'off',
|
|
52
|
+
'@stylistic/ts/lines-around-comment': ['warn', {
|
|
53
|
+
beforeBlockComment: true,
|
|
54
|
+
afterBlockComment: false,
|
|
55
|
+
beforeLineComment: false,
|
|
56
|
+
afterLineComment: false,
|
|
57
|
+
allowBlockStart: false,
|
|
58
|
+
allowBlockEnd: false,
|
|
59
|
+
allowObjectStart: false,
|
|
60
|
+
allowObjectEnd: false,
|
|
61
|
+
allowArrayStart: false,
|
|
62
|
+
allowArrayEnd: false,
|
|
63
|
+
allowClassStart: true,
|
|
64
|
+
allowClassEnd: false,
|
|
65
|
+
allowInterfaceStart: true,
|
|
66
|
+
allowInterfaceEnd: true,
|
|
67
|
+
allowTypeStart: true,
|
|
68
|
+
allowTypeEnd: true,
|
|
69
|
+
}],
|
|
70
|
+
'@stylistic/js/lines-between-class-members': 'off',
|
|
71
|
+
'@stylistic/ts/lines-between-class-members': ['warn', 'always', {
|
|
72
|
+
exceptAfterSingleLine: true,
|
|
73
|
+
exceptAfterOverload: true,
|
|
74
|
+
}],
|
|
75
|
+
'@stylistic/ts/member-delimiter-style': ['warn', {
|
|
76
|
+
multiline: {
|
|
77
|
+
delimiter: 'semi',
|
|
78
|
+
requireLast: true,
|
|
79
|
+
},
|
|
80
|
+
singleline: {
|
|
81
|
+
delimiter: 'semi',
|
|
82
|
+
requireLast: true,
|
|
83
|
+
},
|
|
84
|
+
multilineDetection: 'brackets',
|
|
85
|
+
}],
|
|
86
|
+
'@stylistic/js/no-extra-parens': 'off',
|
|
87
|
+
'@stylistic/ts/no-extra-parens': ['warn', 'all', {
|
|
88
|
+
ignoreJSX: 'all',
|
|
89
|
+
nestedBinaryExpressions: false,
|
|
90
|
+
enforceForArrowConditionals: false,
|
|
91
|
+
}],
|
|
92
|
+
'@stylistic/js/no-extra-semi': 'off',
|
|
93
|
+
'@stylistic/ts/no-extra-semi': 'warn',
|
|
94
|
+
'@stylistic/js/object-curly-spacing': 'off',
|
|
95
|
+
'@stylistic/ts/object-curly-spacing': ['warn', 'always', {
|
|
96
|
+
arraysInObjects: true,
|
|
97
|
+
objectsInObjects: true,
|
|
98
|
+
}],
|
|
99
|
+
'@stylistic/js/padding-line-between-statements': 'off',
|
|
100
|
+
'@stylistic/ts/padding-line-between-statements': 'off',
|
|
101
|
+
'@stylistic/js/quote-props': 'off',
|
|
102
|
+
'@stylistic/ts/quote-props': ['warn', 'consistent-as-needed'],
|
|
103
|
+
'@stylistic/js/quotes': 'off',
|
|
104
|
+
'@stylistic/ts/quotes': ['warn', 'single', {
|
|
105
|
+
avoidEscape: true,
|
|
106
|
+
allowTemplateLiterals: true,
|
|
107
|
+
}],
|
|
108
|
+
'@stylistic/js/semi': 'off',
|
|
109
|
+
'@stylistic/ts/semi': ['warn', 'always'],
|
|
110
|
+
'@stylistic/js/space-before-blocks': 'off',
|
|
111
|
+
'@stylistic/ts/space-before-blocks': ['warn', 'always'],
|
|
112
|
+
'@stylistic/js/space-before-function-paren': 'off',
|
|
113
|
+
'@stylistic/ts/space-before-function-paren': ['warn', {
|
|
114
|
+
anonymous: 'always',
|
|
115
|
+
named: 'never',
|
|
116
|
+
asyncArrow: 'always',
|
|
117
|
+
}],
|
|
118
|
+
'@stylistic/js/space-infix-ops': 'off',
|
|
119
|
+
'@stylistic/ts/space-infix-ops': ['warn', {
|
|
120
|
+
int32Hint: false,
|
|
121
|
+
}],
|
|
122
|
+
'@stylistic/ts/type-annotation-spacing': 'warn',
|
|
123
|
+
},
|
|
124
|
+
};
|
|
@@ -2,29 +2,15 @@
|
|
|
2
2
|
module.exports = {
|
|
3
3
|
rules: {
|
|
4
4
|
'block-spacing': 'off',
|
|
5
|
-
'@typescript-eslint/block-spacing':
|
|
5
|
+
'@typescript-eslint/block-spacing': 'off',
|
|
6
6
|
'brace-style': 'off',
|
|
7
|
-
'@typescript-eslint/brace-style':
|
|
8
|
-
allowSingleLine: false,
|
|
9
|
-
}],
|
|
7
|
+
'@typescript-eslint/brace-style': 'off',
|
|
10
8
|
'class-methods-use-this': 'off',
|
|
11
9
|
'@typescript-eslint/class-methods-use-this': 'off',
|
|
12
10
|
'comma-dangle': 'off',
|
|
13
|
-
'@typescript-eslint/comma-dangle':
|
|
14
|
-
arrays: 'always-multiline',
|
|
15
|
-
enums: 'always-multiline',
|
|
16
|
-
exports: 'always-multiline',
|
|
17
|
-
functions: 'always-multiline',
|
|
18
|
-
generics: 'always-multiline',
|
|
19
|
-
imports: 'always-multiline',
|
|
20
|
-
objects: 'always-multiline',
|
|
21
|
-
tuples: 'always-multiline',
|
|
22
|
-
}],
|
|
11
|
+
'@typescript-eslint/comma-dangle': 'off',
|
|
23
12
|
'comma-spacing': 'off',
|
|
24
|
-
'@typescript-eslint/comma-spacing':
|
|
25
|
-
before: false,
|
|
26
|
-
after: true,
|
|
27
|
-
}],
|
|
13
|
+
'@typescript-eslint/comma-spacing': 'off',
|
|
28
14
|
'default-param-last': 'off',
|
|
29
15
|
'@typescript-eslint/default-param-last': 'error',
|
|
30
16
|
'dot-notation': 'off',
|
|
@@ -34,51 +20,19 @@ module.exports = {
|
|
|
34
20
|
allowProtectedClassPropertyAccess: false,
|
|
35
21
|
}],
|
|
36
22
|
'func-call-spacing': 'off',
|
|
37
|
-
'@typescript-eslint/func-call-spacing':
|
|
23
|
+
'@typescript-eslint/func-call-spacing': 'off',
|
|
38
24
|
'indent': 'off',
|
|
39
|
-
'@typescript-eslint/indent':
|
|
40
|
-
SwitchCase: 1,
|
|
41
|
-
ignoredNodes: [
|
|
42
|
-
'TSTypeParameterInstantiation',
|
|
43
|
-
],
|
|
44
|
-
}],
|
|
25
|
+
'@typescript-eslint/indent': 'off',
|
|
45
26
|
'init-declarations': 'off',
|
|
46
27
|
'@typescript-eslint/init-declarations': ['error', 'always'],
|
|
47
28
|
'key-spacing': 'off',
|
|
48
|
-
'@typescript-eslint/key-spacing':
|
|
49
|
-
beforeColon: false,
|
|
50
|
-
afterColon: true,
|
|
51
|
-
mode: 'strict',
|
|
52
|
-
}],
|
|
29
|
+
'@typescript-eslint/key-spacing': 'off',
|
|
53
30
|
'keyword-spacing': 'off',
|
|
54
|
-
'@typescript-eslint/keyword-spacing':
|
|
55
|
-
before: true,
|
|
56
|
-
after: true,
|
|
57
|
-
}],
|
|
31
|
+
'@typescript-eslint/keyword-spacing': 'off',
|
|
58
32
|
'lines-around-comment': 'off',
|
|
59
|
-
'@typescript-eslint/lines-around-comment':
|
|
60
|
-
beforeBlockComment: true,
|
|
61
|
-
afterBlockComment: false,
|
|
62
|
-
beforeLineComment: false,
|
|
63
|
-
afterLineComment: false,
|
|
64
|
-
allowBlockStart: false,
|
|
65
|
-
allowBlockEnd: false,
|
|
66
|
-
allowObjectStart: false,
|
|
67
|
-
allowObjectEnd: false,
|
|
68
|
-
allowArrayStart: false,
|
|
69
|
-
allowArrayEnd: false,
|
|
70
|
-
allowClassStart: true,
|
|
71
|
-
allowClassEnd: false,
|
|
72
|
-
allowInterfaceStart: true,
|
|
73
|
-
allowInterfaceEnd: true,
|
|
74
|
-
allowTypeStart: true,
|
|
75
|
-
allowTypeEnd: true,
|
|
76
|
-
}],
|
|
33
|
+
'@typescript-eslint/lines-around-comment': 'off',
|
|
77
34
|
'lines-between-class-members': 'off',
|
|
78
|
-
'@typescript-eslint/lines-between-class-members':
|
|
79
|
-
exceptAfterSingleLine: true,
|
|
80
|
-
exceptAfterOverload: true,
|
|
81
|
-
}],
|
|
35
|
+
'@typescript-eslint/lines-between-class-members': 'off',
|
|
82
36
|
'no-array-constructor': 'off',
|
|
83
37
|
'@typescript-eslint/no-array-constructor': 'warn',
|
|
84
38
|
'no-dupe-class-members': 'off',
|
|
@@ -88,13 +42,9 @@ module.exports = {
|
|
|
88
42
|
allow: ['protected-constructors', 'private-constructors'],
|
|
89
43
|
}],
|
|
90
44
|
'no-extra-parens': 'off',
|
|
91
|
-
'@typescript-eslint/no-extra-parens':
|
|
92
|
-
ignoreJSX: 'all',
|
|
93
|
-
nestedBinaryExpressions: false,
|
|
94
|
-
enforceForArrowConditionals: false,
|
|
95
|
-
}],
|
|
45
|
+
'@typescript-eslint/no-extra-parens': 'off',
|
|
96
46
|
'no-extra-semi': 'off',
|
|
97
|
-
'@typescript-eslint/no-extra-semi': '
|
|
47
|
+
'@typescript-eslint/no-extra-semi': 'off',
|
|
98
48
|
'no-implied-eval': 'off',
|
|
99
49
|
'@typescript-eslint/no-implied-eval': 'error',
|
|
100
50
|
'no-invalid-this': 'off',
|
|
@@ -140,36 +90,26 @@ module.exports = {
|
|
|
140
90
|
'no-useless-constructor': 'off',
|
|
141
91
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
142
92
|
'object-curly-spacing': 'off',
|
|
143
|
-
'@typescript-eslint/object-curly-spacing':
|
|
144
|
-
arraysInObjects: true,
|
|
145
|
-
objectsInObjects: true,
|
|
146
|
-
}],
|
|
93
|
+
'@typescript-eslint/object-curly-spacing': 'off',
|
|
147
94
|
'padding-line-between-statements': 'off',
|
|
148
95
|
'@typescript-eslint/padding-line-between-statements': 'off',
|
|
149
96
|
'prefer-destructuring': 'off',
|
|
150
97
|
'@typescript-eslint/prefer-destructuring': 'off',
|
|
98
|
+
'prefer-promise-reject-errors': 'off',
|
|
99
|
+
'@typescript-eslint/prefer-promise-reject-errors': 'error',
|
|
151
100
|
'quotes': 'off',
|
|
152
|
-
'@typescript-eslint/quotes':
|
|
153
|
-
avoidEscape: true,
|
|
154
|
-
allowTemplateLiterals: true,
|
|
155
|
-
}],
|
|
101
|
+
'@typescript-eslint/quotes': 'off',
|
|
156
102
|
'require-await': 'off',
|
|
157
103
|
'@typescript-eslint/require-await': 'error',
|
|
158
104
|
'no-return-await': 'off',
|
|
159
105
|
'@typescript-eslint/return-await': ['warn', 'never'],
|
|
160
106
|
'semi': 'off',
|
|
161
|
-
'@typescript-eslint/semi':
|
|
107
|
+
'@typescript-eslint/semi': 'off',
|
|
162
108
|
'space-before-blocks': 'off',
|
|
163
|
-
'@typescript-eslint/space-before-blocks':
|
|
109
|
+
'@typescript-eslint/space-before-blocks': 'off',
|
|
164
110
|
'space-before-function-paren': 'off',
|
|
165
|
-
'@typescript-eslint/space-before-function-paren':
|
|
166
|
-
anonymous: 'always',
|
|
167
|
-
named: 'never',
|
|
168
|
-
asyncArrow: 'always',
|
|
169
|
-
}],
|
|
111
|
+
'@typescript-eslint/space-before-function-paren': 'off',
|
|
170
112
|
'space-infix-ops': 'off',
|
|
171
|
-
'@typescript-eslint/space-infix-ops':
|
|
172
|
-
int32Hint: false,
|
|
173
|
-
}],
|
|
113
|
+
'@typescript-eslint/space-infix-ops': 'off',
|
|
174
114
|
},
|
|
175
115
|
};
|
|
@@ -50,17 +50,7 @@ module.exports = {
|
|
|
50
50
|
}],
|
|
51
51
|
'@typescript-eslint/explicit-member-accessibility': 'warn',
|
|
52
52
|
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
53
|
-
'@typescript-eslint/member-delimiter-style':
|
|
54
|
-
multiline: {
|
|
55
|
-
delimiter: 'semi',
|
|
56
|
-
requireLast: true,
|
|
57
|
-
},
|
|
58
|
-
singleline: {
|
|
59
|
-
delimiter: 'semi',
|
|
60
|
-
requireLast: true,
|
|
61
|
-
},
|
|
62
|
-
multilineDetection: 'brackets',
|
|
63
|
-
}],
|
|
53
|
+
'@typescript-eslint/member-delimiter-style': 'off',
|
|
64
54
|
'@typescript-eslint/member-ordering': ['error', {
|
|
65
55
|
default: [
|
|
66
56
|
'signature',
|
|
@@ -125,6 +115,7 @@ module.exports = {
|
|
|
125
115
|
}],
|
|
126
116
|
'@typescript-eslint/method-signature-style': ['warn', 'property'],
|
|
127
117
|
'@typescript-eslint/naming-convention': ['error', ...(0, typescript_eslint_naming_convention_1.typescriptEslintNamingConvention)()],
|
|
118
|
+
'@typescript-eslint/no-array-delete': 'error',
|
|
128
119
|
'@typescript-eslint/no-base-to-string': 'error',
|
|
129
120
|
'@typescript-eslint/no-confusing-non-null-assertion': 'warn',
|
|
130
121
|
'@typescript-eslint/no-confusing-void-expression': ['warn', {
|
|
@@ -172,7 +163,9 @@ module.exports = {
|
|
|
172
163
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
173
164
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
174
165
|
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
|
175
|
-
'@typescript-eslint/no-require-imports': 'error',
|
|
166
|
+
'@typescript-eslint/no-require-imports': ['error', {
|
|
167
|
+
allow: [],
|
|
168
|
+
}],
|
|
176
169
|
'@typescript-eslint/no-this-alias': 'error',
|
|
177
170
|
'@typescript-eslint/no-type-alias': 'off',
|
|
178
171
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': ['warn', {
|
|
@@ -194,13 +187,16 @@ module.exports = {
|
|
|
194
187
|
'@typescript-eslint/no-unsafe-unary-minus': 'error',
|
|
195
188
|
'@typescript-eslint/no-useless-empty-export': 'warn',
|
|
196
189
|
'@typescript-eslint/no-useless-template-literals': 'error',
|
|
197
|
-
'@typescript-eslint/no-var-requires': 'error',
|
|
190
|
+
'@typescript-eslint/no-var-requires': ['error', {
|
|
191
|
+
allow: [],
|
|
192
|
+
}],
|
|
198
193
|
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
|
|
199
194
|
'@typescript-eslint/parameter-properties': ['error', {
|
|
200
195
|
prefer: 'parameter-property',
|
|
201
196
|
}],
|
|
202
197
|
'@typescript-eslint/prefer-as-const': 'warn',
|
|
203
198
|
'@typescript-eslint/prefer-enum-initializers': 'error',
|
|
199
|
+
'@typescript-eslint/prefer-find': 'error',
|
|
204
200
|
'@typescript-eslint/prefer-for-of': 'error',
|
|
205
201
|
'@typescript-eslint/prefer-function-type': 'warn',
|
|
206
202
|
'@typescript-eslint/prefer-includes': 'warn',
|
|
@@ -277,7 +273,7 @@ module.exports = {
|
|
|
277
273
|
types: 'always',
|
|
278
274
|
lib: 'never',
|
|
279
275
|
}],
|
|
280
|
-
'@typescript-eslint/type-annotation-spacing': '
|
|
276
|
+
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
281
277
|
'@typescript-eslint/typedef': ['error', {
|
|
282
278
|
arrayDestructuring: false,
|
|
283
279
|
arrowParameter: false,
|