@azat-io/eslint-config 2.96.0 → 2.97.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.js +3 -1
- package/dist/core/index.js +15 -17
- package/dist/node/index.js +14 -14
- package/dist/perfectionist/index.js +14 -14
- package/dist/qwik/index.js +3 -1
- package/dist/react/index.js +4 -1
- package/dist/typescript/index.js +10 -9
- package/dist/vitest/index.js +14 -21
- package/package.json +13 -13
package/dist/a11y/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
2
2
|
function a11y(config) {
|
|
3
3
|
if (!config.react && !config.qwik) return {};
|
|
4
|
+
let files = ["**/*.jsx"];
|
|
5
|
+
if (config.typescript) files.push("**/*.tsx");
|
|
4
6
|
return {
|
|
5
7
|
name: "azat-io/a11y/rules",
|
|
6
|
-
files
|
|
8
|
+
files,
|
|
7
9
|
plugins: { "jsx-a11y": jsxA11y },
|
|
8
10
|
rules: {
|
|
9
11
|
"jsx-a11y/alt-text": "error",
|
package/dist/core/index.js
CHANGED
|
@@ -10,22 +10,22 @@ import jsdocPlugin from "eslint-plugin-jsdoc";
|
|
|
10
10
|
import slopPlugin from "eslint-plugin-slop";
|
|
11
11
|
import globals from "globals";
|
|
12
12
|
function core(config) {
|
|
13
|
+
let files = [
|
|
14
|
+
"**/*.js",
|
|
15
|
+
"**/*.cjs",
|
|
16
|
+
"**/*.mjs"
|
|
17
|
+
];
|
|
18
|
+
if (config.typescript) files.push("**/*.ts", "**/*.cts", "**/*.mts");
|
|
19
|
+
if (config.react || config.qwik) {
|
|
20
|
+
files.push("**/*.jsx");
|
|
21
|
+
if (config.typescript) files.push("**/*.tsx");
|
|
22
|
+
}
|
|
23
|
+
if (config.astro) files.push("**/*.astro");
|
|
24
|
+
if (config.svelte) files.push("**/*.svelte");
|
|
25
|
+
if (config.vue) files.push("**/*.vue");
|
|
13
26
|
return {
|
|
14
27
|
name: "azat-io/core/rules",
|
|
15
|
-
files
|
|
16
|
-
"**/*.js",
|
|
17
|
-
"**/*.cjs",
|
|
18
|
-
"**/*.mjs",
|
|
19
|
-
...config.typescript ? [
|
|
20
|
-
"**/*.ts",
|
|
21
|
-
"**/*.cts",
|
|
22
|
-
"**/*.mts"
|
|
23
|
-
] : [],
|
|
24
|
-
...config.react || config.qwik ? ["**/*.jsx", ...config.typescript ? ["**/*.tsx"] : []] : [],
|
|
25
|
-
...config.astro ? ["**/*.astro"] : [],
|
|
26
|
-
...config.svelte ? ["**/*.svelte"] : [],
|
|
27
|
-
...config.vue ? ["**/*.vue"] : []
|
|
28
|
-
],
|
|
28
|
+
files,
|
|
29
29
|
languageOptions: {
|
|
30
30
|
globals: {
|
|
31
31
|
...globals.browser,
|
|
@@ -502,7 +502,7 @@ function core(config) {
|
|
|
502
502
|
"unicorn/no-exports-in-scripts": "error",
|
|
503
503
|
"unicorn/no-for-each": "error",
|
|
504
504
|
"unicorn/no-for-loop": "error",
|
|
505
|
-
"unicorn/no-immediate-mutation": "error",
|
|
505
|
+
"unicorn/no-immediate-mutation": ["error", { checkConditionals: false }],
|
|
506
506
|
"unicorn/no-impossible-length-comparison": "error",
|
|
507
507
|
"unicorn/no-incorrect-query-selector": "error",
|
|
508
508
|
"unicorn/no-instanceof-builtins": "error",
|
|
@@ -551,7 +551,6 @@ function core(config) {
|
|
|
551
551
|
"unicorn/no-unsafe-buffer-conversion": "error",
|
|
552
552
|
"unicorn/no-unsafe-dom-html": "error",
|
|
553
553
|
"unicorn/no-unsafe-promise-all-settled-values": "error",
|
|
554
|
-
"unicorn/no-unused-array-method-return": "error",
|
|
555
554
|
"unicorn/no-unused-builtin-method-return": "error",
|
|
556
555
|
"unicorn/no-unused-iterator-helper": "error",
|
|
557
556
|
"unicorn/no-unused-properties": "error",
|
|
@@ -600,7 +599,6 @@ function core(config) {
|
|
|
600
599
|
"unicorn/prefer-boolean-return": "error",
|
|
601
600
|
"unicorn/prefer-class-fields": "error",
|
|
602
601
|
"unicorn/prefer-classlist-toggle": "error",
|
|
603
|
-
"unicorn/prefer-combined-guards": "error",
|
|
604
602
|
"unicorn/prefer-date-now": "error",
|
|
605
603
|
"unicorn/prefer-default-parameters": "error",
|
|
606
604
|
"unicorn/prefer-direct-iteration": "error",
|
package/dist/node/index.js
CHANGED
|
@@ -2,22 +2,22 @@ import { interopDefault } from "../utilities.js";
|
|
|
2
2
|
async function node(config) {
|
|
3
3
|
if (!config.node) return {};
|
|
4
4
|
let nodePlugin = await interopDefault(import("eslint-plugin-n"));
|
|
5
|
+
let files = [
|
|
6
|
+
"**/*.js",
|
|
7
|
+
"**/*.cjs",
|
|
8
|
+
"**/*.mjs"
|
|
9
|
+
];
|
|
10
|
+
if (config.typescript) files.push("**/*.ts", "**/*.cts", "**/*.mts");
|
|
11
|
+
if (config.react || config.qwik) {
|
|
12
|
+
files.push("**/*.jsx");
|
|
13
|
+
if (config.typescript) files.push("**/*.tsx");
|
|
14
|
+
}
|
|
15
|
+
if (config.astro) files.push("**/*.astro");
|
|
16
|
+
if (config.svelte) files.push("**/*.svelte");
|
|
17
|
+
if (config.vue) files.push("**/*.vue");
|
|
5
18
|
return {
|
|
6
19
|
name: "azat-io/node/rules",
|
|
7
|
-
files
|
|
8
|
-
"**/*.js",
|
|
9
|
-
"**/*.cjs",
|
|
10
|
-
"**/*.mjs",
|
|
11
|
-
...config.typescript ? [
|
|
12
|
-
"**/*.ts",
|
|
13
|
-
"**/*.cts",
|
|
14
|
-
"**/*.mts"
|
|
15
|
-
] : [],
|
|
16
|
-
...config.react || config.qwik ? ["**/*.jsx", ...config.typescript ? ["**/*.tsx"] : []] : [],
|
|
17
|
-
...config.astro ? ["**/*.astro"] : [],
|
|
18
|
-
...config.svelte ? ["**/*.svelte"] : [],
|
|
19
|
-
...config.vue ? ["**/*.vue"] : []
|
|
20
|
-
],
|
|
20
|
+
files,
|
|
21
21
|
plugins: { node: nodePlugin },
|
|
22
22
|
rules: {
|
|
23
23
|
"node/handle-callback-err": ["error", "error"],
|
|
@@ -2,22 +2,22 @@ import { interopDefault } from "../utilities.js";
|
|
|
2
2
|
async function perfectionist(config) {
|
|
3
3
|
if (!config.perfectionist) return {};
|
|
4
4
|
let perfectionistPlugin = await interopDefault(import("eslint-plugin-perfectionist"));
|
|
5
|
+
let files = [
|
|
6
|
+
"**/*.js",
|
|
7
|
+
"**/*.cjs",
|
|
8
|
+
"**/*.mjs"
|
|
9
|
+
];
|
|
10
|
+
if (config.typescript) files.push("**/*.ts", "**/*.cts", "**/*.mts");
|
|
11
|
+
if (config.react || config.qwik) {
|
|
12
|
+
files.push("**/*.jsx");
|
|
13
|
+
if (config.typescript) files.push("**/*.tsx");
|
|
14
|
+
}
|
|
15
|
+
if (config.astro) files.push("**/*.astro");
|
|
16
|
+
if (config.svelte) files.push("**/*.svelte");
|
|
17
|
+
if (config.vue) files.push("**/*.vue");
|
|
5
18
|
return {
|
|
6
19
|
name: "azat-io/perfectionist/rules",
|
|
7
|
-
files
|
|
8
|
-
"**/*.js",
|
|
9
|
-
"**/*.cjs",
|
|
10
|
-
"**/*.mjs",
|
|
11
|
-
...config.typescript ? [
|
|
12
|
-
"**/*.ts",
|
|
13
|
-
"**/*.cts",
|
|
14
|
-
"**/*.mts"
|
|
15
|
-
] : [],
|
|
16
|
-
...config.react || config.qwik ? ["**/*.jsx", ...config.typescript ? ["**/*.tsx"] : []] : [],
|
|
17
|
-
...config.astro ? ["**/*.astro"] : [],
|
|
18
|
-
...config.svelte ? ["**/*.svelte"] : [],
|
|
19
|
-
...config.vue ? ["**/*.vue"] : []
|
|
20
|
-
],
|
|
20
|
+
files,
|
|
21
21
|
plugins: { perfectionist: perfectionistPlugin },
|
|
22
22
|
rules: {
|
|
23
23
|
"perfectionist/sort-array-includes": ["error"],
|
package/dist/qwik/index.js
CHANGED
|
@@ -2,9 +2,11 @@ import { interopDefault } from "../utilities.js";
|
|
|
2
2
|
async function qwik(config) {
|
|
3
3
|
if (!config.qwik) return {};
|
|
4
4
|
let qwikPlugin = await interopDefault(import("eslint-plugin-qwik"));
|
|
5
|
+
let files = ["**/*.jsx"];
|
|
6
|
+
if (config.typescript) files.push("**/*.tsx");
|
|
5
7
|
return {
|
|
6
8
|
name: "azat-io/qwik/rules",
|
|
7
|
-
files
|
|
9
|
+
files,
|
|
8
10
|
plugins: { qwik: qwikPlugin },
|
|
9
11
|
rules: {
|
|
10
12
|
"qwik/jsx-a": "error",
|
package/dist/react/index.js
CHANGED
|
@@ -11,9 +11,11 @@ async function react(config) {
|
|
|
11
11
|
interopDefault(import("eslint-plugin-react-web-api")),
|
|
12
12
|
interopDefault(import("eslint-plugin-react-x"))
|
|
13
13
|
]);
|
|
14
|
+
let files = ["**/*.jsx"];
|
|
15
|
+
if (config.typescript) files.push("**/*.tsx");
|
|
14
16
|
return {
|
|
15
17
|
name: "azat-io/react/rules",
|
|
16
|
-
files
|
|
18
|
+
files,
|
|
17
19
|
plugins: {
|
|
18
20
|
"react-compiler": reactCompilerPlugin,
|
|
19
21
|
"react-dom": reactDomPlugin,
|
|
@@ -74,6 +76,7 @@ async function react(config) {
|
|
|
74
76
|
"react-web-api/no-leaked-resize-observer": "error",
|
|
75
77
|
"react-web-api/no-leaked-timeout": "error",
|
|
76
78
|
"react-web-api/no-leaked-websocket": "error",
|
|
79
|
+
"react-x/immutability": "error",
|
|
77
80
|
"react-x/no-access-state-in-setstate": "error",
|
|
78
81
|
"react-x/no-array-index-key": "error",
|
|
79
82
|
"react-x/no-class-component": "error",
|
package/dist/typescript/index.js
CHANGED
|
@@ -2,17 +2,18 @@ import { interopDefault } from "../utilities.js";
|
|
|
2
2
|
async function typescript(config) {
|
|
3
3
|
if (!config.typescript) return {};
|
|
4
4
|
let { parser: typescriptParser, plugin: typescriptPlugin } = await interopDefault(import("typescript-eslint"));
|
|
5
|
+
let files = [
|
|
6
|
+
"**/*.ts",
|
|
7
|
+
"**/*.cts",
|
|
8
|
+
"**/*.mts"
|
|
9
|
+
];
|
|
10
|
+
if (config.react || config.qwik) files.push("**/*.tsx");
|
|
11
|
+
if (config.astro) files.push("**/*.astro");
|
|
12
|
+
if (config.svelte) files.push("**/*.svelte");
|
|
13
|
+
if (config.vue) files.push("**/*.vue");
|
|
5
14
|
return {
|
|
6
15
|
name: "azat-io/typescript/rules",
|
|
7
|
-
files
|
|
8
|
-
"**/*.ts",
|
|
9
|
-
"**/*.cts",
|
|
10
|
-
"**/*.mts",
|
|
11
|
-
...config.react || config.qwik ? ["**/*.tsx"] : [],
|
|
12
|
-
...config.astro ? ["**/*.astro"] : [],
|
|
13
|
-
...config.svelte ? ["**/*.svelte"] : [],
|
|
14
|
-
...config.vue ? ["**/*.vue"] : []
|
|
15
|
-
],
|
|
16
|
+
files,
|
|
16
17
|
languageOptions: {
|
|
17
18
|
parser: typescriptParser,
|
|
18
19
|
parserOptions: {
|
package/dist/vitest/index.js
CHANGED
|
@@ -2,29 +2,22 @@ import { interopDefault } from "../utilities.js";
|
|
|
2
2
|
async function vitest(config) {
|
|
3
3
|
if (!config.vitest) return {};
|
|
4
4
|
let vitestPlugin = await interopDefault(import("@vitest/eslint-plugin"));
|
|
5
|
+
let files = [
|
|
6
|
+
"**/test/*.js",
|
|
7
|
+
"**/test/*.cjs",
|
|
8
|
+
"**/test/*.mjs",
|
|
9
|
+
"**/*.test.js",
|
|
10
|
+
"**/*.test.cjs",
|
|
11
|
+
"**/*.test.mjs"
|
|
12
|
+
];
|
|
13
|
+
if (config.typescript) files.push("**/test/*.ts", "**/test/*.cts", "**/test/*.mts", "**/*.test.ts", "**/*.test.cts", "**/*.test.mts");
|
|
14
|
+
if (config.react || config.qwik) {
|
|
15
|
+
files.push("**/test/*.jsx", "**/*.test.jsx");
|
|
16
|
+
if (config.typescript) files.push("**/test/*.tsx", "**/*.test.tsx");
|
|
17
|
+
}
|
|
5
18
|
return {
|
|
6
19
|
name: "azat-io/vitest/rules",
|
|
7
|
-
files
|
|
8
|
-
"**/test/*.js",
|
|
9
|
-
"**/test/*.cjs",
|
|
10
|
-
"**/test/*.mjs",
|
|
11
|
-
"**/*.test.js",
|
|
12
|
-
"**/*.test.cjs",
|
|
13
|
-
"**/*.test.mjs",
|
|
14
|
-
...config.typescript ? [
|
|
15
|
-
"**/test/*.ts",
|
|
16
|
-
"**/test/*.cts",
|
|
17
|
-
"**/test/*.mts",
|
|
18
|
-
"**/*.test.ts",
|
|
19
|
-
"**/*.test.cts",
|
|
20
|
-
"**/*.test.mts"
|
|
21
|
-
] : [],
|
|
22
|
-
...config.react || config.qwik ? [
|
|
23
|
-
"**/test/*.jsx",
|
|
24
|
-
"**/*.test.jsx",
|
|
25
|
-
...config.typescript ? ["**/test/*.tsx", "**/*.test.tsx"] : []
|
|
26
|
-
] : []
|
|
27
|
-
],
|
|
20
|
+
files,
|
|
28
21
|
plugins: { vitest: vitestPlugin },
|
|
29
22
|
rules: {
|
|
30
23
|
"vitest/consistent-each-for": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azat-io/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.97.0",
|
|
4
4
|
"description": "ESLint shareable config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -31,36 +31,36 @@
|
|
|
31
31
|
"@vitest/eslint-plugin": "1.6.27",
|
|
32
32
|
"astro-eslint-parser": "^3.1.0",
|
|
33
33
|
"eslint-config-flat-gitignore": "^2.4.0",
|
|
34
|
-
"eslint-plugin-astro": "^3.1
|
|
35
|
-
"eslint-plugin-de-morgan": "^2.
|
|
34
|
+
"eslint-plugin-astro": "^3.2.1",
|
|
35
|
+
"eslint-plugin-de-morgan": "^2.2.0",
|
|
36
36
|
"eslint-plugin-depend": "^1.5.0",
|
|
37
37
|
"eslint-plugin-import-lite": "^0.6.0",
|
|
38
|
-
"eslint-plugin-jsdoc": "^64.5.
|
|
38
|
+
"eslint-plugin-jsdoc": "^64.5.4",
|
|
39
39
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
40
40
|
"eslint-plugin-n": "^18.3.0",
|
|
41
|
-
"eslint-plugin-package-json": "^1.
|
|
41
|
+
"eslint-plugin-package-json": "^1.9.0",
|
|
42
42
|
"eslint-plugin-perfectionist": "^5.11.1",
|
|
43
43
|
"eslint-plugin-prefer-let": "^4.2.2",
|
|
44
44
|
"eslint-plugin-promise": "^7.3.0",
|
|
45
45
|
"eslint-plugin-qwik": "2.0.0-beta.21",
|
|
46
46
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
47
|
-
"eslint-plugin-react-dom": "^5.
|
|
47
|
+
"eslint-plugin-react-dom": "^5.20.5",
|
|
48
48
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
49
|
-
"eslint-plugin-react-jsx": "^5.
|
|
50
|
-
"eslint-plugin-react-naming-convention": "^5.
|
|
49
|
+
"eslint-plugin-react-jsx": "^5.20.5",
|
|
50
|
+
"eslint-plugin-react-naming-convention": "^5.20.5",
|
|
51
51
|
"eslint-plugin-react-perf": "^3.3.3",
|
|
52
|
-
"eslint-plugin-react-web-api": "^5.
|
|
53
|
-
"eslint-plugin-react-x": "^5.
|
|
54
|
-
"eslint-plugin-regexp": "^3.3.
|
|
52
|
+
"eslint-plugin-react-web-api": "^5.20.5",
|
|
53
|
+
"eslint-plugin-react-x": "^5.20.5",
|
|
54
|
+
"eslint-plugin-regexp": "^3.3.1",
|
|
55
55
|
"eslint-plugin-slop": "^0.1.3",
|
|
56
56
|
"eslint-plugin-sonarjs": "^4.2.1",
|
|
57
57
|
"eslint-plugin-svelte": "^3.23.0",
|
|
58
|
-
"eslint-plugin-unicorn": "^
|
|
58
|
+
"eslint-plugin-unicorn": "^76.0.0",
|
|
59
59
|
"eslint-plugin-vue": "^10.11.0",
|
|
60
60
|
"globals": "^17.12.0",
|
|
61
61
|
"jsonc-eslint-parser": "^3.3.0",
|
|
62
62
|
"svelte-eslint-parser": "^1.8.1",
|
|
63
|
-
"typescript-eslint": "^8.70.
|
|
63
|
+
"typescript-eslint": "^8.70.1",
|
|
64
64
|
"vue-eslint-parser": "^10.4.1"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|