@perfective/eslint-config 0.16.0 → 0.17.0-alpha
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/package.json +12 -12
- package/rules/eslint/index.js +3 -6
- package/rules/eslint/{stylistic-issues.js → layout-formatting.js} +22 -73
- package/rules/eslint/{possible-errors.js → possible-problems.js} +31 -11
- package/rules/eslint/suggestions.js +194 -0
- package/rules/jest/index.js +11 -8
- package/rules/jsdoc/index.js +1 -0
- package/rules/rxjs/index.js +1 -0
- package/rules/testing-library/index.js +1 -1
- package/rules/typescript-eslint/extension-rules.js +4 -1
- package/rules/typescript-eslint/supported-rules.js +41 -4
- package/rules/unicorn/index.js +5 -1
- package/rules/eslint/best-practices.js +0 -93
- package/rules/eslint/ecma-script-6.js +0 -53
- package/rules/eslint/strict-mode.js +0 -6
- package/rules/eslint/variables.js +0 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perfective/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0-alpha",
|
|
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>",
|
|
@@ -12,28 +12,28 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@babel/eslint-parser": "^7.16.5",
|
|
15
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
16
|
-
"@typescript-eslint/eslint-plugin-tslint": "^
|
|
17
|
-
"@typescript-eslint/parser": "^
|
|
18
|
-
"eslint": "^
|
|
15
|
+
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
|
16
|
+
"@typescript-eslint/eslint-plugin-tslint": "^5.8.1",
|
|
17
|
+
"@typescript-eslint/parser": "^5.8.1",
|
|
18
|
+
"eslint": "^8.6.0",
|
|
19
19
|
"eslint-import-resolver-typescript": "^2.5.0",
|
|
20
20
|
"eslint-plugin-array-func": "^3.1.7",
|
|
21
21
|
"eslint-plugin-cypress": "^2.12.1",
|
|
22
22
|
"eslint-plugin-deprecation": "^1.3.2",
|
|
23
23
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
24
|
-
"eslint-plugin-import": "^2.25.
|
|
25
|
-
"eslint-plugin-jest": "^
|
|
26
|
-
"eslint-plugin-jest-dom": "^4.0.
|
|
24
|
+
"eslint-plugin-import": "^2.25.4",
|
|
25
|
+
"eslint-plugin-jest": "^25.3.4",
|
|
26
|
+
"eslint-plugin-jest-dom": "^4.0.1",
|
|
27
27
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
28
|
-
"eslint-plugin-jsdoc": "^37.
|
|
28
|
+
"eslint-plugin-jsdoc": "^37.5.0",
|
|
29
29
|
"eslint-plugin-node": "^11.1.0",
|
|
30
30
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
31
31
|
"eslint-plugin-promise": "^6.0.0",
|
|
32
|
-
"eslint-plugin-rxjs": "^
|
|
32
|
+
"eslint-plugin-rxjs": "^4.0.4",
|
|
33
33
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
34
34
|
"eslint-plugin-sonarjs": "^0.11.0",
|
|
35
|
-
"eslint-plugin-testing-library": "^
|
|
36
|
-
"eslint-plugin-unicorn": "^
|
|
35
|
+
"eslint-plugin-testing-library": "^5.0.1",
|
|
36
|
+
"eslint-plugin-unicorn": "^40.0.0",
|
|
37
37
|
"tslint": "^6.1.3"
|
|
38
38
|
},
|
|
39
39
|
"main": "./index.js",
|
package/rules/eslint/index.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
module.exports = {
|
|
3
3
|
extends: [
|
|
4
|
-
'./possible-
|
|
5
|
-
'./
|
|
6
|
-
'./
|
|
7
|
-
'./variables',
|
|
8
|
-
'./stylistic-issues',
|
|
9
|
-
'./ecma-script-6',
|
|
4
|
+
'./possible-problems',
|
|
5
|
+
'./suggestions',
|
|
6
|
+
'./layout-formatting',
|
|
10
7
|
],
|
|
11
8
|
};
|
|
@@ -4,15 +4,15 @@ module.exports = {
|
|
|
4
4
|
'array-bracket-newline': ['warn', 'consistent'],
|
|
5
5
|
'array-bracket-spacing': ['warn', 'never'],
|
|
6
6
|
'array-element-newline': ['warn', 'consistent'],
|
|
7
|
+
'arrow-parens': ['warn', 'as-needed'],
|
|
8
|
+
'arrow-spacing': ['warn', {
|
|
9
|
+
before: true,
|
|
10
|
+
after: true,
|
|
11
|
+
}],
|
|
7
12
|
'block-spacing': ['warn', 'always'],
|
|
8
13
|
'brace-style': ['warn', 'stroustrup', {
|
|
9
14
|
allowSingleLine: false,
|
|
10
15
|
}],
|
|
11
|
-
'camelcase': 'off',
|
|
12
|
-
'capitalized-comments': ['warn', 'always', {
|
|
13
|
-
ignorePattern: 'eslint|tslint',
|
|
14
|
-
ignoreConsecutiveComments: true,
|
|
15
|
-
}],
|
|
16
16
|
'comma-dangle': ['warn', {
|
|
17
17
|
arrays: 'always-multiline',
|
|
18
18
|
objects: 'always-multiline',
|
|
@@ -26,17 +26,15 @@ module.exports = {
|
|
|
26
26
|
}],
|
|
27
27
|
'comma-style': ['warn', 'last'],
|
|
28
28
|
'computed-property-spacing': ['warn', 'never'],
|
|
29
|
-
'
|
|
29
|
+
'dot-location': ['warn', 'property'],
|
|
30
30
|
'eol-last': ['warn', 'always'],
|
|
31
31
|
'func-call-spacing': ['warn', 'never'],
|
|
32
|
-
'func-name-matching': ['error', 'always'],
|
|
33
|
-
'func-names': ['error', 'always'],
|
|
34
|
-
'func-style': ['error', 'declaration'],
|
|
35
32
|
'function-call-argument-newline': ['warn', 'consistent'],
|
|
36
33
|
'function-paren-newline': ['warn', 'consistent'],
|
|
37
|
-
'
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
'generator-star-spacing': ['warn', {
|
|
35
|
+
before: true,
|
|
36
|
+
after: false,
|
|
37
|
+
}],
|
|
40
38
|
'implicit-arrow-linebreak': ['warn', 'beside'],
|
|
41
39
|
'indent': ['warn', 4, {
|
|
42
40
|
SwitchCase: 1,
|
|
@@ -73,77 +71,34 @@ module.exports = {
|
|
|
73
71
|
'lines-between-class-members': ['warn', 'always', {
|
|
74
72
|
exceptAfterSingleLine: true,
|
|
75
73
|
}],
|
|
76
|
-
'max-depth': ['error', 4],
|
|
77
74
|
'max-len': ['error', {
|
|
78
75
|
code: 120,
|
|
79
76
|
tabWidth: 4,
|
|
80
77
|
ignoreRegExpLiterals: true,
|
|
81
78
|
ignoreUrls: true,
|
|
82
79
|
}],
|
|
83
|
-
'max-lines': 'off',
|
|
84
|
-
'max-lines-per-function': 'off',
|
|
85
|
-
'max-nested-callbacks': ['error', 2],
|
|
86
|
-
'max-params': ['off', {
|
|
87
|
-
max: 3,
|
|
88
|
-
}],
|
|
89
|
-
'max-statements': ['off', {
|
|
90
|
-
max: 10,
|
|
91
|
-
}],
|
|
92
80
|
'max-statements-per-line': ['error', {
|
|
93
81
|
max: 1,
|
|
94
82
|
}],
|
|
95
|
-
'multiline-comment-style': ['warn', 'separate-lines'],
|
|
96
83
|
'multiline-ternary': ['warn', 'always-multiline'],
|
|
97
|
-
'new-cap': ['error', {
|
|
98
|
-
newIsCap: true,
|
|
99
|
-
capIsNew: true,
|
|
100
|
-
properties: true,
|
|
101
|
-
}],
|
|
102
84
|
'new-parens': 'warn',
|
|
103
85
|
'newline-per-chained-call': ['off', {
|
|
104
86
|
ignoreChainWithDepth: 3,
|
|
105
87
|
}],
|
|
106
|
-
'no-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
ignorePattern: '^ == .+',
|
|
111
|
-
}],
|
|
112
|
-
'no-lonely-if': 'warn',
|
|
113
|
-
'no-mixed-operators': ['error', {
|
|
114
|
-
groups: [
|
|
115
|
-
['+', '-'],
|
|
116
|
-
['*', '/', '%', '**'],
|
|
117
|
-
['&', '|', '^', '~', '<<', '>>', '>>>'],
|
|
118
|
-
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
|
119
|
-
['&&', '||', '?:', '??'],
|
|
120
|
-
['in', 'instanceof'],
|
|
121
|
-
],
|
|
122
|
-
allowSamePrecedence: true,
|
|
88
|
+
'no-extra-parens': ['warn', 'all', {
|
|
89
|
+
ignoreJSX: 'all',
|
|
90
|
+
nestedBinaryExpressions: false,
|
|
91
|
+
enforceForArrowConditionals: false,
|
|
123
92
|
}],
|
|
124
93
|
'no-mixed-spaces-and-tabs': 'error',
|
|
125
|
-
'no-multi-
|
|
94
|
+
'no-multi-spaces': 'warn',
|
|
126
95
|
'no-multiple-empty-lines': ['warn', {
|
|
127
96
|
max: 1,
|
|
128
97
|
maxEOF: 0,
|
|
129
98
|
maxBOF: 0,
|
|
130
99
|
}],
|
|
131
|
-
'no-negated-condition': 'error',
|
|
132
|
-
'no-nested-ternary': 'error',
|
|
133
|
-
'no-new-object': 'error',
|
|
134
|
-
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
|
|
135
|
-
'no-restricted-syntax': ['error', 'ForInStatement'],
|
|
136
100
|
'no-tabs': 'error',
|
|
137
|
-
'no-ternary': 'off',
|
|
138
101
|
'no-trailing-spaces': 'warn',
|
|
139
|
-
'no-underscore-dangle': ['error', {
|
|
140
|
-
allowAfterSuper: false,
|
|
141
|
-
allowAfterThis: true,
|
|
142
|
-
allowAfterThisConstructor: false,
|
|
143
|
-
allowFunctionParams: true,
|
|
144
|
-
enforceInMethodNames: true,
|
|
145
|
-
}],
|
|
146
|
-
'no-unneeded-ternary': 'warn',
|
|
147
102
|
'no-whitespace-before-property': 'warn',
|
|
148
103
|
'nonblock-statement-body-position': ['warn', 'below'],
|
|
149
104
|
'object-curly-newline': ['warn', {
|
|
@@ -157,9 +112,6 @@ module.exports = {
|
|
|
157
112
|
'object-property-newline': ['warn', {
|
|
158
113
|
allowAllPropertiesOnSameLine: true,
|
|
159
114
|
}],
|
|
160
|
-
'one-var': ['warn', 'never'],
|
|
161
|
-
'one-var-declaration-per-line': ['warn', 'always'],
|
|
162
|
-
'operator-assignment': ['warn', 'always'],
|
|
163
115
|
'operator-linebreak': ['warn', 'before', {
|
|
164
116
|
overrides: {
|
|
165
117
|
'=': 'none',
|
|
@@ -173,21 +125,17 @@ module.exports = {
|
|
|
173
125
|
}],
|
|
174
126
|
'padded-blocks': ['warn', 'never'],
|
|
175
127
|
'padding-line-between-statements': 'off',
|
|
176
|
-
'prefer-exponentiation-operator': 'warn',
|
|
177
|
-
'prefer-object-spread': 'warn',
|
|
178
|
-
'quote-props': ['warn', 'consistent-as-needed'],
|
|
179
128
|
'quotes': ['warn', 'single', {
|
|
180
129
|
avoidEscape: true,
|
|
181
130
|
allowTemplateLiterals: true,
|
|
182
131
|
}],
|
|
132
|
+
'rest-spread-spacing': ['warn', 'never'],
|
|
183
133
|
'semi': ['warn', 'always'],
|
|
184
134
|
'semi-spacing': ['warn', {
|
|
185
135
|
before: false,
|
|
186
136
|
after: true,
|
|
187
137
|
}],
|
|
188
138
|
'semi-style': ['warn', 'last'],
|
|
189
|
-
'sort-keys': 'off',
|
|
190
|
-
'sort-vars': 'off',
|
|
191
139
|
'space-before-blocks': ['warn', 'always'],
|
|
192
140
|
'space-before-function-paren': ['warn', {
|
|
193
141
|
anonymous: 'always',
|
|
@@ -202,17 +150,18 @@ module.exports = {
|
|
|
202
150
|
words: true,
|
|
203
151
|
nonwords: false,
|
|
204
152
|
}],
|
|
205
|
-
'spaced-comment': ['warn', 'always', {
|
|
206
|
-
line: {
|
|
207
|
-
markers: ['/ <reference'],
|
|
208
|
-
},
|
|
209
|
-
}],
|
|
210
153
|
'switch-colon-spacing': ['warn', {
|
|
211
154
|
after: true,
|
|
212
155
|
before: false,
|
|
213
156
|
}],
|
|
157
|
+
'template-curly-spacing': ['warn', 'never'],
|
|
214
158
|
'template-tag-spacing': ['warn', 'never'],
|
|
215
159
|
'unicode-bom': ['warn', 'never'],
|
|
160
|
+
'wrap-iife': ['warn', 'outside'],
|
|
216
161
|
'wrap-regex': 'warn',
|
|
162
|
+
'yield-star-spacing': ['warn', {
|
|
163
|
+
before: true,
|
|
164
|
+
after: false,
|
|
165
|
+
}],
|
|
217
166
|
},
|
|
218
167
|
};
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
module.exports = {
|
|
3
3
|
rules: {
|
|
4
|
+
'array-callback-return': ['error', {
|
|
5
|
+
allowImplicit: true,
|
|
6
|
+
}],
|
|
7
|
+
'constructor-super': 'error',
|
|
4
8
|
'for-direction': 'error',
|
|
5
9
|
'getter-return': 'error',
|
|
6
10
|
'no-async-promise-executor': 'error',
|
|
7
11
|
'no-await-in-loop': 'error',
|
|
12
|
+
'no-class-assign': 'error',
|
|
8
13
|
'no-compare-neg-zero': 'error',
|
|
9
14
|
'no-cond-assign': ['error', 'always'],
|
|
10
|
-
'no-
|
|
15
|
+
'no-const-assign': 'error',
|
|
11
16
|
'no-constant-condition': 'error',
|
|
17
|
+
'no-constructor-return': 'error',
|
|
12
18
|
'no-control-regex': 'error',
|
|
13
19
|
'no-debugger': 'error',
|
|
14
20
|
'no-dupe-args': 'error',
|
|
21
|
+
'no-dupe-class-members': 'error',
|
|
15
22
|
'no-dupe-else-if': 'error',
|
|
16
23
|
'no-dupe-keys': 'error',
|
|
17
24
|
'no-duplicate-case': 'error',
|
|
18
|
-
'no-
|
|
25
|
+
'no-duplicate-imports': ['error', {
|
|
26
|
+
includeExports: true,
|
|
27
|
+
}],
|
|
19
28
|
'no-empty-character-class': 'error',
|
|
29
|
+
'no-empty-pattern': 'error',
|
|
20
30
|
'no-ex-assign': 'error',
|
|
21
|
-
'no-
|
|
22
|
-
'no-extra-parens': ['warn', 'all', {
|
|
23
|
-
ignoreJSX: 'all',
|
|
24
|
-
nestedBinaryExpressions: false,
|
|
25
|
-
enforceForArrowConditionals: false,
|
|
26
|
-
}],
|
|
27
|
-
'no-extra-semi': 'warn',
|
|
31
|
+
'no-fallthrough': 'error',
|
|
28
32
|
'no-func-assign': 'error',
|
|
29
33
|
'no-import-assign': 'error',
|
|
30
34
|
'no-inner-declarations': 'error',
|
|
@@ -32,21 +36,37 @@ module.exports = {
|
|
|
32
36
|
'no-irregular-whitespace': 'error',
|
|
33
37
|
'no-loss-of-precision': 'error',
|
|
34
38
|
'no-misleading-character-class': 'error',
|
|
39
|
+
'no-new-symbol': 'error',
|
|
35
40
|
'no-obj-calls': 'error',
|
|
36
41
|
'no-promise-executor-return': 'error',
|
|
37
42
|
'no-prototype-builtins': 'error',
|
|
38
|
-
'no-
|
|
43
|
+
'no-self-assign': 'error',
|
|
44
|
+
'no-self-compare': 'error',
|
|
39
45
|
'no-setter-return': 'error',
|
|
40
46
|
'no-sparse-arrays': 'error',
|
|
41
47
|
'no-template-curly-in-string': 'error',
|
|
48
|
+
'no-this-before-super': 'error',
|
|
49
|
+
'no-undef': 'off',
|
|
42
50
|
'no-unexpected-multiline': 'error',
|
|
51
|
+
'no-unmodified-loop-condition': 'error',
|
|
43
52
|
'no-unreachable': 'error',
|
|
44
53
|
'no-unreachable-loop': 'error',
|
|
45
54
|
'no-unsafe-finally': 'error',
|
|
46
55
|
'no-unsafe-negation': 'error',
|
|
47
56
|
'no-unsafe-optional-chaining': 'error',
|
|
57
|
+
'no-unused-private-class-members': 'error',
|
|
58
|
+
'no-unused-vars': ['error', {
|
|
59
|
+
args: 'after-used',
|
|
60
|
+
argsIgnorePattern: '^_',
|
|
61
|
+
}],
|
|
62
|
+
'no-use-before-define': ['error', {
|
|
63
|
+
functions: false,
|
|
64
|
+
classes: false,
|
|
65
|
+
}],
|
|
48
66
|
'no-useless-backreference': 'error',
|
|
49
|
-
'require-atomic-updates': 'error',
|
|
67
|
+
'require-atomic-updates': ['error', {
|
|
68
|
+
allowProperties: false,
|
|
69
|
+
}],
|
|
50
70
|
'use-isnan': 'error',
|
|
51
71
|
'valid-typeof': 'error',
|
|
52
72
|
},
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = {
|
|
3
|
+
rules: {
|
|
4
|
+
'accessor-pairs': 'error',
|
|
5
|
+
'arrow-body-style': ['error', 'as-needed'],
|
|
6
|
+
'block-scoped-var': 'error',
|
|
7
|
+
'camelcase': 'off',
|
|
8
|
+
'capitalized-comments': ['warn', 'always', {
|
|
9
|
+
ignorePattern: 'eslint|tslint',
|
|
10
|
+
ignoreConsecutiveComments: true,
|
|
11
|
+
}],
|
|
12
|
+
'class-methods-use-this': 'off',
|
|
13
|
+
'complexity': ['error', 3],
|
|
14
|
+
'consistent-return': 'error',
|
|
15
|
+
'consistent-this': ['error', 'self'],
|
|
16
|
+
'curly': ['warn', 'all'],
|
|
17
|
+
'default-case': 'error',
|
|
18
|
+
'default-case-last': 'error',
|
|
19
|
+
'default-param-last': 'error',
|
|
20
|
+
'dot-notation': ['warn', {
|
|
21
|
+
allowKeywords: true,
|
|
22
|
+
}],
|
|
23
|
+
'eqeqeq': ['warn', 'always'],
|
|
24
|
+
'func-name-matching': ['error', 'always'],
|
|
25
|
+
'func-names': ['error', 'always'],
|
|
26
|
+
'func-style': ['error', 'declaration'],
|
|
27
|
+
'grouped-accessor-pairs': ['error', 'setBeforeGet'],
|
|
28
|
+
'guard-for-in': 'error',
|
|
29
|
+
'id-denylist': ['error', 'arr', 'ctx', 'el', 'elem', 'err', 'ind', 'ptr'],
|
|
30
|
+
'id-length': 'off',
|
|
31
|
+
'id-match': 'off',
|
|
32
|
+
'init-declarations': ['error', 'always'],
|
|
33
|
+
'max-classes-per-file': ['error', 1],
|
|
34
|
+
'max-depth': ['error', 4],
|
|
35
|
+
'max-lines': 'off',
|
|
36
|
+
'max-lines-per-function': 'off',
|
|
37
|
+
'max-nested-callbacks': ['error', 2],
|
|
38
|
+
'max-params': ['off', {
|
|
39
|
+
max: 3,
|
|
40
|
+
}],
|
|
41
|
+
'max-statements': ['off', {
|
|
42
|
+
max: 10,
|
|
43
|
+
}],
|
|
44
|
+
'multiline-comment-style': ['warn', 'separate-lines'],
|
|
45
|
+
'new-cap': ['error', {
|
|
46
|
+
newIsCap: true,
|
|
47
|
+
capIsNew: true,
|
|
48
|
+
properties: true,
|
|
49
|
+
}],
|
|
50
|
+
'no-alert': 'error',
|
|
51
|
+
'no-array-constructor': 'error',
|
|
52
|
+
'no-bitwise': 'error',
|
|
53
|
+
'no-caller': 'error',
|
|
54
|
+
'no-case-declarations': 'error',
|
|
55
|
+
'no-confusing-arrow': ['warn', {
|
|
56
|
+
allowParens: true,
|
|
57
|
+
}],
|
|
58
|
+
'no-console': 'error',
|
|
59
|
+
'no-continue': 'error',
|
|
60
|
+
'no-delete-var': 'error',
|
|
61
|
+
'no-div-regex': 'warn',
|
|
62
|
+
'no-else-return': ['warn', {
|
|
63
|
+
allowElseIf: false,
|
|
64
|
+
}],
|
|
65
|
+
'no-empty': 'error',
|
|
66
|
+
'no-empty-function': 'error',
|
|
67
|
+
'no-eq-null': 'error',
|
|
68
|
+
'no-eval': 'error',
|
|
69
|
+
'no-extend-native': 'error',
|
|
70
|
+
'no-extra-bind': 'warn',
|
|
71
|
+
'no-extra-boolean-cast': 'warn',
|
|
72
|
+
'no-extra-label': 'warn',
|
|
73
|
+
'no-extra-semi': 'warn',
|
|
74
|
+
'no-floating-decimal': 'warn',
|
|
75
|
+
'no-global-assign': 'error',
|
|
76
|
+
'no-implicit-coercion': 'warn',
|
|
77
|
+
'no-implicit-globals': 'error',
|
|
78
|
+
'no-implied-eval': 'error',
|
|
79
|
+
'no-inline-comments': ['error', {
|
|
80
|
+
ignorePattern: '^ == .+',
|
|
81
|
+
}],
|
|
82
|
+
'no-invalid-this': 'error',
|
|
83
|
+
'no-iterator': 'error',
|
|
84
|
+
'no-label-var': 'error',
|
|
85
|
+
'no-labels': 'error',
|
|
86
|
+
'no-lone-blocks': 'error',
|
|
87
|
+
'no-lonely-if': 'warn',
|
|
88
|
+
'no-loop-func': 'error',
|
|
89
|
+
'no-magic-numbers': 'off',
|
|
90
|
+
'no-mixed-operators': ['error', {
|
|
91
|
+
groups: [
|
|
92
|
+
['+', '-'],
|
|
93
|
+
['*', '/', '%', '**'],
|
|
94
|
+
['&', '|', '^', '~', '<<', '>>', '>>>'],
|
|
95
|
+
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
|
96
|
+
['&&', '||', '?:', '??'],
|
|
97
|
+
['in', 'instanceof'],
|
|
98
|
+
],
|
|
99
|
+
allowSamePrecedence: true,
|
|
100
|
+
}],
|
|
101
|
+
'no-multi-assign': 'error',
|
|
102
|
+
'no-multi-str': 'error',
|
|
103
|
+
'no-negated-condition': 'error',
|
|
104
|
+
'no-nested-ternary': 'error',
|
|
105
|
+
'no-new': 'error',
|
|
106
|
+
'no-new-func': 'error',
|
|
107
|
+
'no-new-object': 'error',
|
|
108
|
+
'no-new-wrappers': 'error',
|
|
109
|
+
'no-nonoctal-decimal-escape': 'error',
|
|
110
|
+
'no-octal': 'error',
|
|
111
|
+
'no-octal-escape': 'error',
|
|
112
|
+
'no-param-reassign': 'error',
|
|
113
|
+
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
|
|
114
|
+
'no-proto': 'error',
|
|
115
|
+
'no-redeclare': 'error',
|
|
116
|
+
'no-regex-spaces': 'warn',
|
|
117
|
+
'no-restricted-exports': 'off',
|
|
118
|
+
'no-restricted-globals': 'error',
|
|
119
|
+
'no-restricted-imports': 'error',
|
|
120
|
+
'no-restricted-properties': 'error',
|
|
121
|
+
'no-restricted-syntax': ['error', 'ForInStatement'],
|
|
122
|
+
'no-return-assign': 'error',
|
|
123
|
+
'no-return-await': 'error',
|
|
124
|
+
'no-script-url': 'error',
|
|
125
|
+
'no-sequences': ['error', {
|
|
126
|
+
allowInParentheses: false,
|
|
127
|
+
}],
|
|
128
|
+
'no-shadow': 'off',
|
|
129
|
+
'no-shadow-restricted-names': 'error',
|
|
130
|
+
'no-ternary': 'off',
|
|
131
|
+
'no-throw-literal': 'error',
|
|
132
|
+
'no-undef-init': 'warn',
|
|
133
|
+
'no-undefined': 'off',
|
|
134
|
+
'no-underscore-dangle': ['error', {
|
|
135
|
+
allowAfterSuper: false,
|
|
136
|
+
allowAfterThis: true,
|
|
137
|
+
allowAfterThisConstructor: false,
|
|
138
|
+
allowFunctionParams: true,
|
|
139
|
+
enforceInMethodNames: true,
|
|
140
|
+
}],
|
|
141
|
+
'no-unneeded-ternary': 'warn',
|
|
142
|
+
'no-unused-expressions': 'error',
|
|
143
|
+
'no-unused-labels': 'warn',
|
|
144
|
+
'no-useless-call': 'error',
|
|
145
|
+
'no-useless-catch': 'error',
|
|
146
|
+
'no-useless-computed-key': 'warn',
|
|
147
|
+
'no-useless-concat': 'error',
|
|
148
|
+
'no-useless-constructor': 'error',
|
|
149
|
+
'no-useless-escape': 'error',
|
|
150
|
+
'no-useless-rename': 'warn',
|
|
151
|
+
'no-useless-return': 'warn',
|
|
152
|
+
'no-var': 'warn',
|
|
153
|
+
'no-void': 'error',
|
|
154
|
+
'no-warning-comments': 'off',
|
|
155
|
+
'no-with': 'error',
|
|
156
|
+
'object-shorthand': ['warn', 'always'],
|
|
157
|
+
'one-var': ['warn', 'never'],
|
|
158
|
+
'one-var-declaration-per-line': ['warn', 'always'],
|
|
159
|
+
'operator-assignment': ['warn', 'always'],
|
|
160
|
+
'prefer-arrow-callback': 'warn',
|
|
161
|
+
'prefer-const': 'warn',
|
|
162
|
+
'prefer-destructuring': ['warn', {
|
|
163
|
+
object: false,
|
|
164
|
+
array: false,
|
|
165
|
+
}],
|
|
166
|
+
'prefer-exponentiation-operator': 'warn',
|
|
167
|
+
'prefer-named-capture-group': 'off',
|
|
168
|
+
'prefer-numeric-literals': 'warn',
|
|
169
|
+
'prefer-object-has-own': 'off',
|
|
170
|
+
'prefer-object-spread': 'warn',
|
|
171
|
+
'prefer-promise-reject-errors': 'error',
|
|
172
|
+
'prefer-regex-literals': 'off',
|
|
173
|
+
'prefer-rest-params': 'error',
|
|
174
|
+
'prefer-spread': 'error',
|
|
175
|
+
'prefer-template': 'warn',
|
|
176
|
+
'quote-props': ['warn', 'consistent-as-needed'],
|
|
177
|
+
'radix': 'error',
|
|
178
|
+
'require-await': 'error',
|
|
179
|
+
'require-unicode-regexp': 'error',
|
|
180
|
+
'require-yield': 'error',
|
|
181
|
+
'sort-imports': 'off',
|
|
182
|
+
'sort-keys': 'off',
|
|
183
|
+
'sort-vars': 'off',
|
|
184
|
+
'spaced-comment': ['warn', 'always', {
|
|
185
|
+
line: {
|
|
186
|
+
markers: ['/ <reference'],
|
|
187
|
+
},
|
|
188
|
+
}],
|
|
189
|
+
'strict': 'warn',
|
|
190
|
+
'symbol-description': 'error',
|
|
191
|
+
'vars-on-top': 'error',
|
|
192
|
+
'yoda': ['warn', 'never'],
|
|
193
|
+
},
|
|
194
|
+
};
|
package/rules/jest/index.js
CHANGED
|
@@ -13,9 +13,7 @@ module.exports = {
|
|
|
13
13
|
}],
|
|
14
14
|
'jest/expect-expect': ['error', {
|
|
15
15
|
assertFunctionNames: ['expect', 'request.*.expect'],
|
|
16
|
-
|
|
17
|
-
'jest/lowercase-name': ['error', {
|
|
18
|
-
ignore: ['describe'],
|
|
16
|
+
additionalTestBlockFunctions: [],
|
|
19
17
|
}],
|
|
20
18
|
'jest/max-nested-describe': ['error', {
|
|
21
19
|
max: 3,
|
|
@@ -51,18 +49,23 @@ module.exports = {
|
|
|
51
49
|
'jest/prefer-expect-assertions': 'off',
|
|
52
50
|
'jest/prefer-expect-resolves': 'warn',
|
|
53
51
|
'jest/prefer-hooks-on-top': 'error',
|
|
52
|
+
'jest/prefer-lowercase-title': ['error', {
|
|
53
|
+
allowedPrefixes: [],
|
|
54
|
+
ignore: [],
|
|
55
|
+
ignoreTopLevelDescribe: true,
|
|
56
|
+
}],
|
|
54
57
|
'jest/prefer-spy-on': 'warn',
|
|
55
58
|
'jest/prefer-strict-equal': 'warn',
|
|
56
59
|
'jest/prefer-to-be': 'warn',
|
|
57
|
-
'jest/prefer-to-be-null': 'warn',
|
|
58
|
-
'jest/prefer-to-be-undefined': 'warn',
|
|
59
60
|
'jest/prefer-to-contain': 'warn',
|
|
60
61
|
'jest/prefer-to-have-length': 'warn',
|
|
61
62
|
'jest/prefer-todo': 'warn',
|
|
62
|
-
'jest/require-hook': 'error',
|
|
63
|
-
|
|
63
|
+
'jest/require-hook': ['error', {
|
|
64
|
+
allowedFunctionCalls: [],
|
|
65
|
+
}],
|
|
64
66
|
'jest/require-to-throw-message': 'error',
|
|
65
|
-
'jest/
|
|
67
|
+
'jest/require-top-level-describe': 'error',
|
|
68
|
+
'jest/valid-describe-callback': 'error',
|
|
66
69
|
'jest/valid-expect-in-promise': 'error',
|
|
67
70
|
'jest/valid-expect': 'error',
|
|
68
71
|
'jest/valid-title': ['warn', {
|
package/rules/jsdoc/index.js
CHANGED
package/rules/rxjs/index.js
CHANGED
|
@@ -45,6 +45,7 @@ module.exports = {
|
|
|
45
45
|
'rxjs/no-subclass': 'error',
|
|
46
46
|
'rxjs/no-subject-unsubscribe': 'error',
|
|
47
47
|
'rxjs/no-subject-value': 'error',
|
|
48
|
+
'rxjs/no-subscribe-handlers': 'off',
|
|
48
49
|
'rxjs/no-tap': 'off',
|
|
49
50
|
'rxjs/no-topromise': 'error',
|
|
50
51
|
'rxjs/no-unbound-methods': 'error',
|
|
@@ -14,7 +14,7 @@ module.exports = {
|
|
|
14
14
|
'testing-library/no-await-sync-events': 'error',
|
|
15
15
|
'testing-library/no-await-sync-query': 'error',
|
|
16
16
|
'testing-library/no-container': 'error',
|
|
17
|
-
'testing-library/no-
|
|
17
|
+
'testing-library/no-debugging-utils': 'error',
|
|
18
18
|
'testing-library/no-dom-import': 'warn',
|
|
19
19
|
'testing-library/no-manual-cleanup': 'error',
|
|
20
20
|
'testing-library/no-node-access': 'error',
|
|
@@ -89,7 +89,10 @@ module.exports = {
|
|
|
89
89
|
'no-shadow': 'off',
|
|
90
90
|
'@typescript-eslint/no-shadow': 'off',
|
|
91
91
|
'no-throw-literal': 'off',
|
|
92
|
-
'@typescript-eslint/no-throw-literal': 'error',
|
|
92
|
+
'@typescript-eslint/no-throw-literal': ['error', {
|
|
93
|
+
allowThrowingAny: false,
|
|
94
|
+
allowThrowingUnknown: false,
|
|
95
|
+
}],
|
|
93
96
|
'no-unused-expressions': 'off',
|
|
94
97
|
'@typescript-eslint/no-unused-expressions': 'error',
|
|
95
98
|
'no-unused-vars': 'off',
|
|
@@ -10,7 +10,19 @@ module.exports = {
|
|
|
10
10
|
'@typescript-eslint/await-thenable': 'error',
|
|
11
11
|
'@typescript-eslint/ban-ts-comment': 'error',
|
|
12
12
|
'@typescript-eslint/ban-tslint-comment': 'warn',
|
|
13
|
-
'@typescript-eslint/ban-types': 'error',
|
|
13
|
+
'@typescript-eslint/ban-types': ['error', {
|
|
14
|
+
types: {
|
|
15
|
+
object: {
|
|
16
|
+
message: [
|
|
17
|
+
'The `object` type is currently hard to use',
|
|
18
|
+
'([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).',
|
|
19
|
+
'Consider using `Record<string, unknown>` instead,',
|
|
20
|
+
'as it allows you to more easily inspect and use the keys.',
|
|
21
|
+
].join('\n'),
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
extendDefaults: true,
|
|
25
|
+
}],
|
|
14
26
|
'@typescript-eslint/class-literal-property-style': 'off',
|
|
15
27
|
'@typescript-eslint/consistent-indexed-object-style': ['warn', 'record'],
|
|
16
28
|
'@typescript-eslint/consistent-type-assertions': ['error', {
|
|
@@ -18,6 +30,9 @@ module.exports = {
|
|
|
18
30
|
objectLiteralTypeAssertions: 'allow',
|
|
19
31
|
}],
|
|
20
32
|
'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
|
|
33
|
+
'@typescript-eslint/consistent-type-exports': ['off', {
|
|
34
|
+
fixMixedExportsWithInlineTypeSpecifier: true,
|
|
35
|
+
}],
|
|
21
36
|
'@typescript-eslint/consistent-type-imports': ['warn', {
|
|
22
37
|
prefer: 'no-type-imports',
|
|
23
38
|
disallowTypeAnnotations: true,
|
|
@@ -56,17 +71,41 @@ module.exports = {
|
|
|
56
71
|
'field',
|
|
57
72
|
'constructor',
|
|
58
73
|
'public-static-method',
|
|
74
|
+
'public-static-set',
|
|
75
|
+
'public-static-get',
|
|
59
76
|
'public-abstract-method',
|
|
77
|
+
'public-abstract-set',
|
|
78
|
+
'public-abstract-get',
|
|
60
79
|
'public-decorated-method',
|
|
80
|
+
'public-decorated-set',
|
|
81
|
+
'public-decorated-get',
|
|
61
82
|
'public-instance-method',
|
|
83
|
+
'public-instance-set',
|
|
84
|
+
'public-instance-get',
|
|
62
85
|
'protected-static-method',
|
|
86
|
+
'protected-static-set',
|
|
87
|
+
'protected-static-get',
|
|
63
88
|
'protected-abstract-method',
|
|
89
|
+
'protected-abstract-set',
|
|
90
|
+
'protected-abstract-get',
|
|
64
91
|
'protected-decorated-method',
|
|
92
|
+
'protected-decorated-set',
|
|
93
|
+
'protected-decorated-get',
|
|
65
94
|
'protected-instance-method',
|
|
95
|
+
'protected-instance-set',
|
|
96
|
+
'protected-instance-get',
|
|
66
97
|
'private-static-method',
|
|
98
|
+
'private-static-set',
|
|
99
|
+
'private-static-get',
|
|
67
100
|
'private-abstract-method',
|
|
101
|
+
'private-abstract-set',
|
|
102
|
+
'private-abstract-get',
|
|
68
103
|
'private-decorated-method',
|
|
104
|
+
'private-decorated-set',
|
|
105
|
+
'private-decorated-get',
|
|
69
106
|
'private-instance-method',
|
|
107
|
+
'private-instance-set',
|
|
108
|
+
'private-instance-get',
|
|
70
109
|
'method',
|
|
71
110
|
],
|
|
72
111
|
}],
|
|
@@ -129,9 +168,6 @@ module.exports = {
|
|
|
129
168
|
'@typescript-eslint/no-unsafe-call': 'error',
|
|
130
169
|
'@typescript-eslint/no-unsafe-member-access': 'error',
|
|
131
170
|
'@typescript-eslint/no-unsafe-return': 'error',
|
|
132
|
-
'@typescript-eslint/no-unused-vars-experimental': ['off', {
|
|
133
|
-
ignoreArgsIfArgsAfterAreUsed: true,
|
|
134
|
-
}],
|
|
135
171
|
'@typescript-eslint/no-var-requires': 'error',
|
|
136
172
|
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
|
|
137
173
|
'@typescript-eslint/prefer-as-const': 'warn',
|
|
@@ -160,6 +196,7 @@ module.exports = {
|
|
|
160
196
|
}],
|
|
161
197
|
'@typescript-eslint/restrict-plus-operands': ['error', {
|
|
162
198
|
checkCompoundAssignments: true,
|
|
199
|
+
allowAny: false,
|
|
163
200
|
}],
|
|
164
201
|
'@typescript-eslint/restrict-template-expressions': ['error', {
|
|
165
202
|
allowAny: false,
|
package/rules/unicorn/index.js
CHANGED
|
@@ -50,14 +50,16 @@ module.exports = {
|
|
|
50
50
|
'unicorn/no-new-buffer': 'warn',
|
|
51
51
|
'unicorn/no-null': 'off',
|
|
52
52
|
'unicorn/no-object-as-default-parameter': 'error',
|
|
53
|
-
'unicorn/no-static-only-class': 'error',
|
|
54
53
|
'unicorn/no-process-exit': 'error',
|
|
54
|
+
'unicorn/no-static-only-class': 'error',
|
|
55
|
+
'unicorn/no-thenable': 'error',
|
|
55
56
|
'unicorn/no-this-assignment': 'error',
|
|
56
57
|
'unicorn/no-unreadable-array-destructuring': 'error',
|
|
57
58
|
'unicorn/no-unsafe-regex': 'error',
|
|
58
59
|
'unicorn/no-unused-properties': 'off',
|
|
59
60
|
'unicorn/no-useless-fallback-in-spread': 'warn',
|
|
60
61
|
'unicorn/no-useless-length-check': 'warn',
|
|
62
|
+
'unicorn/no-useless-promise-resolve-reject': 'warn',
|
|
61
63
|
'unicorn/no-useless-spread': 'warn',
|
|
62
64
|
'unicorn/no-useless-undefined': 'off',
|
|
63
65
|
'unicorn/no-zero-fractions': 'off',
|
|
@@ -96,6 +98,7 @@ module.exports = {
|
|
|
96
98
|
'unicorn/prefer-dom-node-text-content': 'warn',
|
|
97
99
|
'unicorn/prefer-export-from': 'warn',
|
|
98
100
|
'unicorn/prefer-includes': 'warn',
|
|
101
|
+
'unicorn/prefer-json-parse-buffer': 'warn',
|
|
99
102
|
'unicorn/prefer-keyboard-event-key': 'warn',
|
|
100
103
|
'unicorn/prefer-math-trunc': 'warn',
|
|
101
104
|
'unicorn/prefer-modern-dom-apis': 'warn',
|
|
@@ -130,6 +133,7 @@ module.exports = {
|
|
|
130
133
|
'unicorn/prefer-top-level-await': 'off',
|
|
131
134
|
'unicorn/prefer-type-error': 'warn',
|
|
132
135
|
'unicorn/prevent-abbreviations': ['warn', (0, prevent_abbreviations_1.unicornPreventAbbreviations)()],
|
|
136
|
+
'unicorn/relative-url-style': ['warn', 'always'],
|
|
133
137
|
'unicorn/require-array-join-separator': 'warn',
|
|
134
138
|
'unicorn/require-number-to-fixed-digits-argument': 'warn',
|
|
135
139
|
'unicorn/require-post-message-target-origin': 'error',
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = {
|
|
3
|
-
rules: {
|
|
4
|
-
'accessor-pairs': 'error',
|
|
5
|
-
'array-callback-return': ['error', {
|
|
6
|
-
allowImplicit: true,
|
|
7
|
-
}],
|
|
8
|
-
'block-scoped-var': 'error',
|
|
9
|
-
'class-methods-use-this': 'off',
|
|
10
|
-
'complexity': ['error', 3],
|
|
11
|
-
'consistent-return': 'error',
|
|
12
|
-
'curly': ['warn', 'all'],
|
|
13
|
-
'default-case': 'error',
|
|
14
|
-
'default-case-last': 'error',
|
|
15
|
-
'default-param-last': 'error',
|
|
16
|
-
'dot-location': ['warn', 'property'],
|
|
17
|
-
'dot-notation': ['warn', {
|
|
18
|
-
allowKeywords: true,
|
|
19
|
-
}],
|
|
20
|
-
'eqeqeq': ['warn', 'always'],
|
|
21
|
-
'grouped-accessor-pairs': ['error', 'setBeforeGet'],
|
|
22
|
-
'guard-for-in': 'error',
|
|
23
|
-
'max-classes-per-file': ['error', 1],
|
|
24
|
-
'no-alert': 'error',
|
|
25
|
-
'no-caller': 'error',
|
|
26
|
-
'no-case-declarations': 'error',
|
|
27
|
-
'no-constructor-return': 'error',
|
|
28
|
-
'no-div-regex': 'warn',
|
|
29
|
-
'no-else-return': ['warn', {
|
|
30
|
-
allowElseIf: false,
|
|
31
|
-
}],
|
|
32
|
-
'no-empty-function': 'error',
|
|
33
|
-
'no-empty-pattern': 'error',
|
|
34
|
-
'no-eq-null': 'error',
|
|
35
|
-
'no-eval': 'error',
|
|
36
|
-
'no-extend-native': 'error',
|
|
37
|
-
'no-extra-bind': 'warn',
|
|
38
|
-
'no-extra-label': 'warn',
|
|
39
|
-
'no-fallthrough': 'error',
|
|
40
|
-
'no-floating-decimal': 'warn',
|
|
41
|
-
'no-global-assign': 'error',
|
|
42
|
-
'no-implicit-coercion': 'warn',
|
|
43
|
-
'no-implicit-globals': 'error',
|
|
44
|
-
'no-implied-eval': 'error',
|
|
45
|
-
'no-invalid-this': 'error',
|
|
46
|
-
'no-iterator': 'error',
|
|
47
|
-
'no-labels': 'error',
|
|
48
|
-
'no-lone-blocks': 'error',
|
|
49
|
-
'no-loop-func': 'error',
|
|
50
|
-
'no-magic-numbers': 'off',
|
|
51
|
-
'no-multi-spaces': 'warn',
|
|
52
|
-
'no-multi-str': 'error',
|
|
53
|
-
'no-new': 'error',
|
|
54
|
-
'no-new-func': 'error',
|
|
55
|
-
'no-new-wrappers': 'error',
|
|
56
|
-
'no-nonoctal-decimal-escape': 'error',
|
|
57
|
-
'no-octal': 'error',
|
|
58
|
-
'no-octal-escape': 'error',
|
|
59
|
-
'no-param-reassign': 'error',
|
|
60
|
-
'no-proto': 'error',
|
|
61
|
-
'no-redeclare': 'error',
|
|
62
|
-
'no-restricted-properties': 'error',
|
|
63
|
-
'no-return-assign': 'error',
|
|
64
|
-
'no-return-await': 'error',
|
|
65
|
-
'no-script-url': 'error',
|
|
66
|
-
'no-self-assign': 'error',
|
|
67
|
-
'no-self-compare': 'error',
|
|
68
|
-
'no-sequences': ['error', {
|
|
69
|
-
allowInParentheses: false,
|
|
70
|
-
}],
|
|
71
|
-
'no-throw-literal': 'error',
|
|
72
|
-
'no-unmodified-loop-condition': 'error',
|
|
73
|
-
'no-unused-expressions': 'error',
|
|
74
|
-
'no-unused-labels': 'warn',
|
|
75
|
-
'no-useless-call': 'error',
|
|
76
|
-
'no-useless-catch': 'error',
|
|
77
|
-
'no-useless-concat': 'error',
|
|
78
|
-
'no-useless-escape': 'error',
|
|
79
|
-
'no-useless-return': 'warn',
|
|
80
|
-
'no-void': 'error',
|
|
81
|
-
'no-warning-comments': 'off',
|
|
82
|
-
'no-with': 'error',
|
|
83
|
-
'prefer-named-capture-group': 'off',
|
|
84
|
-
'prefer-promise-reject-errors': 'error',
|
|
85
|
-
'prefer-regex-literals': 'off',
|
|
86
|
-
'radix': 'error',
|
|
87
|
-
'require-await': 'error',
|
|
88
|
-
'require-unicode-regexp': 'error',
|
|
89
|
-
'vars-on-top': 'error',
|
|
90
|
-
'wrap-iife': ['warn', 'outside'],
|
|
91
|
-
'yoda': ['warn', 'never'],
|
|
92
|
-
},
|
|
93
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = {
|
|
3
|
-
rules: {
|
|
4
|
-
'arrow-body-style': ['error', 'as-needed'],
|
|
5
|
-
'arrow-parens': ['warn', 'as-needed'],
|
|
6
|
-
'arrow-spacing': ['warn', {
|
|
7
|
-
before: true,
|
|
8
|
-
after: true,
|
|
9
|
-
}],
|
|
10
|
-
'constructor-super': 'error',
|
|
11
|
-
'generator-star-spacing': ['warn', {
|
|
12
|
-
before: true,
|
|
13
|
-
after: false,
|
|
14
|
-
}],
|
|
15
|
-
'no-class-assign': 'error',
|
|
16
|
-
'no-confusing-arrow': ['warn', {
|
|
17
|
-
allowParens: true,
|
|
18
|
-
}],
|
|
19
|
-
'no-const-assign': 'error',
|
|
20
|
-
'no-dupe-class-members': 'error',
|
|
21
|
-
'no-duplicate-imports': ['error', {
|
|
22
|
-
includeExports: true,
|
|
23
|
-
}],
|
|
24
|
-
'no-new-symbol': 'error',
|
|
25
|
-
'no-restricted-exports': 'off',
|
|
26
|
-
'no-restricted-imports': 'error',
|
|
27
|
-
'no-this-before-super': 'error',
|
|
28
|
-
'no-useless-computed-key': 'warn',
|
|
29
|
-
'no-useless-constructor': 'error',
|
|
30
|
-
'no-useless-rename': 'warn',
|
|
31
|
-
'no-var': 'warn',
|
|
32
|
-
'object-shorthand': ['warn', 'always'],
|
|
33
|
-
'prefer-arrow-callback': 'warn',
|
|
34
|
-
'prefer-const': 'warn',
|
|
35
|
-
'prefer-destructuring': ['warn', {
|
|
36
|
-
object: false,
|
|
37
|
-
array: false,
|
|
38
|
-
}],
|
|
39
|
-
'prefer-numeric-literals': 'warn',
|
|
40
|
-
'prefer-rest-params': 'error',
|
|
41
|
-
'prefer-spread': 'error',
|
|
42
|
-
'prefer-template': 'warn',
|
|
43
|
-
'require-yield': 'error',
|
|
44
|
-
'rest-spread-spacing': ['warn', 'never'],
|
|
45
|
-
'sort-imports': 'off',
|
|
46
|
-
'symbol-description': 'error',
|
|
47
|
-
'template-curly-spacing': ['warn', 'never'],
|
|
48
|
-
'yield-star-spacing': ['warn', {
|
|
49
|
-
before: true,
|
|
50
|
-
after: false,
|
|
51
|
-
}],
|
|
52
|
-
},
|
|
53
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = {
|
|
3
|
-
rules: {
|
|
4
|
-
'init-declarations': ['error', 'always'],
|
|
5
|
-
'no-delete-var': 'error',
|
|
6
|
-
'no-label-var': 'error',
|
|
7
|
-
'no-restricted-globals': 'error',
|
|
8
|
-
'no-shadow': 'off',
|
|
9
|
-
'no-shadow-restricted-names': 'error',
|
|
10
|
-
'no-undef': 'off',
|
|
11
|
-
'no-undef-init': 'warn',
|
|
12
|
-
'no-undefined': 'off',
|
|
13
|
-
'no-unused-vars': ['error', {
|
|
14
|
-
args: 'after-used',
|
|
15
|
-
argsIgnorePattern: '^_',
|
|
16
|
-
}],
|
|
17
|
-
'no-use-before-define': ['error', {
|
|
18
|
-
functions: false,
|
|
19
|
-
classes: false,
|
|
20
|
-
}],
|
|
21
|
-
},
|
|
22
|
-
};
|