@will-stone/eslint-config 6.2.0 → 6.5.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/javascript.js +1 -1
- package/package.json +8 -8
- package/rules/built-in.js +3 -0
- package/rules/typescript.js +1 -0
- package/rules/unicorn.js +12 -0
package/javascript.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@will-stone/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "My ESLint config",
|
|
6
6
|
"repository": {
|
|
@@ -13,26 +13,26 @@
|
|
|
13
13
|
"eslint-print-rules": "eslint --no-eslintrc -c ./_for_rule_checking.js --print-config ./_for_rule_checking.js > rules.json"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"confusing-browser-globals": "^1.0.
|
|
16
|
+
"confusing-browser-globals": "^1.0.11",
|
|
17
17
|
"eslint-config-prettier": "^8.3.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"eslint-find-rules": "^4.0.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
24
|
-
"@typescript-eslint/parser": "^5.
|
|
25
|
-
"eslint": "^8.
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
|
24
|
+
"@typescript-eslint/parser": "^5.8.1",
|
|
25
|
+
"eslint": "^8.6.0",
|
|
26
26
|
"eslint-plugin-import": "^2.25.3",
|
|
27
|
-
"eslint-plugin-jest": "^25.
|
|
27
|
+
"eslint-plugin-jest": "^25.3.3",
|
|
28
28
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
29
29
|
"eslint-plugin-node": "^11.1.0",
|
|
30
30
|
"eslint-plugin-prettier": "^4.0.0",
|
|
31
|
-
"eslint-plugin-react": "^7.
|
|
31
|
+
"eslint-plugin-react": "^7.28.0",
|
|
32
32
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
33
33
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
34
34
|
"eslint-plugin-switch-case": "^1.1.2",
|
|
35
|
-
"eslint-plugin-unicorn": "^
|
|
35
|
+
"eslint-plugin-unicorn": "^40.0.0",
|
|
36
36
|
"typescript": "4.x"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
package/rules/built-in.js
CHANGED
|
@@ -685,6 +685,9 @@ module.exports = {
|
|
|
685
685
|
// or 16 (hexadecimal).
|
|
686
686
|
'prefer-numeric-literals': 'warn',
|
|
687
687
|
|
|
688
|
+
// Not supported by Typescript yet
|
|
689
|
+
'prefer-object-has-own': 'off',
|
|
690
|
+
|
|
688
691
|
// Prefer use of an object spread over Object.assign()
|
|
689
692
|
'prefer-object-spread': 'warn',
|
|
690
693
|
|
package/rules/typescript.js
CHANGED
|
@@ -263,6 +263,7 @@ module.exports = {
|
|
|
263
263
|
'@typescript-eslint/padding-line-between-statements': [
|
|
264
264
|
'warn',
|
|
265
265
|
{ blankLine: 'always', prev: 'multiline-block-like', next: '*' },
|
|
266
|
+
{ blankLine: 'always', prev: '*', next: 'multiline-block-like' },
|
|
266
267
|
],
|
|
267
268
|
|
|
268
269
|
'@typescript-eslint/prefer-enum-initializers': 'error',
|
package/rules/unicorn.js
CHANGED
|
@@ -125,6 +125,9 @@ module.exports = {
|
|
|
125
125
|
// A class with only static members could just be an object instead
|
|
126
126
|
'unicorn/no-static-only-class': 'error',
|
|
127
127
|
|
|
128
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md
|
|
129
|
+
'unicorn/no-thenable': 'error',
|
|
130
|
+
|
|
128
131
|
// Disallow assigning this to a variable
|
|
129
132
|
'unicorn/no-this-assignment': 'error',
|
|
130
133
|
|
|
@@ -135,6 +138,9 @@ module.exports = {
|
|
|
135
138
|
// Disallow useless array length check
|
|
136
139
|
'unicorn/no-useless-length-check': 'warn',
|
|
137
140
|
|
|
141
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md
|
|
142
|
+
'unicorn/no-useless-promise-resolve-reject': 'warn',
|
|
143
|
+
|
|
138
144
|
// Disallow useless spread
|
|
139
145
|
'unicorn/no-useless-spread': 'warn',
|
|
140
146
|
|
|
@@ -208,6 +214,9 @@ module.exports = {
|
|
|
208
214
|
// Prefer .includes() over .indexOf() when checking for existence or non-existence
|
|
209
215
|
'unicorn/prefer-includes': 'warn',
|
|
210
216
|
|
|
217
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-json-parse-buffer.md
|
|
218
|
+
'unicorn/prefer-json-parse-buffer': 'warn',
|
|
219
|
+
|
|
211
220
|
// Prefer KeyboardEvent#key over KeyboardEvent#keyCode
|
|
212
221
|
'unicorn/prefer-keyboard-event-key': 'warn',
|
|
213
222
|
|
|
@@ -304,6 +313,9 @@ module.exports = {
|
|
|
304
313
|
// Enforce the use of regex shorthands to improve readability
|
|
305
314
|
'unicorn/regex-shorthand': 'warn',
|
|
306
315
|
|
|
316
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md
|
|
317
|
+
'unicorn/relative-url-style': 'warn',
|
|
318
|
+
|
|
307
319
|
// Enforce using the separator argument with Array#join()
|
|
308
320
|
'unicorn/require-array-join-separator': 'warn',
|
|
309
321
|
|