@azat-io/eslint-config 2.72.0 → 2.73.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 +43 -51
- package/dist/astro/index.js +82 -96
- package/dist/core/index.js +541 -652
- package/dist/index.js +61 -79
- package/dist/node/index.js +44 -56
- package/dist/package-json/index.js +48 -66
- package/dist/perfectionist/index.js +47 -63
- package/dist/qwik/index.js +22 -30
- package/dist/react/index.js +103 -130
- package/dist/svelte/index.js +74 -88
- package/dist/typescript/index.js +188 -247
- package/dist/utilities.js +11 -17
- package/dist/vitest/index.js +63 -84
- package/dist/vue/index.js +177 -202
- package/package.json +12 -13
- package/readme.md +0 -1
package/dist/a11y/index.js
CHANGED
|
@@ -1,54 +1,46 @@
|
|
|
1
1
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
2
2
|
function a11y(config) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"jsx-a11y/role-has-required-aria-props": "error",
|
|
46
|
-
"jsx-a11y/role-supports-aria-props": "error",
|
|
47
|
-
"jsx-a11y/scope": "error",
|
|
48
|
-
"jsx-a11y/tabindex-no-positive": "error"
|
|
49
|
-
}
|
|
50
|
-
};
|
|
3
|
+
if (!config.react && !config.qwik) return {};
|
|
4
|
+
let files = ["**/*.jsx"];
|
|
5
|
+
if (config.typescript) files.push("**/*.tsx");
|
|
6
|
+
return {
|
|
7
|
+
name: "azat-io/a11y/rules",
|
|
8
|
+
files,
|
|
9
|
+
plugins: { "jsx-a11y": jsxA11y },
|
|
10
|
+
rules: {
|
|
11
|
+
"jsx-a11y/alt-text": "error",
|
|
12
|
+
"jsx-a11y/anchor-has-content": "error",
|
|
13
|
+
"jsx-a11y/anchor-is-valid": "error",
|
|
14
|
+
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
15
|
+
"jsx-a11y/aria-props": "error",
|
|
16
|
+
"jsx-a11y/aria-proptypes": "error",
|
|
17
|
+
"jsx-a11y/aria-role": "error",
|
|
18
|
+
"jsx-a11y/aria-unsupported-elements": "error",
|
|
19
|
+
"jsx-a11y/autocomplete-valid": "error",
|
|
20
|
+
"jsx-a11y/heading-has-content": "error",
|
|
21
|
+
"jsx-a11y/html-has-lang": "error",
|
|
22
|
+
"jsx-a11y/iframe-has-title": "error",
|
|
23
|
+
"jsx-a11y/img-redundant-alt": "error",
|
|
24
|
+
"jsx-a11y/interactive-supports-focus": "error",
|
|
25
|
+
"jsx-a11y/label-has-associated-control": "error",
|
|
26
|
+
"jsx-a11y/lang": "error",
|
|
27
|
+
"jsx-a11y/media-has-caption": "error",
|
|
28
|
+
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
29
|
+
"jsx-a11y/no-access-key": "error",
|
|
30
|
+
"jsx-a11y/no-aria-hidden-on-focusable": "error",
|
|
31
|
+
"jsx-a11y/no-autofocus": "error",
|
|
32
|
+
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
33
|
+
"jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
34
|
+
"jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
35
|
+
"jsx-a11y/no-noninteractive-tabindex": "error",
|
|
36
|
+
"jsx-a11y/no-redundant-roles": "error",
|
|
37
|
+
"jsx-a11y/no-static-element-interactions": "error",
|
|
38
|
+
"jsx-a11y/prefer-tag-over-role": "error",
|
|
39
|
+
"jsx-a11y/role-has-required-aria-props": "error",
|
|
40
|
+
"jsx-a11y/role-supports-aria-props": "error",
|
|
41
|
+
"jsx-a11y/scope": "error",
|
|
42
|
+
"jsx-a11y/tabindex-no-positive": "error"
|
|
43
|
+
}
|
|
44
|
+
};
|
|
51
45
|
}
|
|
52
|
-
export {
|
|
53
|
-
a11y
|
|
54
|
-
};
|
|
46
|
+
export { a11y };
|
package/dist/astro/index.js
CHANGED
|
@@ -1,99 +1,85 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
1
|
import { interopDefault } from "../utilities.js";
|
|
2
|
+
import path from "node:path";
|
|
3
3
|
async function astro(config) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"astro/prefer-split-class-list": "error",
|
|
85
|
-
"astro/sort-attributes": [
|
|
86
|
-
"error",
|
|
87
|
-
{
|
|
88
|
-
ignoreCase: true,
|
|
89
|
-
order: "desc",
|
|
90
|
-
type: "line-length"
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"astro/valid-compile": "error"
|
|
94
|
-
}
|
|
95
|
-
};
|
|
4
|
+
if (!config.astro) return {};
|
|
5
|
+
let [astroPlugin, astroParser] = await Promise.all([interopDefault(import("eslint-plugin-astro")), interopDefault(import("astro-eslint-parser"))]);
|
|
6
|
+
let files = ["**/*.astro"];
|
|
7
|
+
let additionalParserOptions = {};
|
|
8
|
+
if (config.typescript) {
|
|
9
|
+
let { parser: typescriptParser } = await interopDefault(import("typescript-eslint"));
|
|
10
|
+
additionalParserOptions = {
|
|
11
|
+
...additionalParserOptions,
|
|
12
|
+
parser: typescriptParser,
|
|
13
|
+
project: path.join(process.cwd(), "tsconfig.json"),
|
|
14
|
+
projectService: false,
|
|
15
|
+
tsconfigRootDir: process.cwd()
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
name: "azat-io/astro/rules",
|
|
20
|
+
files,
|
|
21
|
+
languageOptions: {
|
|
22
|
+
parser: astroParser,
|
|
23
|
+
parserOptions: {
|
|
24
|
+
ecmaVersion: "latest",
|
|
25
|
+
extraFileExtensions: [".astro"],
|
|
26
|
+
sourceType: "module",
|
|
27
|
+
...additionalParserOptions
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
plugins: { astro: astroPlugin },
|
|
31
|
+
rules: {
|
|
32
|
+
"astro/jsx-a11y/alt-text": "error",
|
|
33
|
+
"astro/jsx-a11y/anchor-has-content": "error",
|
|
34
|
+
"astro/jsx-a11y/anchor-is-valid": "error",
|
|
35
|
+
"astro/jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
36
|
+
"astro/jsx-a11y/aria-props": "error",
|
|
37
|
+
"astro/jsx-a11y/aria-proptypes": "error",
|
|
38
|
+
"astro/jsx-a11y/aria-role": "error",
|
|
39
|
+
"astro/jsx-a11y/aria-unsupported-elements": "error",
|
|
40
|
+
"astro/jsx-a11y/autocomplete-valid": "error",
|
|
41
|
+
"astro/jsx-a11y/heading-has-content": "error",
|
|
42
|
+
"astro/jsx-a11y/html-has-lang": "error",
|
|
43
|
+
"astro/jsx-a11y/iframe-has-title": "error",
|
|
44
|
+
"astro/jsx-a11y/img-redundant-alt": "error",
|
|
45
|
+
"astro/jsx-a11y/interactive-supports-focus": "error",
|
|
46
|
+
"astro/jsx-a11y/label-has-associated-control": "error",
|
|
47
|
+
"astro/jsx-a11y/lang": "error",
|
|
48
|
+
"astro/jsx-a11y/media-has-caption": "error",
|
|
49
|
+
"astro/jsx-a11y/mouse-events-have-key-events": "error",
|
|
50
|
+
"astro/jsx-a11y/no-access-key": "error",
|
|
51
|
+
"astro/jsx-a11y/no-aria-hidden-on-focusable": "error",
|
|
52
|
+
"astro/jsx-a11y/no-autofocus": "error",
|
|
53
|
+
"astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
54
|
+
"astro/jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
55
|
+
"astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
56
|
+
"astro/jsx-a11y/no-noninteractive-tabindex": "error",
|
|
57
|
+
"astro/jsx-a11y/no-redundant-roles": "error",
|
|
58
|
+
"astro/jsx-a11y/no-static-element-interactions": "error",
|
|
59
|
+
"astro/jsx-a11y/prefer-tag-over-role": "error",
|
|
60
|
+
"astro/jsx-a11y/role-has-required-aria-props": "error",
|
|
61
|
+
"astro/jsx-a11y/role-supports-aria-props": "error",
|
|
62
|
+
"astro/jsx-a11y/scope": "error",
|
|
63
|
+
"astro/jsx-a11y/tabindex-no-positive": "error",
|
|
64
|
+
"astro/missing-client-only-directive-value": "error",
|
|
65
|
+
"astro/no-conflict-set-directives": "error",
|
|
66
|
+
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
67
|
+
"astro/no-deprecated-astro-fetchcontent": "error",
|
|
68
|
+
"astro/no-deprecated-astro-resolve": "error",
|
|
69
|
+
"astro/no-deprecated-getentrybyslug": "error",
|
|
70
|
+
"astro/no-exports-from-components": "error",
|
|
71
|
+
"astro/no-set-text-directive": "error",
|
|
72
|
+
"astro/no-unused-define-vars-in-style": "error",
|
|
73
|
+
"astro/prefer-class-list-directive": "error",
|
|
74
|
+
"astro/prefer-object-class-list": "error",
|
|
75
|
+
"astro/prefer-split-class-list": "error",
|
|
76
|
+
"astro/sort-attributes": ["error", {
|
|
77
|
+
ignoreCase: true,
|
|
78
|
+
order: "desc",
|
|
79
|
+
type: "line-length"
|
|
80
|
+
}],
|
|
81
|
+
"astro/valid-compile": "error"
|
|
82
|
+
}
|
|
83
|
+
};
|
|
96
84
|
}
|
|
97
|
-
export {
|
|
98
|
-
astro
|
|
99
|
-
};
|
|
85
|
+
export { astro };
|