@azat-io/eslint-config 2.10.0 → 2.11.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/dist/a11y/index.cjs +1 -0
- package/dist/a11y/index.mjs +1 -0
- package/dist/astro/index.cjs +1 -0
- package/dist/astro/index.mjs +1 -0
- package/dist/core/index.cjs +13 -7
- package/dist/core/index.mjs +13 -7
- package/dist/index.cjs +8 -2
- package/dist/index.mjs +8 -2
- package/dist/node/index.cjs +22 -21
- package/dist/node/index.mjs +22 -21
- package/dist/package-json/index.cjs +2 -0
- package/dist/package-json/index.mjs +2 -0
- package/dist/perfectionist/index.cjs +1 -0
- package/dist/perfectionist/index.mjs +1 -0
- package/dist/qwik/index.cjs +1 -0
- package/dist/qwik/index.mjs +1 -0
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.mjs +1 -0
- package/dist/svelte/index.cjs +1 -0
- package/dist/svelte/index.mjs +1 -0
- package/dist/typescript/index.cjs +87 -89
- package/dist/typescript/index.mjs +87 -89
- package/dist/vitest/index.cjs +1 -0
- package/dist/vitest/index.mjs +1 -0
- package/dist/vue/index.cjs +1 -0
- package/dist/vue/index.mjs +1 -0
- package/package.json +4 -4
package/dist/a11y/index.cjs
CHANGED
package/dist/a11y/index.mjs
CHANGED
package/dist/astro/index.cjs
CHANGED
package/dist/astro/index.mjs
CHANGED
package/dist/core/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ let core = (config) => {
|
|
|
31
31
|
files.push("**/*.vue");
|
|
32
32
|
}
|
|
33
33
|
return {
|
|
34
|
+
name: "azat-io/core/rules",
|
|
34
35
|
files,
|
|
35
36
|
languageOptions: {
|
|
36
37
|
globals: {
|
|
@@ -44,7 +45,7 @@ let core = (config) => {
|
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
47
|
plugins: {
|
|
47
|
-
"
|
|
48
|
+
"eslint-comments": eslintCommentsPlugin,
|
|
48
49
|
"import-x": importXPlugin,
|
|
49
50
|
jsdoc: jsdocPlugin,
|
|
50
51
|
"prefer-arrow": preferArrowPlugin,
|
|
@@ -112,6 +113,7 @@ let core = (config) => {
|
|
|
112
113
|
properties: true
|
|
113
114
|
}
|
|
114
115
|
],
|
|
116
|
+
"no-alert": "error",
|
|
115
117
|
"no-array-constructor": "error",
|
|
116
118
|
"no-async-promise-executor": "error",
|
|
117
119
|
"no-await-in-loop": "error",
|
|
@@ -159,6 +161,7 @@ let core = (config) => {
|
|
|
159
161
|
"no-global-assign": "error",
|
|
160
162
|
"no-implied-eval": "error",
|
|
161
163
|
"no-import-assign": "error",
|
|
164
|
+
"no-inline-comments": "error",
|
|
162
165
|
"no-invalid-regexp": "error",
|
|
163
166
|
"no-irregular-whitespace": [
|
|
164
167
|
"error",
|
|
@@ -179,6 +182,7 @@ let core = (config) => {
|
|
|
179
182
|
allowSwitch: false
|
|
180
183
|
}
|
|
181
184
|
],
|
|
185
|
+
"no-lone-blocks": "error",
|
|
182
186
|
"no-loop-func": "error",
|
|
183
187
|
"no-loss-of-precision": "error",
|
|
184
188
|
"no-multi-assign": "error",
|
|
@@ -213,6 +217,7 @@ let core = (config) => {
|
|
|
213
217
|
"no-sparse-arrays": "error",
|
|
214
218
|
"no-template-curly-in-string": "error",
|
|
215
219
|
"no-this-before-super": "error",
|
|
220
|
+
"no-throw-literal": "error",
|
|
216
221
|
"no-undef": "error",
|
|
217
222
|
"no-undef-init": "error",
|
|
218
223
|
"no-undefined": "error",
|
|
@@ -237,6 +242,7 @@ let core = (config) => {
|
|
|
237
242
|
allowTernary: true
|
|
238
243
|
}
|
|
239
244
|
],
|
|
245
|
+
"no-unused-labels": "error",
|
|
240
246
|
"no-unused-private-class-members": "error",
|
|
241
247
|
"no-unused-vars": [
|
|
242
248
|
"error",
|
|
@@ -311,12 +317,12 @@ let core = (config) => {
|
|
|
311
317
|
}
|
|
312
318
|
],
|
|
313
319
|
yoda: ["error", "never"],
|
|
314
|
-
"
|
|
315
|
-
"
|
|
316
|
-
"
|
|
317
|
-
"
|
|
318
|
-
"
|
|
319
|
-
"
|
|
320
|
+
"eslint-comments/disable-enable-pair": "error",
|
|
321
|
+
"eslint-comments/no-aggregating-enable": "error",
|
|
322
|
+
"eslint-comments/no-duplicate-disable": "error",
|
|
323
|
+
"eslint-comments/no-unlimited-disable": "error",
|
|
324
|
+
"eslint-comments/no-unused-disable": "error",
|
|
325
|
+
"eslint-comments/no-unused-enable": "error",
|
|
320
326
|
"import-x/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
321
327
|
"import-x/export": "error",
|
|
322
328
|
"import-x/first": "error",
|
package/dist/core/index.mjs
CHANGED
|
@@ -29,6 +29,7 @@ let core = (config) => {
|
|
|
29
29
|
files.push("**/*.vue");
|
|
30
30
|
}
|
|
31
31
|
return {
|
|
32
|
+
name: "azat-io/core/rules",
|
|
32
33
|
files,
|
|
33
34
|
languageOptions: {
|
|
34
35
|
globals: {
|
|
@@ -42,7 +43,7 @@ let core = (config) => {
|
|
|
42
43
|
}
|
|
43
44
|
},
|
|
44
45
|
plugins: {
|
|
45
|
-
"
|
|
46
|
+
"eslint-comments": eslintCommentsPlugin,
|
|
46
47
|
"import-x": importXPlugin,
|
|
47
48
|
jsdoc: jsdocPlugin,
|
|
48
49
|
"prefer-arrow": preferArrowPlugin,
|
|
@@ -110,6 +111,7 @@ let core = (config) => {
|
|
|
110
111
|
properties: true
|
|
111
112
|
}
|
|
112
113
|
],
|
|
114
|
+
"no-alert": "error",
|
|
113
115
|
"no-array-constructor": "error",
|
|
114
116
|
"no-async-promise-executor": "error",
|
|
115
117
|
"no-await-in-loop": "error",
|
|
@@ -157,6 +159,7 @@ let core = (config) => {
|
|
|
157
159
|
"no-global-assign": "error",
|
|
158
160
|
"no-implied-eval": "error",
|
|
159
161
|
"no-import-assign": "error",
|
|
162
|
+
"no-inline-comments": "error",
|
|
160
163
|
"no-invalid-regexp": "error",
|
|
161
164
|
"no-irregular-whitespace": [
|
|
162
165
|
"error",
|
|
@@ -177,6 +180,7 @@ let core = (config) => {
|
|
|
177
180
|
allowSwitch: false
|
|
178
181
|
}
|
|
179
182
|
],
|
|
183
|
+
"no-lone-blocks": "error",
|
|
180
184
|
"no-loop-func": "error",
|
|
181
185
|
"no-loss-of-precision": "error",
|
|
182
186
|
"no-multi-assign": "error",
|
|
@@ -211,6 +215,7 @@ let core = (config) => {
|
|
|
211
215
|
"no-sparse-arrays": "error",
|
|
212
216
|
"no-template-curly-in-string": "error",
|
|
213
217
|
"no-this-before-super": "error",
|
|
218
|
+
"no-throw-literal": "error",
|
|
214
219
|
"no-undef": "error",
|
|
215
220
|
"no-undef-init": "error",
|
|
216
221
|
"no-undefined": "error",
|
|
@@ -235,6 +240,7 @@ let core = (config) => {
|
|
|
235
240
|
allowTernary: true
|
|
236
241
|
}
|
|
237
242
|
],
|
|
243
|
+
"no-unused-labels": "error",
|
|
238
244
|
"no-unused-private-class-members": "error",
|
|
239
245
|
"no-unused-vars": [
|
|
240
246
|
"error",
|
|
@@ -309,12 +315,12 @@ let core = (config) => {
|
|
|
309
315
|
}
|
|
310
316
|
],
|
|
311
317
|
yoda: ["error", "never"],
|
|
312
|
-
"
|
|
313
|
-
"
|
|
314
|
-
"
|
|
315
|
-
"
|
|
316
|
-
"
|
|
317
|
-
"
|
|
318
|
+
"eslint-comments/disable-enable-pair": "error",
|
|
319
|
+
"eslint-comments/no-aggregating-enable": "error",
|
|
320
|
+
"eslint-comments/no-duplicate-disable": "error",
|
|
321
|
+
"eslint-comments/no-unlimited-disable": "error",
|
|
322
|
+
"eslint-comments/no-unused-disable": "error",
|
|
323
|
+
"eslint-comments/no-unused-enable": "error",
|
|
318
324
|
"import-x/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
319
325
|
"import-x/export": "error",
|
|
320
326
|
"import-x/first": "error",
|
package/dist/index.cjs
CHANGED
|
@@ -71,10 +71,16 @@ const index = async ({
|
|
|
71
71
|
"**/temp/**",
|
|
72
72
|
"**/.tmp/**",
|
|
73
73
|
"**/tmp/**"
|
|
74
|
-
]
|
|
74
|
+
],
|
|
75
|
+
name: "azat-io/core/ignores"
|
|
75
76
|
},
|
|
76
77
|
...configs,
|
|
77
|
-
...Array.isArray(customExtends) ? customExtends : [
|
|
78
|
+
...Array.isArray(customExtends) ? customExtends : [
|
|
79
|
+
{
|
|
80
|
+
name: "azat-io/custom-extends",
|
|
81
|
+
...customExtends
|
|
82
|
+
}
|
|
83
|
+
]
|
|
78
84
|
];
|
|
79
85
|
};
|
|
80
86
|
module.exports = index;
|
package/dist/index.mjs
CHANGED
|
@@ -70,10 +70,16 @@ const index = async ({
|
|
|
70
70
|
"**/temp/**",
|
|
71
71
|
"**/.tmp/**",
|
|
72
72
|
"**/tmp/**"
|
|
73
|
-
]
|
|
73
|
+
],
|
|
74
|
+
name: "azat-io/core/ignores"
|
|
74
75
|
},
|
|
75
76
|
...configs,
|
|
76
|
-
...Array.isArray(customExtends) ? customExtends : [
|
|
77
|
+
...Array.isArray(customExtends) ? customExtends : [
|
|
78
|
+
{
|
|
79
|
+
name: "azat-io/custom-extends",
|
|
80
|
+
...customExtends
|
|
81
|
+
}
|
|
82
|
+
]
|
|
77
83
|
];
|
|
78
84
|
};
|
|
79
85
|
export {
|
package/dist/node/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ let node = async (config) => {
|
|
|
23
23
|
if (!config.node) {
|
|
24
24
|
return {};
|
|
25
25
|
}
|
|
26
|
-
let
|
|
26
|
+
let nodePlugin = await utils.interopDefault(import("eslint-plugin-n"));
|
|
27
27
|
let files = ["**/*.js", "**/*.cjs", "**/*.mjs"];
|
|
28
28
|
if (config.typescript) {
|
|
29
29
|
files.push("**/*.ts", "**/*.cts", "**/*.mts");
|
|
@@ -44,30 +44,31 @@ let node = async (config) => {
|
|
|
44
44
|
files.push("**/*.vue");
|
|
45
45
|
}
|
|
46
46
|
return {
|
|
47
|
+
name: "azat-io/node/rules",
|
|
47
48
|
files,
|
|
48
49
|
plugins: {
|
|
49
|
-
|
|
50
|
+
node: nodePlugin
|
|
50
51
|
},
|
|
51
52
|
rules: {
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
53
|
+
"node/handle-callback-err": ["error", "error"],
|
|
54
|
+
"node/hashbang": "error",
|
|
55
|
+
"node/no-deprecated-api": "error",
|
|
56
|
+
"node/no-exports-assign": "error",
|
|
57
|
+
"node/no-extraneous-require": "error",
|
|
58
|
+
"node/no-new-require": "error",
|
|
59
|
+
"node/no-path-concat": "error",
|
|
60
|
+
"node/no-unpublished-bin": "error",
|
|
61
|
+
"node/no-unsupported-features/es-builtins": "error",
|
|
62
|
+
"node/prefer-global/buffer": ["error", "always"],
|
|
63
|
+
"node/prefer-global/console": ["error", "always"],
|
|
64
|
+
"node/prefer-global/process": ["error", "always"],
|
|
65
|
+
"node/prefer-global/text-decoder": ["error", "always"],
|
|
66
|
+
"node/prefer-global/text-encoder": ["error", "always"],
|
|
67
|
+
"node/prefer-global/url": ["error", "always"],
|
|
68
|
+
"node/prefer-global/url-search-params": ["error", "always"],
|
|
69
|
+
"node/prefer-node-protocol": "error",
|
|
70
|
+
"node/prefer-promises/fs": "error",
|
|
71
|
+
"node/process-exit-as-throw": "error"
|
|
71
72
|
}
|
|
72
73
|
};
|
|
73
74
|
};
|
package/dist/node/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ let node = async (config) => {
|
|
|
3
3
|
if (!config.node) {
|
|
4
4
|
return {};
|
|
5
5
|
}
|
|
6
|
-
let
|
|
6
|
+
let nodePlugin = await interopDefault(import("eslint-plugin-n"));
|
|
7
7
|
let files = ["**/*.js", "**/*.cjs", "**/*.mjs"];
|
|
8
8
|
if (config.typescript) {
|
|
9
9
|
files.push("**/*.ts", "**/*.cts", "**/*.mts");
|
|
@@ -24,30 +24,31 @@ let node = async (config) => {
|
|
|
24
24
|
files.push("**/*.vue");
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
|
+
name: "azat-io/node/rules",
|
|
27
28
|
files,
|
|
28
29
|
plugins: {
|
|
29
|
-
|
|
30
|
+
node: nodePlugin
|
|
30
31
|
},
|
|
31
32
|
rules: {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
33
|
+
"node/handle-callback-err": ["error", "error"],
|
|
34
|
+
"node/hashbang": "error",
|
|
35
|
+
"node/no-deprecated-api": "error",
|
|
36
|
+
"node/no-exports-assign": "error",
|
|
37
|
+
"node/no-extraneous-require": "error",
|
|
38
|
+
"node/no-new-require": "error",
|
|
39
|
+
"node/no-path-concat": "error",
|
|
40
|
+
"node/no-unpublished-bin": "error",
|
|
41
|
+
"node/no-unsupported-features/es-builtins": "error",
|
|
42
|
+
"node/prefer-global/buffer": ["error", "always"],
|
|
43
|
+
"node/prefer-global/console": ["error", "always"],
|
|
44
|
+
"node/prefer-global/process": ["error", "always"],
|
|
45
|
+
"node/prefer-global/text-decoder": ["error", "always"],
|
|
46
|
+
"node/prefer-global/text-encoder": ["error", "always"],
|
|
47
|
+
"node/prefer-global/url": ["error", "always"],
|
|
48
|
+
"node/prefer-global/url-search-params": ["error", "always"],
|
|
49
|
+
"node/prefer-node-protocol": "error",
|
|
50
|
+
"node/prefer-promises/fs": "error",
|
|
51
|
+
"node/process-exit-as-throw": "error"
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
54
|
};
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const packageJsonPlugin = require("eslint-plugin-package-json");
|
|
4
4
|
const jsoncParser = require("jsonc-eslint-parser");
|
|
5
5
|
let packageJson = (_config) => ({
|
|
6
|
+
name: "azat-io/package-json/rules",
|
|
6
7
|
files: ["**/package.json"],
|
|
7
8
|
plugins: {
|
|
8
9
|
"package-json": packageJsonPlugin
|
|
@@ -11,6 +12,7 @@ let packageJson = (_config) => ({
|
|
|
11
12
|
parser: jsoncParser
|
|
12
13
|
},
|
|
13
14
|
rules: {
|
|
15
|
+
"package-json/no-redundant-files": "error",
|
|
14
16
|
"package-json/order-properties": [
|
|
15
17
|
"error",
|
|
16
18
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import packageJsonPlugin from "eslint-plugin-package-json";
|
|
2
2
|
import jsoncParser from "jsonc-eslint-parser";
|
|
3
3
|
let packageJson = (_config) => ({
|
|
4
|
+
name: "azat-io/package-json/rules",
|
|
4
5
|
files: ["**/package.json"],
|
|
5
6
|
plugins: {
|
|
6
7
|
"package-json": packageJsonPlugin
|
|
@@ -9,6 +10,7 @@ let packageJson = (_config) => ({
|
|
|
9
10
|
parser: jsoncParser
|
|
10
11
|
},
|
|
11
12
|
rules: {
|
|
13
|
+
"package-json/no-redundant-files": "error",
|
|
12
14
|
"package-json/order-properties": [
|
|
13
15
|
"error",
|
|
14
16
|
{
|
package/dist/qwik/index.cjs
CHANGED
package/dist/qwik/index.mjs
CHANGED
package/dist/react/index.cjs
CHANGED
package/dist/react/index.mjs
CHANGED
package/dist/svelte/index.cjs
CHANGED
package/dist/svelte/index.mjs
CHANGED
|
@@ -38,6 +38,7 @@ let typescript = async (config) => {
|
|
|
38
38
|
files.push("**/*.vue");
|
|
39
39
|
}
|
|
40
40
|
return {
|
|
41
|
+
name: "azat-io/typescript/rules",
|
|
41
42
|
files,
|
|
42
43
|
languageOptions: {
|
|
43
44
|
parser: typescriptParser,
|
|
@@ -52,30 +53,27 @@ let typescript = async (config) => {
|
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
55
|
plugins: {
|
|
55
|
-
|
|
56
|
+
typescript: typescriptPlugin
|
|
56
57
|
},
|
|
57
58
|
rules: {
|
|
58
|
-
"
|
|
59
|
+
"typescript/array-type": [
|
|
59
60
|
"error",
|
|
60
61
|
{
|
|
61
62
|
default: "array",
|
|
62
63
|
readonly: "array"
|
|
63
64
|
}
|
|
64
65
|
],
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"@typescript-eslint/default-param-last": "error",
|
|
77
|
-
"@typescript-eslint/dot-notation": "error",
|
|
78
|
-
"@typescript-eslint/explicit-function-return-type": [
|
|
66
|
+
"typescript/await-thenable": "error",
|
|
67
|
+
"typescript/class-literal-property-style": "error",
|
|
68
|
+
"typescript/class-methods-use-this": "error",
|
|
69
|
+
"typescript/consistent-generic-constructors": ["error", "constructor"],
|
|
70
|
+
"typescript/consistent-indexed-object-style": ["error", "record"],
|
|
71
|
+
"typescript/consistent-type-definitions": "error",
|
|
72
|
+
"typescript/consistent-type-exports": "error",
|
|
73
|
+
"typescript/consistent-type-imports": "error",
|
|
74
|
+
"typescript/default-param-last": "error",
|
|
75
|
+
"typescript/dot-notation": "error",
|
|
76
|
+
"typescript/explicit-function-return-type": [
|
|
79
77
|
"error",
|
|
80
78
|
{
|
|
81
79
|
allowedNames: config.astro ? ["getStaticPaths"] : [],
|
|
@@ -84,21 +82,21 @@ let typescript = async (config) => {
|
|
|
84
82
|
allowIIFEs: true
|
|
85
83
|
}
|
|
86
84
|
],
|
|
87
|
-
"
|
|
88
|
-
"
|
|
85
|
+
"typescript/explicit-member-accessibility": "error",
|
|
86
|
+
"typescript/explicit-module-boundary-types": [
|
|
89
87
|
"error",
|
|
90
88
|
{
|
|
91
89
|
allowedNames: config.astro ? ["getStaticPaths"] : []
|
|
92
90
|
}
|
|
93
91
|
],
|
|
94
|
-
"
|
|
92
|
+
"typescript/max-params": [
|
|
95
93
|
"error",
|
|
96
94
|
{
|
|
97
95
|
max: 3
|
|
98
96
|
}
|
|
99
97
|
],
|
|
100
|
-
"
|
|
101
|
-
"
|
|
98
|
+
"typescript/method-signature-style": ["error", "method"],
|
|
99
|
+
"typescript/naming-convention": [
|
|
102
100
|
"error",
|
|
103
101
|
{
|
|
104
102
|
format: ["camelCase", "PascalCase", "UPPER_CASE"],
|
|
@@ -114,15 +112,15 @@ let typescript = async (config) => {
|
|
|
114
112
|
selector: "typeLike"
|
|
115
113
|
}
|
|
116
114
|
],
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
115
|
+
"typescript/no-array-constructor": "error",
|
|
116
|
+
"typescript/no-array-delete": "error",
|
|
117
|
+
"typescript/no-base-to-string": "error",
|
|
118
|
+
"typescript/no-duplicate-enum-values": "error",
|
|
119
|
+
"typescript/no-duplicate-type-constituents": "error",
|
|
120
|
+
"typescript/no-empty-object-type": "error",
|
|
121
|
+
"typescript/no-explicit-any": "error",
|
|
122
|
+
"typescript/no-extra-non-null-assertion": "error",
|
|
123
|
+
"typescript/no-floating-promises": [
|
|
126
124
|
"error",
|
|
127
125
|
{
|
|
128
126
|
allowForKnownSafeCalls: [
|
|
@@ -137,47 +135,46 @@ let typescript = async (config) => {
|
|
|
137
135
|
ignoreVoid: true
|
|
138
136
|
}
|
|
139
137
|
],
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
138
|
+
"typescript/no-for-in-array": "error",
|
|
139
|
+
"typescript/no-implied-eval": "error",
|
|
140
|
+
"typescript/no-import-type-side-effects": "error",
|
|
141
|
+
"typescript/no-invalid-void-type": "error",
|
|
142
|
+
"typescript/no-loop-func": "error",
|
|
143
|
+
"typescript/no-meaningless-void-operator": "error",
|
|
144
|
+
"typescript/no-misused-new": "error",
|
|
145
|
+
"typescript/no-misused-promises": [
|
|
148
146
|
"error",
|
|
149
147
|
{
|
|
150
148
|
checksVoidReturn: false
|
|
151
149
|
}
|
|
152
150
|
],
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"@typescript-eslint/no-unsafe-assignment": (
|
|
151
|
+
"typescript/no-mixed-enums": "error",
|
|
152
|
+
"typescript/no-namespace": "error",
|
|
153
|
+
"typescript/no-non-null-asserted-nullish-coalescing": "error",
|
|
154
|
+
"typescript/no-non-null-asserted-optional-chain": "error",
|
|
155
|
+
"typescript/no-require-imports": "error",
|
|
156
|
+
"typescript/no-shadow": "error",
|
|
157
|
+
"typescript/no-this-alias": "error",
|
|
158
|
+
"typescript/no-unnecessary-boolean-literal-compare": "error",
|
|
159
|
+
"typescript/no-unnecessary-condition": "error",
|
|
160
|
+
"typescript/no-unnecessary-parameter-property-assignment": "error",
|
|
161
|
+
"typescript/no-unnecessary-qualifier": "error",
|
|
162
|
+
"typescript/no-unnecessary-template-expression": "error",
|
|
163
|
+
"typescript/no-unnecessary-type-arguments": "error",
|
|
164
|
+
"typescript/no-unnecessary-type-assertion": "error",
|
|
165
|
+
"typescript/no-unnecessary-type-constraint": "error",
|
|
166
|
+
"typescript/no-unnecessary-type-parameters": "error",
|
|
167
|
+
"typescript/no-unsafe-argument": "error",
|
|
168
|
+
"typescript/no-unsafe-assignment": (
|
|
172
169
|
config.astro ? "off" : "error"
|
|
173
170
|
),
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"
|
|
171
|
+
"typescript/no-unsafe-call": "error",
|
|
172
|
+
"typescript/no-unsafe-declaration-merging": "error",
|
|
173
|
+
"typescript/no-unsafe-function-type": "error",
|
|
174
|
+
"typescript/no-unsafe-member-access": "error",
|
|
175
|
+
"typescript/no-unsafe-return": "error",
|
|
176
|
+
"typescript/no-unsafe-unary-minus": "error",
|
|
177
|
+
"typescript/no-unused-expressions": [
|
|
181
178
|
"error",
|
|
182
179
|
{
|
|
183
180
|
allowShortCircuit: true,
|
|
@@ -185,7 +182,7 @@ let typescript = async (config) => {
|
|
|
185
182
|
allowTernary: true
|
|
186
183
|
}
|
|
187
184
|
],
|
|
188
|
-
"
|
|
185
|
+
"typescript/no-unused-vars": [
|
|
189
186
|
"error",
|
|
190
187
|
{
|
|
191
188
|
argsIgnorePattern: "^_",
|
|
@@ -194,7 +191,7 @@ let typescript = async (config) => {
|
|
|
194
191
|
varsIgnorePattern: "^_"
|
|
195
192
|
}
|
|
196
193
|
],
|
|
197
|
-
"
|
|
194
|
+
"typescript/no-use-before-define": [
|
|
198
195
|
"error",
|
|
199
196
|
{
|
|
200
197
|
classes: false,
|
|
@@ -202,29 +199,30 @@ let typescript = async (config) => {
|
|
|
202
199
|
variables: false
|
|
203
200
|
}
|
|
204
201
|
],
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
"
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"
|
|
211
|
-
"
|
|
212
|
-
"
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"
|
|
217
|
-
"
|
|
218
|
-
"
|
|
219
|
-
"
|
|
220
|
-
"
|
|
221
|
-
"
|
|
222
|
-
"
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"
|
|
227
|
-
"
|
|
202
|
+
"typescript/no-useless-constructor": "error",
|
|
203
|
+
"typescript/no-useless-empty-export": "error",
|
|
204
|
+
"typescript/no-wrapper-object-types": "error",
|
|
205
|
+
"typescript/non-nullable-type-assertion-style": "error",
|
|
206
|
+
"typescript/only-throw-error": "error",
|
|
207
|
+
"typescript/prefer-as-const": "error",
|
|
208
|
+
"typescript/prefer-destructuring": "error",
|
|
209
|
+
"typescript/prefer-enum-initializers": "error",
|
|
210
|
+
"typescript/prefer-for-of": "error",
|
|
211
|
+
"typescript/prefer-function-type": "error",
|
|
212
|
+
"typescript/prefer-literal-enum-member": "error",
|
|
213
|
+
"typescript/prefer-nullish-coalescing": "error",
|
|
214
|
+
"typescript/prefer-optional-chain": "error",
|
|
215
|
+
"typescript/prefer-promise-reject-errors": "error",
|
|
216
|
+
"typescript/prefer-readonly": "error",
|
|
217
|
+
"typescript/prefer-reduce-type-parameter": "error",
|
|
218
|
+
"typescript/prefer-return-this-type": "error",
|
|
219
|
+
"typescript/related-getter-setter-pairs": "error",
|
|
220
|
+
"typescript/require-array-sort-compare": "error",
|
|
221
|
+
"typescript/require-await": "error",
|
|
222
|
+
"typescript/restrict-plus-operands": "error",
|
|
223
|
+
"typescript/restrict-template-expressions": "error",
|
|
224
|
+
"typescript/triple-slash-reference": config.astro ? "off" : "error",
|
|
225
|
+
"typescript/unified-signatures": "error",
|
|
228
226
|
"class-methods-use-this": "off",
|
|
229
227
|
"consistent-return": "off",
|
|
230
228
|
"default-param-last": "off",
|
|
@@ -18,6 +18,7 @@ let typescript = async (config) => {
|
|
|
18
18
|
files.push("**/*.vue");
|
|
19
19
|
}
|
|
20
20
|
return {
|
|
21
|
+
name: "azat-io/typescript/rules",
|
|
21
22
|
files,
|
|
22
23
|
languageOptions: {
|
|
23
24
|
parser: typescriptParser,
|
|
@@ -32,30 +33,27 @@ let typescript = async (config) => {
|
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
35
|
plugins: {
|
|
35
|
-
|
|
36
|
+
typescript: typescriptPlugin
|
|
36
37
|
},
|
|
37
38
|
rules: {
|
|
38
|
-
"
|
|
39
|
+
"typescript/array-type": [
|
|
39
40
|
"error",
|
|
40
41
|
{
|
|
41
42
|
default: "array",
|
|
42
43
|
readonly: "array"
|
|
43
44
|
}
|
|
44
45
|
],
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"@typescript-eslint/default-param-last": "error",
|
|
57
|
-
"@typescript-eslint/dot-notation": "error",
|
|
58
|
-
"@typescript-eslint/explicit-function-return-type": [
|
|
46
|
+
"typescript/await-thenable": "error",
|
|
47
|
+
"typescript/class-literal-property-style": "error",
|
|
48
|
+
"typescript/class-methods-use-this": "error",
|
|
49
|
+
"typescript/consistent-generic-constructors": ["error", "constructor"],
|
|
50
|
+
"typescript/consistent-indexed-object-style": ["error", "record"],
|
|
51
|
+
"typescript/consistent-type-definitions": "error",
|
|
52
|
+
"typescript/consistent-type-exports": "error",
|
|
53
|
+
"typescript/consistent-type-imports": "error",
|
|
54
|
+
"typescript/default-param-last": "error",
|
|
55
|
+
"typescript/dot-notation": "error",
|
|
56
|
+
"typescript/explicit-function-return-type": [
|
|
59
57
|
"error",
|
|
60
58
|
{
|
|
61
59
|
allowedNames: config.astro ? ["getStaticPaths"] : [],
|
|
@@ -64,21 +62,21 @@ let typescript = async (config) => {
|
|
|
64
62
|
allowIIFEs: true
|
|
65
63
|
}
|
|
66
64
|
],
|
|
67
|
-
"
|
|
68
|
-
"
|
|
65
|
+
"typescript/explicit-member-accessibility": "error",
|
|
66
|
+
"typescript/explicit-module-boundary-types": [
|
|
69
67
|
"error",
|
|
70
68
|
{
|
|
71
69
|
allowedNames: config.astro ? ["getStaticPaths"] : []
|
|
72
70
|
}
|
|
73
71
|
],
|
|
74
|
-
"
|
|
72
|
+
"typescript/max-params": [
|
|
75
73
|
"error",
|
|
76
74
|
{
|
|
77
75
|
max: 3
|
|
78
76
|
}
|
|
79
77
|
],
|
|
80
|
-
"
|
|
81
|
-
"
|
|
78
|
+
"typescript/method-signature-style": ["error", "method"],
|
|
79
|
+
"typescript/naming-convention": [
|
|
82
80
|
"error",
|
|
83
81
|
{
|
|
84
82
|
format: ["camelCase", "PascalCase", "UPPER_CASE"],
|
|
@@ -94,15 +92,15 @@ let typescript = async (config) => {
|
|
|
94
92
|
selector: "typeLike"
|
|
95
93
|
}
|
|
96
94
|
],
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
95
|
+
"typescript/no-array-constructor": "error",
|
|
96
|
+
"typescript/no-array-delete": "error",
|
|
97
|
+
"typescript/no-base-to-string": "error",
|
|
98
|
+
"typescript/no-duplicate-enum-values": "error",
|
|
99
|
+
"typescript/no-duplicate-type-constituents": "error",
|
|
100
|
+
"typescript/no-empty-object-type": "error",
|
|
101
|
+
"typescript/no-explicit-any": "error",
|
|
102
|
+
"typescript/no-extra-non-null-assertion": "error",
|
|
103
|
+
"typescript/no-floating-promises": [
|
|
106
104
|
"error",
|
|
107
105
|
{
|
|
108
106
|
allowForKnownSafeCalls: [
|
|
@@ -117,47 +115,46 @@ let typescript = async (config) => {
|
|
|
117
115
|
ignoreVoid: true
|
|
118
116
|
}
|
|
119
117
|
],
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
118
|
+
"typescript/no-for-in-array": "error",
|
|
119
|
+
"typescript/no-implied-eval": "error",
|
|
120
|
+
"typescript/no-import-type-side-effects": "error",
|
|
121
|
+
"typescript/no-invalid-void-type": "error",
|
|
122
|
+
"typescript/no-loop-func": "error",
|
|
123
|
+
"typescript/no-meaningless-void-operator": "error",
|
|
124
|
+
"typescript/no-misused-new": "error",
|
|
125
|
+
"typescript/no-misused-promises": [
|
|
128
126
|
"error",
|
|
129
127
|
{
|
|
130
128
|
checksVoidReturn: false
|
|
131
129
|
}
|
|
132
130
|
],
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"@typescript-eslint/no-unsafe-assignment": (
|
|
131
|
+
"typescript/no-mixed-enums": "error",
|
|
132
|
+
"typescript/no-namespace": "error",
|
|
133
|
+
"typescript/no-non-null-asserted-nullish-coalescing": "error",
|
|
134
|
+
"typescript/no-non-null-asserted-optional-chain": "error",
|
|
135
|
+
"typescript/no-require-imports": "error",
|
|
136
|
+
"typescript/no-shadow": "error",
|
|
137
|
+
"typescript/no-this-alias": "error",
|
|
138
|
+
"typescript/no-unnecessary-boolean-literal-compare": "error",
|
|
139
|
+
"typescript/no-unnecessary-condition": "error",
|
|
140
|
+
"typescript/no-unnecessary-parameter-property-assignment": "error",
|
|
141
|
+
"typescript/no-unnecessary-qualifier": "error",
|
|
142
|
+
"typescript/no-unnecessary-template-expression": "error",
|
|
143
|
+
"typescript/no-unnecessary-type-arguments": "error",
|
|
144
|
+
"typescript/no-unnecessary-type-assertion": "error",
|
|
145
|
+
"typescript/no-unnecessary-type-constraint": "error",
|
|
146
|
+
"typescript/no-unnecessary-type-parameters": "error",
|
|
147
|
+
"typescript/no-unsafe-argument": "error",
|
|
148
|
+
"typescript/no-unsafe-assignment": (
|
|
152
149
|
config.astro ? "off" : "error"
|
|
153
150
|
),
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
151
|
+
"typescript/no-unsafe-call": "error",
|
|
152
|
+
"typescript/no-unsafe-declaration-merging": "error",
|
|
153
|
+
"typescript/no-unsafe-function-type": "error",
|
|
154
|
+
"typescript/no-unsafe-member-access": "error",
|
|
155
|
+
"typescript/no-unsafe-return": "error",
|
|
156
|
+
"typescript/no-unsafe-unary-minus": "error",
|
|
157
|
+
"typescript/no-unused-expressions": [
|
|
161
158
|
"error",
|
|
162
159
|
{
|
|
163
160
|
allowShortCircuit: true,
|
|
@@ -165,7 +162,7 @@ let typescript = async (config) => {
|
|
|
165
162
|
allowTernary: true
|
|
166
163
|
}
|
|
167
164
|
],
|
|
168
|
-
"
|
|
165
|
+
"typescript/no-unused-vars": [
|
|
169
166
|
"error",
|
|
170
167
|
{
|
|
171
168
|
argsIgnorePattern: "^_",
|
|
@@ -174,7 +171,7 @@ let typescript = async (config) => {
|
|
|
174
171
|
varsIgnorePattern: "^_"
|
|
175
172
|
}
|
|
176
173
|
],
|
|
177
|
-
"
|
|
174
|
+
"typescript/no-use-before-define": [
|
|
178
175
|
"error",
|
|
179
176
|
{
|
|
180
177
|
classes: false,
|
|
@@ -182,29 +179,30 @@ let typescript = async (config) => {
|
|
|
182
179
|
variables: false
|
|
183
180
|
}
|
|
184
181
|
],
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
"
|
|
182
|
+
"typescript/no-useless-constructor": "error",
|
|
183
|
+
"typescript/no-useless-empty-export": "error",
|
|
184
|
+
"typescript/no-wrapper-object-types": "error",
|
|
185
|
+
"typescript/non-nullable-type-assertion-style": "error",
|
|
186
|
+
"typescript/only-throw-error": "error",
|
|
187
|
+
"typescript/prefer-as-const": "error",
|
|
188
|
+
"typescript/prefer-destructuring": "error",
|
|
189
|
+
"typescript/prefer-enum-initializers": "error",
|
|
190
|
+
"typescript/prefer-for-of": "error",
|
|
191
|
+
"typescript/prefer-function-type": "error",
|
|
192
|
+
"typescript/prefer-literal-enum-member": "error",
|
|
193
|
+
"typescript/prefer-nullish-coalescing": "error",
|
|
194
|
+
"typescript/prefer-optional-chain": "error",
|
|
195
|
+
"typescript/prefer-promise-reject-errors": "error",
|
|
196
|
+
"typescript/prefer-readonly": "error",
|
|
197
|
+
"typescript/prefer-reduce-type-parameter": "error",
|
|
198
|
+
"typescript/prefer-return-this-type": "error",
|
|
199
|
+
"typescript/related-getter-setter-pairs": "error",
|
|
200
|
+
"typescript/require-array-sort-compare": "error",
|
|
201
|
+
"typescript/require-await": "error",
|
|
202
|
+
"typescript/restrict-plus-operands": "error",
|
|
203
|
+
"typescript/restrict-template-expressions": "error",
|
|
204
|
+
"typescript/triple-slash-reference": config.astro ? "off" : "error",
|
|
205
|
+
"typescript/unified-signatures": "error",
|
|
208
206
|
"class-methods-use-this": "off",
|
|
209
207
|
"consistent-return": "off",
|
|
210
208
|
"default-param-last": "off",
|
package/dist/vitest/index.cjs
CHANGED
package/dist/vitest/index.mjs
CHANGED
package/dist/vue/index.cjs
CHANGED
package/dist/vue/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azat-io/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "ESLint shareable config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"eslint-import-resolver-typescript": "^3.7.0",
|
|
34
34
|
"eslint-plugin-astro": "^1.3.1",
|
|
35
35
|
"eslint-plugin-import-x": "^4.6.1",
|
|
36
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
36
|
+
"eslint-plugin-jsdoc": "^50.6.2",
|
|
37
37
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
38
38
|
"eslint-plugin-n": "^17.15.1",
|
|
39
|
-
"eslint-plugin-package-json": "^0.
|
|
39
|
+
"eslint-plugin-package-json": "^0.20.1",
|
|
40
40
|
"eslint-plugin-perfectionist": "^4.6.0",
|
|
41
41
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
42
42
|
"eslint-plugin-prefer-let": "^4.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"globals": "^15.14.0",
|
|
55
55
|
"jsonc-eslint-parser": "^2.4.0",
|
|
56
56
|
"svelte-eslint-parser": "^0.43.0",
|
|
57
|
-
"typescript-eslint": "^8.
|
|
57
|
+
"typescript-eslint": "^8.21.0",
|
|
58
58
|
"vue-eslint-parser": "^9.4.3"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|