@whitetrefoil/eslint-config 0.28.0 → 0.29.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.md +11 -0
- package/node.js +0 -12
- package/package.json +14 -15
- package/rules/base.js +6 -2
- package/rules/ts-types.js +1 -1
- package/rules/ts.js +12 -3
- package/web-others.js +0 -13
- package/web-react.js +0 -14
- package/rules/dependencies.js +0 -9
package/README.md
CHANGED
|
@@ -86,6 +86,17 @@ See Also
|
|
|
86
86
|
Changelog
|
|
87
87
|
---------
|
|
88
88
|
|
|
89
|
+
## v0.29.0
|
|
90
|
+
|
|
91
|
+
* remove dependencies check totally;
|
|
92
|
+
* allow `!!` for `no-implicit-coercion` rule;
|
|
93
|
+
* disable `newline-per-chained-call` rule;
|
|
94
|
+
|
|
95
|
+
## v0.28.1
|
|
96
|
+
|
|
97
|
+
* disable eslint-dependencies for node proj;
|
|
98
|
+
* un-ban `{}` for TS 4.8;
|
|
99
|
+
|
|
89
100
|
### v0.28.0
|
|
90
101
|
|
|
91
102
|
* disable `default-case`, enable `@typescript-eslint/switch-exhaustiveness-check`;
|
package/node.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whitetrefoil/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"author": "WhiteTrefoil <whitetrefoil@gmail.com>",
|
|
5
5
|
"license": "Unlicense",
|
|
6
6
|
"engines": {
|
|
@@ -11,26 +11,25 @@
|
|
|
11
11
|
"rules"
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"eslint": "^8.
|
|
15
|
-
"eslint-plugin-implicit-dependencies": "^1.1.1"
|
|
14
|
+
"eslint": "^8.24.0"
|
|
16
15
|
},
|
|
17
16
|
"devDependencies": {
|
|
18
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
19
|
-
"@typescript-eslint/parser": "^5.
|
|
17
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
18
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
20
19
|
"eslint-plugin-node": "^11.1.0",
|
|
21
|
-
"eslint-plugin-react": "^7.
|
|
22
|
-
"eslint-plugin-react-hooks": "^4.
|
|
23
|
-
"eslint-plugin-vue": "^
|
|
24
|
-
"typescript": "^4.
|
|
20
|
+
"eslint-plugin-react": "^7.31.8",
|
|
21
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
22
|
+
"eslint-plugin-vue": "^9.5.1",
|
|
23
|
+
"typescript": "^4.8.4"
|
|
25
24
|
},
|
|
26
25
|
"peerDependencies": {
|
|
27
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
28
|
-
"@typescript-eslint/parser": "^5.
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
27
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
29
28
|
"eslint-plugin-node": "^11.1.0",
|
|
30
|
-
"eslint-plugin-react": "^7.
|
|
31
|
-
"eslint-plugin-react-hooks": "^4.
|
|
32
|
-
"eslint-plugin-vue": "^
|
|
33
|
-
"typescript": "^4.
|
|
29
|
+
"eslint-plugin-react": "^7.31.8",
|
|
30
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
31
|
+
"eslint-plugin-vue": "^9.5.1",
|
|
32
|
+
"typescript": "^4.8.4"
|
|
34
33
|
},
|
|
35
34
|
"peerDependenciesMeta": {
|
|
36
35
|
"@typescript-eslint/eslint-plugin": {
|
package/rules/base.js
CHANGED
|
@@ -128,7 +128,11 @@ module.exports = {
|
|
|
128
128
|
'no-extra-semi' : [2],
|
|
129
129
|
'no-floating-decimal' : [2],
|
|
130
130
|
'no-global-assign' : [2],
|
|
131
|
-
'no-implicit-coercion' : [
|
|
131
|
+
'no-implicit-coercion' : [
|
|
132
|
+
1, {
|
|
133
|
+
allow: ['!!'],
|
|
134
|
+
},
|
|
135
|
+
],
|
|
132
136
|
'no-implicit-globals' : [2],
|
|
133
137
|
'no-implied-eval' : [2],
|
|
134
138
|
'no-inline-comments' : [0],
|
|
@@ -283,7 +287,7 @@ module.exports = {
|
|
|
283
287
|
'max-statements-per-line' : [1, { max: 1 }],
|
|
284
288
|
'multiline-ternary' : [0],
|
|
285
289
|
'new-parens' : [2],
|
|
286
|
-
'newline-per-chained-call' : [
|
|
290
|
+
'newline-per-chained-call' : [0],
|
|
287
291
|
'no-extra-parens' : [
|
|
288
292
|
1,
|
|
289
293
|
'all',
|
package/rules/ts-types.js
CHANGED
package/rules/ts.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Rules up to v5.
|
|
1
|
+
// Rules up to v5.24.0
|
|
2
2
|
// @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md
|
|
3
3
|
|
|
4
4
|
// These are rules don't need type info
|
|
@@ -16,7 +16,15 @@ module.exports = {
|
|
|
16
16
|
'@typescript-eslint/array-type' : [1, { default: 'array-simple' }],
|
|
17
17
|
'@typescript-eslint/ban-ts-comment' : [1],
|
|
18
18
|
'@typescript-eslint/ban-tslint-comment' : [1],
|
|
19
|
-
'@typescript-eslint/ban-types' : [
|
|
19
|
+
'@typescript-eslint/ban-types' : [
|
|
20
|
+
2,
|
|
21
|
+
{
|
|
22
|
+
types : {
|
|
23
|
+
'{}': false,
|
|
24
|
+
},
|
|
25
|
+
extendDefaults: true,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
20
28
|
'@typescript-eslint/class-literal-property-style' : [0],
|
|
21
29
|
'@typescript-eslint/consistent-indexed-object-style': [0],
|
|
22
30
|
'@typescript-eslint/consistent-type-assertions' : [
|
|
@@ -28,7 +36,8 @@ module.exports = {
|
|
|
28
36
|
],
|
|
29
37
|
'@typescript-eslint/consistent-type-definitions' : [0],
|
|
30
38
|
'@typescript-eslint/consistent-type-imports' : [
|
|
31
|
-
2,
|
|
39
|
+
2,
|
|
40
|
+
{
|
|
32
41
|
prefer : 'type-imports',
|
|
33
42
|
disallowTypeAnnotations: false,
|
|
34
43
|
},
|
package/web-others.js
CHANGED
|
@@ -37,19 +37,6 @@ module.exports = {
|
|
|
37
37
|
],
|
|
38
38
|
},
|
|
39
39
|
|
|
40
|
-
{
|
|
41
|
-
files : [
|
|
42
|
-
'src/**/*.ts',
|
|
43
|
-
'src/**/*.tsx',
|
|
44
|
-
],
|
|
45
|
-
excludedFiles: [
|
|
46
|
-
'src/**/*.spec.ts',
|
|
47
|
-
],
|
|
48
|
-
extends: [
|
|
49
|
-
'./rules/dependencies',
|
|
50
|
-
],
|
|
51
|
-
},
|
|
52
|
-
|
|
53
40
|
{
|
|
54
41
|
files: [
|
|
55
42
|
'src/**/*.spec.ts',
|
package/web-react.js
CHANGED
|
@@ -43,20 +43,6 @@ module.exports = {
|
|
|
43
43
|
],
|
|
44
44
|
},
|
|
45
45
|
|
|
46
|
-
{
|
|
47
|
-
files : [
|
|
48
|
-
'src/**/*.ts',
|
|
49
|
-
'src/**/*.tsx',
|
|
50
|
-
],
|
|
51
|
-
excludedFiles: [
|
|
52
|
-
'src/**/*.spec.ts',
|
|
53
|
-
],
|
|
54
|
-
extends: [
|
|
55
|
-
'./rules/react',
|
|
56
|
-
'./rules/dependencies',
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
|
|
60
46
|
{
|
|
61
47
|
files: [
|
|
62
48
|
'src/**/*.spec.ts',
|