eslint-config-seekingalpha-base 10.0.0 → 11.1.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 +15 -0
- package/README.md +1 -1
- package/package.json +6 -6
- package/rules/eslint/layout-and-formatting.js +0 -10
- package/rules/eslint/possible-problems.js +3 -0
- package/rules/eslint/suggestions.js +4 -5
- package/rules/eslint-plugin-promise/index.js +3 -0
- package/rules/eslint-plugin-unicorn/index.js +15 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 11.1.0 - 2025-03-09
|
|
4
|
+
|
|
5
|
+
- [deps] update `eslint-plugin-unicorn` to version `57.0.0`
|
|
6
|
+
- [breaking] enable `unicorn/consistent-assert` rule
|
|
7
|
+
- [breaking] enable `unicorn/consistent-date-clone` rule
|
|
8
|
+
- [breaking] enable `unicorn/no-accessor-recursion` rule
|
|
9
|
+
- [breaking] enable `unicorn/no-instanceof-builtins` rule
|
|
10
|
+
- [breaking] enable `unicorn/no-named-default` rule
|
|
11
|
+
|
|
12
|
+
## 11.0.0 - 2025-03-09
|
|
13
|
+
|
|
14
|
+
- [deps] update `eslint` to version `9.22.0`
|
|
15
|
+
- [breaking] enable `unicorn/prefer-math-min-max` rule
|
|
16
|
+
- [breaking] enable `no-useless-assignment` rule
|
|
17
|
+
|
|
3
18
|
## 10.0.0 - 2025-03-09
|
|
4
19
|
|
|
5
20
|
- [breaking] migrate to ESM and make flat config default
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ 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@57.0.0 --save-dev
|
|
10
10
|
|
|
11
11
|
Install SeekingAlpha shareable ESLint:
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-seekingalpha-base",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "SeekingAlpha's sharable base ESLint config",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"eslint-find-rules": "eslint-find-rules -u ./index.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,18 +48,18 @@
|
|
|
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
|
-
"eslint-plugin-unicorn": "
|
|
55
|
+
"eslint-plugin-unicorn": "57.0.0"
|
|
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",
|
|
62
62
|
"eslint-plugin-promise": "7.2.1",
|
|
63
|
-
"eslint-plugin-unicorn": "
|
|
63
|
+
"eslint-plugin-unicorn": "57.0.0"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
// https://eslint.org/docs/rules/#layout-formatting
|
|
2
2
|
export default {
|
|
3
|
-
// https://eslint.org/docs/rules/line-comment-position
|
|
4
|
-
'line-comment-position': [
|
|
5
|
-
'error',
|
|
6
|
-
{
|
|
7
|
-
position: 'above',
|
|
8
|
-
ignorePattern: '',
|
|
9
|
-
applyDefaultPatterns: true,
|
|
10
|
-
},
|
|
11
|
-
],
|
|
12
|
-
|
|
13
3
|
/*
|
|
14
4
|
* https://eslint.org/docs/rules/unicode-bom
|
|
15
5
|
* disabled to work with prettier
|
|
@@ -182,15 +182,14 @@ export default {
|
|
|
182
182
|
// https://eslint.org/docs/rules/max-statements
|
|
183
183
|
'max-statements': ['error', config.maxStatements],
|
|
184
184
|
|
|
185
|
-
// https://eslint.org/docs/rules/multiline-comment-style
|
|
186
|
-
'multiline-comment-style': ['error', 'starred-block'],
|
|
187
|
-
|
|
188
185
|
// https://eslint.org/docs/rules/new-cap
|
|
189
186
|
'new-cap': [
|
|
190
187
|
'error',
|
|
191
188
|
{
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
// eslint-disable-next-line unicorn/no-keyword-prefix
|
|
190
|
+
newIsCap: true,
|
|
191
|
+
// eslint-disable-next-line unicorn/no-keyword-prefix
|
|
192
|
+
newIsCapExceptions: [],
|
|
194
193
|
capIsNew: false,
|
|
195
194
|
capIsNewExceptions: [],
|
|
196
195
|
properties: true,
|
|
@@ -55,6 +55,9 @@ export default {
|
|
|
55
55
|
// https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/prefer-await-to-then.md
|
|
56
56
|
'promise/prefer-await-to-then': 'off',
|
|
57
57
|
|
|
58
|
+
// https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-catch.md
|
|
59
|
+
'promise/prefer-catch': 'error',
|
|
60
|
+
|
|
58
61
|
// https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/spec-only.md
|
|
59
62
|
'promise/spec-only': 'error',
|
|
60
63
|
},
|
|
@@ -16,6 +16,12 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
],
|
|
18
18
|
|
|
19
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-assert.md
|
|
20
|
+
'unicorn/consistent-assert': 'error',
|
|
21
|
+
|
|
22
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md
|
|
23
|
+
'unicorn/consistent-date-clone': 'error',
|
|
24
|
+
|
|
19
25
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/consistent-destructuring.md
|
|
20
26
|
'unicorn/consistent-destructuring': 'error',
|
|
21
27
|
|
|
@@ -55,9 +61,6 @@ export default {
|
|
|
55
61
|
*/
|
|
56
62
|
'unicorn/filename-case': 'off',
|
|
57
63
|
|
|
58
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/import-index.md
|
|
59
|
-
'unicorn/import-index': 'error',
|
|
60
|
-
|
|
61
64
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-style.md
|
|
62
65
|
'unicorn/import-style': 'off',
|
|
63
66
|
|
|
@@ -67,6 +70,9 @@ export default {
|
|
|
67
70
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-abusive-eslint-disable.md
|
|
68
71
|
'unicorn/no-abusive-eslint-disable': 'error',
|
|
69
72
|
|
|
73
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md
|
|
74
|
+
'unicorn/no-accessor-recursion': 'error',
|
|
75
|
+
|
|
70
76
|
/*
|
|
71
77
|
* https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-anonymous-default-export.md
|
|
72
78
|
* Duplicates import/no-anonymous-default-export
|
|
@@ -112,6 +118,9 @@ export default {
|
|
|
112
118
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-instanceof-array.md
|
|
113
119
|
'unicorn/no-instanceof-array': 'error',
|
|
114
120
|
|
|
121
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md
|
|
122
|
+
'unicorn/no-instanceof-builtins': 'error',
|
|
123
|
+
|
|
115
124
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md
|
|
116
125
|
'unicorn/no-invalid-fetch-options': 'error',
|
|
117
126
|
|
|
@@ -133,6 +142,9 @@ export default {
|
|
|
133
142
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-magic-array-flat-depth.md
|
|
134
143
|
'unicorn/no-magic-array-flat-depth': 'error',
|
|
135
144
|
|
|
145
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-named-default.md
|
|
146
|
+
'unicorn/no-named-default': 'error',
|
|
147
|
+
|
|
136
148
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negation-in-equality-check.md
|
|
137
149
|
'unicorn/no-negation-in-equality-check': 'error',
|
|
138
150
|
|