eslint-config-seekingalpha-base 9.1.0 → 11.0.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/CHANGELOG.md +10 -0
- package/README.md +19 -16
- package/index.js +21 -24
- package/package.json +5 -5
- package/rules/config.js +1 -1
- package/rules/eslint/index.js +10 -6
- package/rules/eslint/layout-and-formatting.js +7 -20
- package/rules/eslint/possible-problems.js +173 -173
- package/rules/eslint/suggestions.js +681 -688
- package/rules/eslint-plugin-array-func/index.js +5 -4
- package/rules/eslint-plugin-import/helpful-warnings.js +25 -27
- package/rules/eslint-plugin-import/index.js +15 -10
- package/rules/eslint-plugin-import/module-systems.js +11 -13
- package/rules/eslint-plugin-import/static-analysis.js +52 -54
- package/rules/eslint-plugin-import/style-guide.js +82 -84
- package/rules/eslint-plugin-promise/index.js +8 -4
- package/rules/eslint-plugin-unicorn/index.js +5 -4
- package/flat.js +0 -24
- package/rules/eslint/flat.js +0 -11
- package/rules/eslint-plugin-array-func/flat.js +0 -10
- package/rules/eslint-plugin-import/flat.js +0 -21
- package/rules/eslint-plugin-promise/flat.js +0 -10
- package/rules/eslint-plugin-unicorn/flat.js +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 11.0.0 - 2025-03-09
|
|
4
|
+
|
|
5
|
+
- [deps] update `eslint` to version `9.22.0`
|
|
6
|
+
- [breaking] enable `unicorn/prefer-math-min-max` rule
|
|
7
|
+
- [breaking] enable `no-useless-assignment` rule
|
|
8
|
+
|
|
9
|
+
## 10.0.0 - 2025-03-09
|
|
10
|
+
|
|
11
|
+
- [breaking] migrate to ESM and make flat config default
|
|
12
|
+
|
|
3
13
|
## 9.1.0 - 2025-03-06
|
|
4
14
|
|
|
5
15
|
- [deps] update `eslint-plugin-array-func` to version `5.0.2`
|
package/README.md
CHANGED
|
@@ -6,36 +6,39 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/
|
|
|
6
6
|
|
|
7
7
|
Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/):
|
|
8
8
|
|
|
9
|
-
npm install eslint@
|
|
9
|
+
npm install eslint@9.22.0 eslint-plugin-array-func@5.0.2 eslint-plugin-import@2.31.0 eslint-plugin-promise@7.2.1 eslint-plugin-unicorn@56.0.1 --save-dev
|
|
10
10
|
|
|
11
11
|
Install SeekingAlpha shareable ESLint:
|
|
12
12
|
|
|
13
|
-
npm install eslint-config-seekingalpha-base --save-dev
|
|
13
|
+
npm install eslint-config-seekingalpha-base@latest --save-dev
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
|
-
This shareable config includes all ESLint rules
|
|
17
|
+
This shareable config includes all ESLint rules. We also extend our configuration with following plugins:
|
|
18
18
|
|
|
19
19
|
- [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import)
|
|
20
20
|
- [eslint-plugin-array-func](https://github.com/freaktechnik/eslint-plugin-array-func)
|
|
21
21
|
- [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise)
|
|
22
22
|
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `seekingalpha-base` - exports all avaliable ESLint [rules](https://eslint.org/docs/rules/) and all rules of plugins above.
|
|
27
|
-
- `seekingalpha-base/browser` - exports only browser related rules for ESLint and mentioned plugins. It also sets `browser` as [default environment](https://eslint.org/docs/user-guide/configuring#specifying-environments).
|
|
28
|
-
- `seekingalpha-base/node` - exports only Node.js related rules for ESLint and mentioned plugins. It also sets `node` as [default environment](https://eslint.org/docs/user-guide/configuring#specifying-environments).
|
|
29
|
-
|
|
30
|
-
Simply [extend](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) the .eslintrc.js in your project with relevant configuration:
|
|
24
|
+
Simply [use](https://eslint.org/docs/latest/extend/shareable-configs) the eslint.config.js in your project with the configuration:
|
|
31
25
|
|
|
32
26
|
```javascript
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
import baseConfig from 'eslint-config-seekingalpha-base';
|
|
28
|
+
|
|
29
|
+
export default [
|
|
30
|
+
{
|
|
31
|
+
plugins: {
|
|
32
|
+
...baseConfig.plugins,
|
|
33
|
+
},
|
|
34
|
+
rules: {
|
|
35
|
+
...baseConfig.rules,
|
|
36
|
+
},
|
|
37
|
+
settings: {
|
|
38
|
+
...baseConfig.settings,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
];
|
|
39
42
|
```
|
|
40
43
|
|
|
41
44
|
## License
|
package/index.js
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import esLintConfig from './rules/eslint/index.js';
|
|
2
|
+
import esLintPluginArrayFuncConfig from './rules/eslint-plugin-array-func/index.js';
|
|
3
|
+
import esLintPluginImport from './rules/eslint-plugin-import/index.js';
|
|
4
|
+
import esLintPluginPromise from './rules/eslint-plugin-promise/index.js';
|
|
5
|
+
import esLintPluginUnicorn from './rules/eslint-plugin-unicorn/index.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
ecmaFeatures: {
|
|
23
|
-
impliedStrict: true,
|
|
24
|
-
globalReturn: false,
|
|
25
|
-
},
|
|
7
|
+
export default {
|
|
8
|
+
plugins: {
|
|
9
|
+
...esLintPluginArrayFuncConfig.plugins,
|
|
10
|
+
...esLintPluginImport.plugins,
|
|
11
|
+
...esLintPluginPromise.plugins,
|
|
12
|
+
...esLintPluginUnicorn.plugins,
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
...esLintConfig.rules,
|
|
16
|
+
...esLintPluginArrayFuncConfig.rules,
|
|
17
|
+
...esLintPluginImport.rules,
|
|
18
|
+
...esLintPluginPromise.rules,
|
|
19
|
+
...esLintPluginUnicorn.rules,
|
|
20
|
+
},
|
|
21
|
+
settings: {
|
|
22
|
+
...esLintPluginImport.settings,
|
|
26
23
|
},
|
|
27
24
|
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-seekingalpha-base",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "SeekingAlpha's sharable base ESLint config",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"eslint-find-rules": "eslint-find-rules -u ./index.js",
|
|
8
|
-
"lint": "eslint --ext .js .",
|
|
8
|
+
"eslint-find-rules": "eslint-find-rules --flatConfig -u ./index.js",
|
|
9
9
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"node": ">= 22"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"eslint": "
|
|
51
|
+
"eslint": "9.22.0",
|
|
52
52
|
"eslint-plugin-array-func": "5.0.2",
|
|
53
53
|
"eslint-plugin-import": "2.31.0",
|
|
54
54
|
"eslint-plugin-promise": "7.2.1",
|
|
55
55
|
"eslint-plugin-unicorn": "56.0.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"eslint": "
|
|
58
|
+
"eslint": "9.22.0",
|
|
59
59
|
"eslint-find-rules": "5.0.0",
|
|
60
60
|
"eslint-plugin-array-func": "5.0.2",
|
|
61
61
|
"eslint-plugin-import": "2.31.0",
|
package/rules/config.js
CHANGED
package/rules/eslint/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import layout from './layout-and-formatting.js';
|
|
2
|
+
import problems from './possible-problems.js';
|
|
3
|
+
import suggestions from './suggestions.js';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
rules: {
|
|
7
|
+
...layout,
|
|
8
|
+
...problems,
|
|
9
|
+
...suggestions,
|
|
10
|
+
},
|
|
7
11
|
};
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
position: 'above',
|
|
10
|
-
ignorePattern: '',
|
|
11
|
-
applyDefaultPatterns: true,
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
|
|
15
|
-
/*
|
|
16
|
-
* https://eslint.org/docs/rules/unicode-bom
|
|
17
|
-
* disabled to work with prettier
|
|
18
|
-
*/
|
|
19
|
-
'unicode-bom': 'off',
|
|
20
|
-
},
|
|
1
|
+
// https://eslint.org/docs/rules/#layout-formatting
|
|
2
|
+
export default {
|
|
3
|
+
/*
|
|
4
|
+
* https://eslint.org/docs/rules/unicode-bom
|
|
5
|
+
* disabled to work with prettier
|
|
6
|
+
*/
|
|
7
|
+
'unicode-bom': 'off',
|
|
21
8
|
};
|
|
@@ -1,223 +1,223 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// https://eslint.org/docs/rules/#possible-problems
|
|
2
|
+
export default {
|
|
3
|
+
// https://eslint.org/docs/rules/array-callback-return
|
|
4
|
+
'array-callback-return': 'error',
|
|
3
5
|
|
|
4
|
-
rules
|
|
5
|
-
|
|
6
|
-
'array-callback-return': 'error',
|
|
6
|
+
// https://eslint.org/docs/rules/constructor-super
|
|
7
|
+
'constructor-super': 'error',
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
// https://eslint.org/docs/rules/for-direction
|
|
10
|
+
'for-direction': 'error',
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
// https://eslint.org/docs/rules/getter-return
|
|
13
|
+
'getter-return': [
|
|
14
|
+
'error',
|
|
15
|
+
{
|
|
16
|
+
allowImplicit: false,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'error',
|
|
17
|
-
{
|
|
18
|
-
allowImplicit: false,
|
|
19
|
-
},
|
|
20
|
-
],
|
|
20
|
+
// https://eslint.org/docs/rules/no-async-promise-executor
|
|
21
|
+
'no-async-promise-executor': 'error',
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
// https://eslint.org/docs/rules/no-await-in-loop
|
|
24
|
+
'no-await-in-loop': 'error',
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
// https://eslint.org/docs/rules/no-class-assign
|
|
27
|
+
'no-class-assign': 'error',
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
// https://eslint.org/docs/rules/no-compare-neg-zero
|
|
30
|
+
'no-compare-neg-zero': 'error',
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
// https://eslint.org/docs/rules/no-cond-assign
|
|
33
|
+
'no-cond-assign': 'error',
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
// https://eslint.org/docs/rules/no-const-assign
|
|
36
|
+
'no-const-assign': 'error',
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
// https://eslint.org/docs/rules/no-constant-binary-expression
|
|
39
|
+
'no-constant-binary-expression': 'error',
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
// https://eslint.org/docs/rules/no-constant-condition
|
|
42
|
+
'no-constant-condition': 'error',
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
// https://eslint.org/docs/rules/no-constructor-return
|
|
45
|
+
'no-constructor-return': 'error',
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
// https://eslint.org/docs/rules/no-control-regex
|
|
48
|
+
'no-control-regex': 'error',
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
// https://eslint.org/docs/rules/no-debugger
|
|
51
|
+
'no-debugger': 'error',
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
// https://eslint.org/docs/rules/no-dupe-args
|
|
54
|
+
'no-dupe-args': 'error',
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
// https://eslint.org/docs/rules/no-dupe-class-members
|
|
57
|
+
'no-dupe-class-members': 'error',
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
// https://eslint.org/docs/rules/no-dupe-else-if
|
|
60
|
+
'no-dupe-else-if': 'error',
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
// https://eslint.org/docs/rules/no-dupe-keys
|
|
63
|
+
'no-dupe-keys': 'error',
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
// https://eslint.org/docs/rules/no-duplicate-case
|
|
66
|
+
'no-duplicate-case': 'error',
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
// https://eslint.org/docs/rules/no-duplicate-imports
|
|
69
|
+
'no-duplicate-imports': 'off',
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
// https://eslint.org/docs/rules/no-empty-character-class
|
|
72
|
+
'no-empty-character-class': 'error',
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
// https://eslint.org/docs/rules/no-empty-pattern
|
|
75
|
+
'no-empty-pattern': 'error',
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
/*
|
|
78
|
+
* https://eslint.org/docs/rules/no-ex-assign
|
|
79
|
+
* https://bocoup.com/blog/the-catch-with-try-catch
|
|
80
|
+
*/
|
|
81
|
+
'no-ex-assign': 'error',
|
|
78
82
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
* https://bocoup.com/blog/the-catch-with-try-catch
|
|
82
|
-
*/
|
|
83
|
-
'no-ex-assign': 'error',
|
|
83
|
+
// https://eslint.org/docs/rules/no-fallthrough
|
|
84
|
+
'no-fallthrough': 'error',
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
// https://eslint.org/docs/rules/no-func-assign
|
|
87
|
+
'no-func-assign': 'error',
|
|
87
88
|
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
// https://eslint.org/docs/rules/no-import-assign
|
|
90
|
+
'no-import-assign': 'error',
|
|
90
91
|
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
// https://eslint.org/docs/rules/no-inner-declarations
|
|
93
|
+
'no-inner-declarations': 'error',
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
// https://eslint.org/docs/rules/no-invalid-regexp
|
|
96
|
+
'no-invalid-regexp': 'error',
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
// https://eslint.org/docs/rules/no-irregular-whitespace
|
|
99
|
+
'no-irregular-whitespace': 'error',
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
// https://eslint.org/docs/rules/no-loss-of-precision
|
|
102
|
+
'no-loss-of-precision': 'error',
|
|
102
103
|
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
// https://eslint.org/docs/rules/no-misleading-character-class
|
|
105
|
+
'no-misleading-character-class': 'error',
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
// https://eslint.org/docs/latest/rules/no-new-native-nonconstructor
|
|
108
|
+
'no-new-native-nonconstructor': 'error',
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
// https://eslint.org/docs/rules/no-new-symbol
|
|
111
|
+
'no-new-symbol': 'error',
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
// https://eslint.org/docs/rules/no-obj-calls
|
|
114
|
+
'no-obj-calls': 'error',
|
|
114
115
|
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
// https://eslint.org/docs/rules/no-promise-executor-return
|
|
117
|
+
'no-promise-executor-return': 'error',
|
|
117
118
|
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
// https://eslint.org/docs/rules/no-prototype-builtins
|
|
120
|
+
'no-prototype-builtins': 'error',
|
|
120
121
|
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
// https://eslint.org/docs/rules/no-self-assign
|
|
123
|
+
'no-self-assign': [
|
|
124
|
+
'error',
|
|
125
|
+
{
|
|
126
|
+
props: false,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
123
129
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
'error',
|
|
127
|
-
{
|
|
128
|
-
props: false,
|
|
129
|
-
},
|
|
130
|
-
],
|
|
130
|
+
// https://eslint.org/docs/rules/no-self-compare
|
|
131
|
+
'no-self-compare': 'error',
|
|
131
132
|
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
// https://eslint.org/docs/rules/no-setter-return
|
|
134
|
+
'no-setter-return': 'error',
|
|
134
135
|
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
/*
|
|
137
|
+
* https://eslint.org/docs/rules/no-sparse-arrays
|
|
138
|
+
* https://humanwhocodes.com/blog/2007/09/09/inconsistent-array-literals/
|
|
139
|
+
*/
|
|
140
|
+
'no-sparse-arrays': 'error',
|
|
137
141
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
* https://humanwhocodes.com/blog/2007/09/09/inconsistent-array-literals/
|
|
141
|
-
*/
|
|
142
|
-
'no-sparse-arrays': 'error',
|
|
142
|
+
// https://eslint.org/docs/rules/no-template-curly-in-string
|
|
143
|
+
'no-template-curly-in-string': 'error',
|
|
143
144
|
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
// https://eslint.org/docs/rules/no-this-before-super
|
|
146
|
+
'no-this-before-super': 'error',
|
|
146
147
|
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
// https://eslint.org/docs/rules/no-undef
|
|
149
|
+
'no-undef': 'error',
|
|
149
150
|
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
// https://eslint.org/docs/rules/no-unexpected-multiline
|
|
152
|
+
'no-unexpected-multiline': 'error',
|
|
152
153
|
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
// https://eslint.org/docs/rules/no-unmodified-loop-condition
|
|
155
|
+
'no-unmodified-loop-condition': 'error',
|
|
155
156
|
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
// https://eslint.org/docs/rules/no-unreachable
|
|
158
|
+
'no-unreachable': 'error',
|
|
158
159
|
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
// https://eslint.org/docs/rules/no-unreachable-loop
|
|
161
|
+
'no-unreachable-loop': 'error',
|
|
161
162
|
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
// https://eslint.org/docs/rules/no-unsafe-finally
|
|
164
|
+
'no-unsafe-finally': 'error',
|
|
164
165
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
'
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
},
|
|
166
|
+
// https://eslint.org/docs/rules/no-unsafe-negation
|
|
167
|
+
'no-unsafe-negation': 'error',
|
|
168
|
+
|
|
169
|
+
// https://eslint.org/docs/rules/no-unsafe-optional-chaining
|
|
170
|
+
'no-unsafe-optional-chaining': [
|
|
171
|
+
'error',
|
|
172
|
+
{
|
|
173
|
+
disallowArithmeticOperators: true,
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
|
|
177
|
+
// https://eslint.org/docs/rules/no-unused-private-class-members
|
|
178
|
+
'no-unused-private-class-members': 'error',
|
|
179
|
+
|
|
180
|
+
// https://eslint.org/docs/rules/no-unused-vars
|
|
181
|
+
'no-unused-vars': [
|
|
182
|
+
'error',
|
|
183
|
+
{
|
|
184
|
+
args: 'after-used',
|
|
185
|
+
argsIgnorePattern: '[iI]gnored',
|
|
186
|
+
caughtErrors: 'all',
|
|
187
|
+
caughtErrorsIgnorePattern: '[iI]gnored',
|
|
188
|
+
ignoreRestSiblings: false,
|
|
189
|
+
vars: 'all',
|
|
190
|
+
varsIgnorePattern: '[iI]gnored',
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
|
|
194
|
+
// https://eslint.org/docs/rules/no-use-before-define
|
|
195
|
+
'no-use-before-define': [
|
|
196
|
+
'error',
|
|
197
|
+
{
|
|
198
|
+
functions: true,
|
|
199
|
+
classes: true,
|
|
200
|
+
variables: true,
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
|
|
204
|
+
// https://eslint.org/docs/latest/rules/no-useless-assignment
|
|
205
|
+
'no-useless-assignment': 'error',
|
|
206
|
+
|
|
207
|
+
// https://eslint.org/docs/rules/no-useless-backreference
|
|
208
|
+
'no-useless-backreference': 'error',
|
|
209
|
+
|
|
210
|
+
// https://eslint.org/docs/rules/require-atomic-updates
|
|
211
|
+
'require-atomic-updates': 'error',
|
|
212
|
+
|
|
213
|
+
// https://eslint.org/docs/rules/use-isnan
|
|
214
|
+
'use-isnan': 'error',
|
|
215
|
+
|
|
216
|
+
// https://eslint.org/docs/rules/valid-typeof
|
|
217
|
+
'valid-typeof': [
|
|
218
|
+
'error',
|
|
219
|
+
{
|
|
220
|
+
requireStringLiterals: true,
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
223
|
};
|