@perfective/eslint-config 0.15.1 → 0.16.0-beta
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/index.js +3 -3
- package/package.json +19 -19
- package/rules/cypress/index.js +1 -0
- package/rules/import/helpful-warnings.js +1 -1
- package/rules/import/static-analysis.js +10 -3
- package/rules/jest/index.js +7 -1
- package/rules/jsdoc/index.js +1 -0
- package/rules/simple-import-sort/index.js +1 -1
- package/rules/sonarjs/bug-detection.js +3 -0
- package/rules/sonarjs/code-smell-detection.js +5 -1
- package/rules/testing-library/index.js +1 -0
- package/rules/typescript-eslint/extension-rules.js +6 -0
- package/rules/typescript-eslint/supported-rules.js +9 -3
- package/rules/typescript-eslint/tslint.js +1 -1
- package/rules/unicorn/index.js +19 -3
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/index.js
CHANGED
|
@@ -39,7 +39,7 @@ module.exports = {
|
|
|
39
39
|
},
|
|
40
40
|
rules: {
|
|
41
41
|
'import/no-commonjs': 'off',
|
|
42
|
-
'import/no-extraneous-dependencies': ['error', no_extraneous_dependencies_1.jsImportNoExtraneousDependencies()],
|
|
42
|
+
'import/no-extraneous-dependencies': ['error', (0, no_extraneous_dependencies_1.jsImportNoExtraneousDependencies)()],
|
|
43
43
|
'import/unambiguous': 'off',
|
|
44
44
|
'jsdoc/no-types': 'off',
|
|
45
45
|
'jsdoc/require-param': 'error',
|
|
@@ -100,7 +100,7 @@ module.exports = {
|
|
|
100
100
|
}],
|
|
101
101
|
'@typescript-eslint/init-declarations': 'off',
|
|
102
102
|
'@typescript-eslint/unbound-method': 'off',
|
|
103
|
-
'import/no-extraneous-dependencies': ['error', no_extraneous_dependencies_1.jestImportNoExtraneousDependencies()],
|
|
103
|
+
'import/no-extraneous-dependencies': ['error', (0, no_extraneous_dependencies_1.jestImportNoExtraneousDependencies)()],
|
|
104
104
|
'import/no-unassigned-import': ['error', {
|
|
105
105
|
allow: [
|
|
106
106
|
'@testing-library/jest-dom',
|
|
@@ -124,7 +124,7 @@ module.exports = {
|
|
|
124
124
|
rules: {
|
|
125
125
|
'init-declarations': 'off',
|
|
126
126
|
'@typescript-eslint/init-declarations': 'off',
|
|
127
|
-
'import/no-extraneous-dependencies': ['error', no_extraneous_dependencies_1.cypressImportNoExtraneousDependencies()],
|
|
127
|
+
'import/no-extraneous-dependencies': ['error', (0, no_extraneous_dependencies_1.cypressImportNoExtraneousDependencies)()],
|
|
128
128
|
'max-nested-callbacks': ['error', 4],
|
|
129
129
|
'new-cap': ['error', {
|
|
130
130
|
capIsNewExceptions: ['Given', 'When', 'Then', 'And', 'But', 'Before', 'After'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perfective/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0-beta",
|
|
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.
|
|
18
|
-
"eslint": "^7.
|
|
19
|
-
"eslint-import-resolver-typescript": "^2.
|
|
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
|
+
"eslint": "^7.32.0",
|
|
19
|
+
"eslint-import-resolver-typescript": "^2.5.0",
|
|
20
20
|
"eslint-plugin-array-func": "^3.1.7",
|
|
21
|
-
"eslint-plugin-cypress": "^2.
|
|
22
|
-
"eslint-plugin-deprecation": "^1.2
|
|
21
|
+
"eslint-plugin-cypress": "^2.12.1",
|
|
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": "^
|
|
32
|
-
"eslint-plugin-rxjs": "^3.3.
|
|
31
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
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.
|
|
36
|
-
"eslint-plugin-unicorn": "^
|
|
34
|
+
"eslint-plugin-sonarjs": "^0.11.0",
|
|
35
|
+
"eslint-plugin-testing-library": "^4.12.4",
|
|
36
|
+
"eslint-plugin-unicorn": "^36.0.0",
|
|
37
37
|
"tslint": "^6.1.3"
|
|
38
38
|
},
|
|
39
39
|
"main": "./index.js",
|
package/rules/cypress/index.js
CHANGED
|
@@ -8,6 +8,7 @@ module.exports = {
|
|
|
8
8
|
'cypress/no-assigning-return-values': 'error',
|
|
9
9
|
'cypress/no-async-tests': 'error',
|
|
10
10
|
'cypress/no-force': 'error',
|
|
11
|
+
'cypress/no-pause': 'error',
|
|
11
12
|
'cypress/no-unnecessary-waiting': 'error',
|
|
12
13
|
'cypress/require-data-selectors': 'error',
|
|
13
14
|
},
|
|
@@ -6,7 +6,7 @@ module.exports = {
|
|
|
6
6
|
'import/no-named-as-default': 'error',
|
|
7
7
|
'import/no-named-as-default-member': 'error',
|
|
8
8
|
'import/no-deprecated': 'off',
|
|
9
|
-
'import/no-extraneous-dependencies': ['error', no_extraneous_dependencies_1.importNoExtraneousDependencies()],
|
|
9
|
+
'import/no-extraneous-dependencies': ['error', (0, no_extraneous_dependencies_1.importNoExtraneousDependencies)()],
|
|
10
10
|
'import/no-mutable-exports': 'error',
|
|
11
11
|
'import/no-unused-modules': 'error',
|
|
12
12
|
},
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
module.exports = {
|
|
3
3
|
rules: {
|
|
4
|
-
'import/no-unresolved': 'error',
|
|
5
|
-
|
|
4
|
+
'import/no-unresolved': ['error', {
|
|
5
|
+
caseSensitive: true,
|
|
6
|
+
caseSensitiveStrict: true,
|
|
7
|
+
}],
|
|
8
|
+
'import/named': ['error', {
|
|
9
|
+
commonjs: true,
|
|
10
|
+
}],
|
|
6
11
|
'import/default': 'error',
|
|
7
12
|
'import/namespace': 'error',
|
|
8
13
|
'import/no-restricted-paths': 'off',
|
|
9
14
|
'import/no-absolute-path': 'error',
|
|
10
|
-
'import/no-dynamic-require': 'error',
|
|
15
|
+
'import/no-dynamic-require': ['error', {
|
|
16
|
+
esmodule: true,
|
|
17
|
+
}],
|
|
11
18
|
'import/no-internal-modules': 'off',
|
|
12
19
|
'import/no-webpack-loader-syntax': 'error',
|
|
13
20
|
'import/no-self-import': 'error',
|
package/rules/jest/index.js
CHANGED
|
@@ -17,6 +17,9 @@ module.exports = {
|
|
|
17
17
|
'jest/lowercase-name': ['error', {
|
|
18
18
|
ignore: ['describe'],
|
|
19
19
|
}],
|
|
20
|
+
'jest/max-nested-describe': ['error', {
|
|
21
|
+
max: 3,
|
|
22
|
+
}],
|
|
20
23
|
'jest/no-alias-methods': 'warn',
|
|
21
24
|
'jest/no-commented-out-tests': 'error',
|
|
22
25
|
'jest/no-conditional-expect': 'error',
|
|
@@ -46,18 +49,21 @@ module.exports = {
|
|
|
46
49
|
'jest/no-test-return-statement': 'error',
|
|
47
50
|
'jest/prefer-called-with': 'error',
|
|
48
51
|
'jest/prefer-expect-assertions': 'off',
|
|
52
|
+
'jest/prefer-expect-resolves': 'warn',
|
|
49
53
|
'jest/prefer-hooks-on-top': 'error',
|
|
50
54
|
'jest/prefer-spy-on': 'warn',
|
|
51
55
|
'jest/prefer-strict-equal': 'warn',
|
|
56
|
+
'jest/prefer-to-be': 'warn',
|
|
52
57
|
'jest/prefer-to-be-null': 'warn',
|
|
53
58
|
'jest/prefer-to-be-undefined': 'warn',
|
|
54
59
|
'jest/prefer-to-contain': 'warn',
|
|
55
60
|
'jest/prefer-to-have-length': 'warn',
|
|
56
61
|
'jest/prefer-todo': 'warn',
|
|
62
|
+
'jest/require-hook': 'error',
|
|
57
63
|
'jest/require-top-level-describe': 'error',
|
|
58
64
|
'jest/require-to-throw-message': 'error',
|
|
59
65
|
'jest/valid-describe': 'error',
|
|
60
|
-
'jest/valid-expect-in-promise': '
|
|
66
|
+
'jest/valid-expect-in-promise': 'error',
|
|
61
67
|
'jest/valid-expect': 'error',
|
|
62
68
|
'jest/valid-title': ['warn', {
|
|
63
69
|
ignoreTypeOfDescribeName: true,
|
package/rules/jsdoc/index.js
CHANGED
|
@@ -3,10 +3,13 @@ module.exports = {
|
|
|
3
3
|
rules: {
|
|
4
4
|
'sonarjs/no-all-duplicated-branches': 'error',
|
|
5
5
|
'sonarjs/no-element-overwrite': 'error',
|
|
6
|
+
'sonarjs/no-empty-collection': 'error',
|
|
6
7
|
'sonarjs/no-extra-arguments': 'error',
|
|
7
8
|
'sonarjs/no-identical-conditions': 'error',
|
|
8
9
|
'sonarjs/no-identical-expressions': 'error',
|
|
10
|
+
'sonarjs/no-ignored-return': 'error',
|
|
9
11
|
'sonarjs/no-one-iteration-loop': 'error',
|
|
10
12
|
'sonarjs/no-use-of-empty-return-value': 'error',
|
|
13
|
+
'sonarjs/non-existent-operator': 'error',
|
|
11
14
|
},
|
|
12
15
|
};
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
module.exports = {
|
|
3
3
|
rules: {
|
|
4
4
|
'sonarjs/cognitive-complexity': ['off', 5],
|
|
5
|
+
'sonarjs/elseif-without-else': 'off',
|
|
5
6
|
'sonarjs/max-switch-cases': 'off',
|
|
6
7
|
'sonarjs/no-collapsible-if': 'error',
|
|
7
8
|
'sonarjs/no-collection-size-mischeck': 'error',
|
|
8
9
|
'sonarjs/no-duplicate-string': 'off',
|
|
9
10
|
'sonarjs/no-duplicated-branches': 'error',
|
|
11
|
+
'sonarjs/no-gratuitous-expressions': 'error',
|
|
10
12
|
'sonarjs/no-identical-functions': 'error',
|
|
11
|
-
'sonarjs/no-inverted-boolean-check': '
|
|
13
|
+
'sonarjs/no-inverted-boolean-check': 'warn',
|
|
14
|
+
'sonarjs/no-nested-switch': 'error',
|
|
15
|
+
'sonarjs/no-nested-template-literals': 'error',
|
|
12
16
|
'sonarjs/no-redundant-boolean': 'error',
|
|
13
17
|
'sonarjs/no-redundant-jump': 'error',
|
|
14
18
|
'sonarjs/no-same-line-conditional': 'error',
|
|
@@ -28,6 +28,7 @@ module.exports = {
|
|
|
28
28
|
'testing-library/prefer-explicit-assert': 'error',
|
|
29
29
|
'testing-library/prefer-find-by': 'warn',
|
|
30
30
|
'testing-library/prefer-presence-queries': 'error',
|
|
31
|
+
'testing-library/prefer-query-by-disappearance': 'error',
|
|
31
32
|
'testing-library/prefer-user-event': 'error',
|
|
32
33
|
'testing-library/prefer-screen-queries': 'error',
|
|
33
34
|
'testing-library/prefer-wait-for': 'warn',
|
|
@@ -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',
|
|
@@ -106,6 +110,8 @@ module.exports = {
|
|
|
106
110
|
arraysInObjects: true,
|
|
107
111
|
objectsInObjects: true,
|
|
108
112
|
}],
|
|
113
|
+
'padding-line-between-statements': 'off',
|
|
114
|
+
'@typescript-eslint/padding-line-between-statements': 'off',
|
|
109
115
|
'quotes': 'off',
|
|
110
116
|
'@typescript-eslint/quotes': ['warn', 'single', {
|
|
111
117
|
avoidEscape: true,
|
|
@@ -71,7 +71,7 @@ module.exports = {
|
|
|
71
71
|
],
|
|
72
72
|
}],
|
|
73
73
|
'@typescript-eslint/method-signature-style': ['warn', 'property'],
|
|
74
|
-
'@typescript-eslint/naming-convention': ['error', ...typescript_eslint_naming_convention_1.typescriptEslintNamingConvention()],
|
|
74
|
+
'@typescript-eslint/naming-convention': ['error', ...(0, typescript_eslint_naming_convention_1.typescriptEslintNamingConvention)()],
|
|
75
75
|
'@typescript-eslint/no-base-to-string': 'error',
|
|
76
76
|
'@typescript-eslint/no-confusing-non-null-assertion': 'warn',
|
|
77
77
|
'@typescript-eslint/no-confusing-void-expression': ['warn', {
|
|
@@ -102,9 +102,13 @@ module.exports = {
|
|
|
102
102
|
'@typescript-eslint/no-invalid-void-type': ['error', {
|
|
103
103
|
allowInGenericTypeArguments: true,
|
|
104
104
|
}],
|
|
105
|
+
'@typescript-eslint/no-meaningless-void-operator': ['warn', {
|
|
106
|
+
checkNever: true,
|
|
107
|
+
}],
|
|
105
108
|
'@typescript-eslint/no-misused-new': 'error',
|
|
106
109
|
'@typescript-eslint/no-misused-promises': 'error',
|
|
107
110
|
'@typescript-eslint/no-namespace': 'error',
|
|
111
|
+
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
|
|
108
112
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
109
113
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
110
114
|
'@typescript-eslint/no-parameter-properties': 'off',
|
|
@@ -145,6 +149,7 @@ module.exports = {
|
|
|
145
149
|
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
|
|
146
150
|
'@typescript-eslint/prefer-reduce-type-parameter': 'warn',
|
|
147
151
|
'@typescript-eslint/prefer-regexp-exec': 'warn',
|
|
152
|
+
'@typescript-eslint/prefer-return-this-type': 'warn',
|
|
148
153
|
'@typescript-eslint/prefer-string-starts-ends-with': 'warn',
|
|
149
154
|
'@typescript-eslint/prefer-ts-expect-error': 'warn',
|
|
150
155
|
'@typescript-eslint/promise-function-async': ['warn', {
|
|
@@ -157,10 +162,11 @@ module.exports = {
|
|
|
157
162
|
checkCompoundAssignments: true,
|
|
158
163
|
}],
|
|
159
164
|
'@typescript-eslint/restrict-template-expressions': ['error', {
|
|
160
|
-
allowNumber: false,
|
|
161
|
-
allowBoolean: false,
|
|
162
165
|
allowAny: false,
|
|
166
|
+
allowBoolean: false,
|
|
163
167
|
allowNullish: false,
|
|
168
|
+
allowNumber: false,
|
|
169
|
+
allowRegExp: false,
|
|
164
170
|
}],
|
|
165
171
|
'@typescript-eslint/sort-type-union-intersection-members': ['off', {
|
|
166
172
|
checkIntersections: true,
|
|
@@ -5,6 +5,6 @@ module.exports = {
|
|
|
5
5
|
'@typescript-eslint/tslint',
|
|
6
6
|
],
|
|
7
7
|
rules: {
|
|
8
|
-
'@typescript-eslint/tslint/config': ['warn', typescript_eslint_tslint_config_1.typescriptEslintTslintConfig()],
|
|
8
|
+
'@typescript-eslint/tslint/config': ['warn', (0, typescript_eslint_tslint_config_1.typescriptEslintTslintConfig)()],
|
|
9
9
|
},
|
|
10
10
|
};
|
package/rules/unicorn/index.js
CHANGED
|
@@ -26,15 +26,19 @@ module.exports = {
|
|
|
26
26
|
'unicorn/no-abusive-eslint-disable': 'error',
|
|
27
27
|
'unicorn/no-array-callback-reference': 'off',
|
|
28
28
|
'unicorn/no-array-for-each': 'off',
|
|
29
|
+
'unicorn/no-array-method-this-argument': 'warn',
|
|
29
30
|
'unicorn/no-array-push-push': ['warn', {
|
|
30
31
|
ignore: ['readable', 'this', 'this.stream'],
|
|
31
32
|
}],
|
|
32
33
|
'unicorn/no-array-reduce': 'off',
|
|
34
|
+
'unicorn/no-await-expression-member': 'error',
|
|
33
35
|
'unicorn/no-console-spaces': 'warn',
|
|
34
36
|
'unicorn/no-document-cookie': 'error',
|
|
37
|
+
'unicorn/no-empty-file': 'error',
|
|
35
38
|
'unicorn/no-for-loop': 'warn',
|
|
36
39
|
'unicorn/no-hex-escape': 'warn',
|
|
37
40
|
'unicorn/no-instanceof-array': 'warn',
|
|
41
|
+
'unicorn/no-invalid-remove-event-listener': 'error',
|
|
38
42
|
'unicorn/no-keyword-prefix': ['off', {
|
|
39
43
|
disallowedPrefixes: ['new', 'class'],
|
|
40
44
|
checkProperties: true,
|
|
@@ -52,6 +56,9 @@ module.exports = {
|
|
|
52
56
|
'unicorn/no-unreadable-array-destructuring': 'error',
|
|
53
57
|
'unicorn/no-unsafe-regex': 'error',
|
|
54
58
|
'unicorn/no-unused-properties': 'off',
|
|
59
|
+
'unicorn/no-useless-fallback-in-spread': 'warn',
|
|
60
|
+
'unicorn/no-useless-length-check': 'warn',
|
|
61
|
+
'unicorn/no-useless-spread': 'warn',
|
|
55
62
|
'unicorn/no-useless-undefined': 'off',
|
|
56
63
|
'unicorn/no-zero-fractions': 'off',
|
|
57
64
|
'unicorn/number-literal-case': 'warn',
|
|
@@ -79,23 +86,29 @@ module.exports = {
|
|
|
79
86
|
'unicorn/prefer-array-flat-map': 'off',
|
|
80
87
|
'unicorn/prefer-array-index-of': 'warn',
|
|
81
88
|
'unicorn/prefer-array-some': 'error',
|
|
89
|
+
'unicorn/prefer-at': 'off',
|
|
90
|
+
'unicorn/prefer-code-point': 'error',
|
|
82
91
|
'unicorn/prefer-date-now': 'warn',
|
|
83
92
|
'unicorn/prefer-default-parameters': 'warn',
|
|
84
93
|
'unicorn/prefer-dom-node-append': 'warn',
|
|
85
94
|
'unicorn/prefer-dom-node-dataset': 'warn',
|
|
86
95
|
'unicorn/prefer-dom-node-remove': 'warn',
|
|
87
96
|
'unicorn/prefer-dom-node-text-content': 'warn',
|
|
97
|
+
'unicorn/prefer-export-from': 'warn',
|
|
88
98
|
'unicorn/prefer-includes': 'warn',
|
|
89
99
|
'unicorn/prefer-keyboard-event-key': 'warn',
|
|
90
100
|
'unicorn/prefer-math-trunc': 'warn',
|
|
91
101
|
'unicorn/prefer-modern-dom-apis': 'warn',
|
|
92
102
|
'unicorn/prefer-module': 'off',
|
|
93
103
|
'unicorn/prefer-negative-index': 'warn',
|
|
104
|
+
'unicorn/prefer-node-protocol': ['warn', {
|
|
105
|
+
checkRequire: false,
|
|
106
|
+
}],
|
|
94
107
|
'unicorn/prefer-number-properties': ['warn', {
|
|
95
108
|
checkInfinity: true,
|
|
96
109
|
}],
|
|
97
|
-
'unicorn/prefer-
|
|
98
|
-
|
|
110
|
+
'unicorn/prefer-object-from-entries': ['off', {
|
|
111
|
+
functions: [],
|
|
99
112
|
}],
|
|
100
113
|
'unicorn/prefer-object-has-own': 'off',
|
|
101
114
|
'unicorn/prefer-optional-catch-binding': 'warn',
|
|
@@ -114,11 +127,14 @@ module.exports = {
|
|
|
114
127
|
emptyDefaultCase: 'do-nothing-comment',
|
|
115
128
|
}],
|
|
116
129
|
'unicorn/prefer-ternary': 'off',
|
|
130
|
+
'unicorn/prefer-top-level-await': 'off',
|
|
117
131
|
'unicorn/prefer-type-error': 'warn',
|
|
118
|
-
'unicorn/prevent-abbreviations': ['warn', prevent_abbreviations_1.unicornPreventAbbreviations()],
|
|
132
|
+
'unicorn/prevent-abbreviations': ['warn', (0, prevent_abbreviations_1.unicornPreventAbbreviations)()],
|
|
119
133
|
'unicorn/require-array-join-separator': 'warn',
|
|
120
134
|
'unicorn/require-number-to-fixed-digits-argument': 'warn',
|
|
135
|
+
'unicorn/require-post-message-target-origin': 'error',
|
|
121
136
|
'unicorn/string-content': 'off',
|
|
137
|
+
'unicorn/template-indent': 'warn',
|
|
122
138
|
'unicorn/throw-new-error': 'warn',
|
|
123
139
|
},
|
|
124
140
|
};
|