@perfective/eslint-config 0.16.0-alpha.1 → 0.16.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.adoc +1 -1
- package/README.md +1 -1
- package/package.json +15 -15
- package/rules/import/static-analysis.js +4 -1
- package/rules/jest/index.js +4 -1
- package/rules/typescript-eslint/extension-rules.js +4 -0
- package/rules/typescript-eslint/supported-rules.js +2 -1
- package/rules/unicorn/index.js +5 -0
package/README.adoc
CHANGED
|
@@ -14,7 +14,7 @@ and the `link:https://github.com/typescript-eslint/typescript-eslint/tree/master
|
|
|
14
14
|
* `link:https://github.com/cypress-io/eslint-plugin-cypress[eslint-plugin-cypress]`;
|
|
15
15
|
* `link:https://github.com/gund/eslint-plugin-deprecation[eslint-plugin-deprecation]`;
|
|
16
16
|
* `link:https://mysticatea.github.io/eslint-plugin-eslint-comments[eslint-plugin-eslint-comments]`;
|
|
17
|
-
* `link:https://github.com/
|
|
17
|
+
* `link:https://github.com/import-js/eslint-plugin-import[eslint-plugin-import]`;
|
|
18
18
|
* `link:https://github.com/jest-community/eslint-plugin-jest[eslint-plugin-jest]`;
|
|
19
19
|
* `link:https://github.com/testing-library/eslint-plugin-jest-dom[eslint-plugin-jest-dom]`;
|
|
20
20
|
* `link:https://github.com/dangreenisrael/eslint-plugin-jest-formatting[eslint-plugin-jest-formatting]`;
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ and the [`@typescript-eslint`](https://github.com/typescript-eslint/typescript-e
|
|
|
14
14
|
- [`eslint-plugin-cypress`](https://github.com/cypress-io/eslint-plugin-cypress);
|
|
15
15
|
- [`eslint-plugin-deprecation`](https://github.com/gund/eslint-plugin-deprecation);
|
|
16
16
|
- [`eslint-plugin-eslint-comments`](https://mysticatea.github.io/eslint-plugin-eslint-comments);
|
|
17
|
-
- [`eslint-plugin-import`](https://github.com/
|
|
17
|
+
- [`eslint-plugin-import`](https://github.com/import-js/eslint-plugin-import);
|
|
18
18
|
- [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest);
|
|
19
19
|
- [`eslint-plugin-jest-dom`](https://github.com/testing-library/eslint-plugin-jest-dom);
|
|
20
20
|
- [`eslint-plugin-jest-formatting`](https://github.com/dangreenisrael/eslint-plugin-jest-formatting);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perfective/eslint-config",
|
|
3
|
-
"version": "0.16.0
|
|
3
|
+
"version": "0.16.0",
|
|
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>",
|
|
@@ -11,29 +11,29 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@babel/eslint-parser": "^7.
|
|
15
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
16
|
-
"@typescript-eslint/eslint-plugin-tslint": "^4.
|
|
17
|
-
"@typescript-eslint/parser": "^4.
|
|
14
|
+
"@babel/eslint-parser": "^7.16.5",
|
|
15
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
16
|
+
"@typescript-eslint/eslint-plugin-tslint": "^4.33.0",
|
|
17
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
18
18
|
"eslint": "^7.32.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
|
-
"eslint-plugin-deprecation": "^1.2
|
|
22
|
+
"eslint-plugin-deprecation": "^1.3.2",
|
|
23
23
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
24
|
-
"eslint-plugin-import": "^2.
|
|
25
|
-
"eslint-plugin-jest": "^24.
|
|
26
|
-
"eslint-plugin-jest-dom": "^
|
|
27
|
-
"eslint-plugin-jest-formatting": "^3.
|
|
28
|
-
"eslint-plugin-jsdoc": "^
|
|
24
|
+
"eslint-plugin-import": "^2.25.3",
|
|
25
|
+
"eslint-plugin-jest": "^24.7.0",
|
|
26
|
+
"eslint-plugin-jest-dom": "^4.0.0",
|
|
27
|
+
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
28
|
+
"eslint-plugin-jsdoc": "^37.4.2",
|
|
29
29
|
"eslint-plugin-node": "^11.1.0",
|
|
30
30
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
31
|
-
"eslint-plugin-promise": "^
|
|
31
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
32
32
|
"eslint-plugin-rxjs": "^3.3.7",
|
|
33
33
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
34
|
-
"eslint-plugin-sonarjs": "^0.
|
|
35
|
-
"eslint-plugin-testing-library": "^4.12.
|
|
36
|
-
"eslint-plugin-unicorn": "^
|
|
34
|
+
"eslint-plugin-sonarjs": "^0.11.0",
|
|
35
|
+
"eslint-plugin-testing-library": "^4.12.4",
|
|
36
|
+
"eslint-plugin-unicorn": "^39.0.0",
|
|
37
37
|
"tslint": "^6.1.3"
|
|
38
38
|
},
|
|
39
39
|
"main": "./index.js",
|
package/rules/jest/index.js
CHANGED
|
@@ -49,18 +49,21 @@ module.exports = {
|
|
|
49
49
|
'jest/no-test-return-statement': 'error',
|
|
50
50
|
'jest/prefer-called-with': 'error',
|
|
51
51
|
'jest/prefer-expect-assertions': 'off',
|
|
52
|
+
'jest/prefer-expect-resolves': 'warn',
|
|
52
53
|
'jest/prefer-hooks-on-top': 'error',
|
|
53
54
|
'jest/prefer-spy-on': 'warn',
|
|
54
55
|
'jest/prefer-strict-equal': 'warn',
|
|
56
|
+
'jest/prefer-to-be': 'warn',
|
|
55
57
|
'jest/prefer-to-be-null': 'warn',
|
|
56
58
|
'jest/prefer-to-be-undefined': 'warn',
|
|
57
59
|
'jest/prefer-to-contain': 'warn',
|
|
58
60
|
'jest/prefer-to-have-length': 'warn',
|
|
59
61
|
'jest/prefer-todo': 'warn',
|
|
62
|
+
'jest/require-hook': 'error',
|
|
60
63
|
'jest/require-top-level-describe': 'error',
|
|
61
64
|
'jest/require-to-throw-message': 'error',
|
|
62
65
|
'jest/valid-describe': 'error',
|
|
63
|
-
'jest/valid-expect-in-promise': '
|
|
66
|
+
'jest/valid-expect-in-promise': 'error',
|
|
64
67
|
'jest/valid-expect': 'error',
|
|
65
68
|
'jest/valid-title': ['warn', {
|
|
66
69
|
ignoreTypeOfDescribeName: true,
|
|
@@ -82,6 +82,10 @@ module.exports = {
|
|
|
82
82
|
'@typescript-eslint/no-magic-numbers': 'off',
|
|
83
83
|
'no-redeclare': 'off',
|
|
84
84
|
'@typescript-eslint/no-redeclare': 'error',
|
|
85
|
+
'no-restricted-imports': 'off',
|
|
86
|
+
'@typescript-eslint/no-restricted-imports': ['error', {
|
|
87
|
+
allowTypeImports: false,
|
|
88
|
+
}],
|
|
85
89
|
'no-shadow': 'off',
|
|
86
90
|
'@typescript-eslint/no-shadow': 'off',
|
|
87
91
|
'no-throw-literal': 'off',
|
|
@@ -108,6 +108,7 @@ module.exports = {
|
|
|
108
108
|
'@typescript-eslint/no-misused-new': 'error',
|
|
109
109
|
'@typescript-eslint/no-misused-promises': 'error',
|
|
110
110
|
'@typescript-eslint/no-namespace': 'error',
|
|
111
|
+
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
|
|
111
112
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
112
113
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
113
114
|
'@typescript-eslint/no-parameter-properties': 'off',
|
|
@@ -148,7 +149,7 @@ module.exports = {
|
|
|
148
149
|
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
|
|
149
150
|
'@typescript-eslint/prefer-reduce-type-parameter': 'warn',
|
|
150
151
|
'@typescript-eslint/prefer-regexp-exec': 'warn',
|
|
151
|
-
'@typescript-eslint/prefer-return-this-type': '
|
|
152
|
+
'@typescript-eslint/prefer-return-this-type': 'warn',
|
|
152
153
|
'@typescript-eslint/prefer-string-starts-ends-with': 'warn',
|
|
153
154
|
'@typescript-eslint/prefer-ts-expect-error': 'warn',
|
|
154
155
|
'@typescript-eslint/promise-function-async': ['warn', {
|
package/rules/unicorn/index.js
CHANGED
|
@@ -31,8 +31,10 @@ module.exports = {
|
|
|
31
31
|
ignore: ['readable', 'this', 'this.stream'],
|
|
32
32
|
}],
|
|
33
33
|
'unicorn/no-array-reduce': 'off',
|
|
34
|
+
'unicorn/no-await-expression-member': 'error',
|
|
34
35
|
'unicorn/no-console-spaces': 'warn',
|
|
35
36
|
'unicorn/no-document-cookie': 'error',
|
|
37
|
+
'unicorn/no-empty-file': 'error',
|
|
36
38
|
'unicorn/no-for-loop': 'warn',
|
|
37
39
|
'unicorn/no-hex-escape': 'warn',
|
|
38
40
|
'unicorn/no-instanceof-array': 'warn',
|
|
@@ -85,12 +87,14 @@ module.exports = {
|
|
|
85
87
|
'unicorn/prefer-array-index-of': 'warn',
|
|
86
88
|
'unicorn/prefer-array-some': 'error',
|
|
87
89
|
'unicorn/prefer-at': 'off',
|
|
90
|
+
'unicorn/prefer-code-point': 'error',
|
|
88
91
|
'unicorn/prefer-date-now': 'warn',
|
|
89
92
|
'unicorn/prefer-default-parameters': 'warn',
|
|
90
93
|
'unicorn/prefer-dom-node-append': 'warn',
|
|
91
94
|
'unicorn/prefer-dom-node-dataset': 'warn',
|
|
92
95
|
'unicorn/prefer-dom-node-remove': 'warn',
|
|
93
96
|
'unicorn/prefer-dom-node-text-content': 'warn',
|
|
97
|
+
'unicorn/prefer-export-from': 'warn',
|
|
94
98
|
'unicorn/prefer-includes': 'warn',
|
|
95
99
|
'unicorn/prefer-keyboard-event-key': 'warn',
|
|
96
100
|
'unicorn/prefer-math-trunc': 'warn',
|
|
@@ -130,6 +134,7 @@ module.exports = {
|
|
|
130
134
|
'unicorn/require-number-to-fixed-digits-argument': 'warn',
|
|
131
135
|
'unicorn/require-post-message-target-origin': 'error',
|
|
132
136
|
'unicorn/string-content': 'off',
|
|
137
|
+
'unicorn/template-indent': 'warn',
|
|
133
138
|
'unicorn/throw-new-error': 'warn',
|
|
134
139
|
},
|
|
135
140
|
};
|