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