@azat-io/eslint-config 2.17.0 → 2.19.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/astro/{index.mjs → index.js} +1 -1
- package/dist/core/{index.mjs → index.js} +6 -3
- package/dist/index.js +64 -0
- package/dist/node/{index.mjs → index.js} +1 -1
- package/dist/perfectionist/{index.mjs → index.js} +1 -1
- package/dist/qwik/{index.mjs → index.js} +1 -1
- package/dist/react/{index.mjs → index.js} +1 -1
- package/dist/svelte/{index.mjs → index.js} +1 -1
- package/dist/typescript/{index.mjs → index.js} +1 -1
- package/dist/vitest/{index.mjs → index.js} +1 -1
- package/dist/vue/{index.mjs → index.js} +1 -1
- package/package.json +13 -13
- package/dist/a11y/index.cjs +0 -54
- package/dist/astro/index.cjs +0 -117
- package/dist/core/index.cjs +0 -647
- package/dist/index.cjs +0 -86
- package/dist/index.mjs +0 -87
- package/dist/node/index.cjs +0 -75
- package/dist/package-json/index.cjs +0 -41
- package/dist/perfectionist/index.cjs +0 -84
- package/dist/qwik/index.cjs +0 -51
- package/dist/react/index.cjs +0 -131
- package/dist/svelte/index.cjs +0 -104
- package/dist/typescript/index.cjs +0 -252
- package/dist/utilities.cjs +0 -21
- package/dist/vitest/index.cjs +0 -101
- package/dist/vue/index.cjs +0 -212
- /package/dist/a11y/{index.mjs → index.js} +0 -0
- /package/dist/package-json/{index.mjs → index.js} +0 -0
- /package/dist/{utilities.mjs → utilities.js} +0 -0
|
@@ -271,7 +271,12 @@ let core = (config) => {
|
|
|
271
271
|
"no-useless-rename": "error",
|
|
272
272
|
"no-useless-return": "error",
|
|
273
273
|
"no-var": "error",
|
|
274
|
-
"no-void":
|
|
274
|
+
"no-void": [
|
|
275
|
+
"error",
|
|
276
|
+
{
|
|
277
|
+
allowAsStatement: true
|
|
278
|
+
}
|
|
279
|
+
],
|
|
275
280
|
"no-with": "error",
|
|
276
281
|
"object-shorthand": ["error", "always"],
|
|
277
282
|
"one-var": [
|
|
@@ -346,7 +351,6 @@ let core = (config) => {
|
|
|
346
351
|
"import-x/no-webpack-loader-syntax": "error",
|
|
347
352
|
"jsdoc/check-access": "error",
|
|
348
353
|
"jsdoc/check-alignment": "error",
|
|
349
|
-
"jsdoc/check-line-alignment": "error",
|
|
350
354
|
"jsdoc/check-param-names": "error",
|
|
351
355
|
"jsdoc/check-property-names": "error",
|
|
352
356
|
"jsdoc/check-syntax": "error",
|
|
@@ -381,7 +385,6 @@ let core = (config) => {
|
|
|
381
385
|
"jsdoc/require-returns-description": "error",
|
|
382
386
|
"jsdoc/require-returns-type": "error",
|
|
383
387
|
"jsdoc/require-yields-check": "error",
|
|
384
|
-
"jsdoc/sort-tags": "error",
|
|
385
388
|
"jsdoc/valid-types": "error",
|
|
386
389
|
"prefer-arrow/prefer-arrow-functions": [
|
|
387
390
|
"error",
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import gitignore from "eslint-config-flat-gitignore";
|
|
2
|
+
import { defineConfig } from "eslint/config";
|
|
3
|
+
import { perfectionist } from "./perfectionist/index.js";
|
|
4
|
+
import { packageJson } from "./package-json/index.js";
|
|
5
|
+
import { typescript } from "./typescript/index.js";
|
|
6
|
+
import { svelte } from "./svelte/index.js";
|
|
7
|
+
import { vitest } from "./vitest/index.js";
|
|
8
|
+
import { react } from "./react/index.js";
|
|
9
|
+
import { astro } from "./astro/index.js";
|
|
10
|
+
import { qwik } from "./qwik/index.js";
|
|
11
|
+
import { a11y } from "./a11y/index.js";
|
|
12
|
+
import { core } from "./core/index.js";
|
|
13
|
+
import { node } from "./node/index.js";
|
|
14
|
+
import { vue } from "./vue/index.js";
|
|
15
|
+
const CONFIG_OPTIONS = [
|
|
16
|
+
"perfectionist",
|
|
17
|
+
"typescript",
|
|
18
|
+
"svelte",
|
|
19
|
+
"vitest",
|
|
20
|
+
"astro",
|
|
21
|
+
"react",
|
|
22
|
+
"qwik",
|
|
23
|
+
"node",
|
|
24
|
+
"vue"
|
|
25
|
+
];
|
|
26
|
+
const index = async ({
|
|
27
|
+
extends: customExtends = {},
|
|
28
|
+
...rawConfig
|
|
29
|
+
} = {}) => {
|
|
30
|
+
let config = {};
|
|
31
|
+
for (let configName of CONFIG_OPTIONS) {
|
|
32
|
+
config[configName] = rawConfig[configName] ?? false;
|
|
33
|
+
}
|
|
34
|
+
let configFunctions = [
|
|
35
|
+
core,
|
|
36
|
+
a11y,
|
|
37
|
+
react,
|
|
38
|
+
node,
|
|
39
|
+
typescript,
|
|
40
|
+
vitest,
|
|
41
|
+
astro,
|
|
42
|
+
svelte,
|
|
43
|
+
qwik,
|
|
44
|
+
vue,
|
|
45
|
+
packageJson,
|
|
46
|
+
perfectionist
|
|
47
|
+
];
|
|
48
|
+
let configs = await Promise.all(
|
|
49
|
+
configFunctions.map((createConfigFunction) => createConfigFunction(config))
|
|
50
|
+
);
|
|
51
|
+
return defineConfig([
|
|
52
|
+
gitignore(),
|
|
53
|
+
...configs,
|
|
54
|
+
...Array.isArray(customExtends) ? customExtends : [
|
|
55
|
+
{
|
|
56
|
+
name: "azat-io/custom-extends",
|
|
57
|
+
...customExtends
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
]);
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
index as default
|
|
64
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azat-io/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "ESLint shareable config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
20
|
"types": "./dist/index.d.ts",
|
|
21
|
-
"import": "./dist/index.
|
|
22
|
-
"require": "./dist/index.cjs"
|
|
21
|
+
"import": "./dist/index.js"
|
|
23
22
|
},
|
|
24
23
|
"./package.json": "./package.json"
|
|
25
24
|
},
|
|
@@ -30,15 +29,16 @@
|
|
|
30
29
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
31
30
|
"@vitest/eslint-plugin": "1.1.36",
|
|
32
31
|
"astro-eslint-parser": "^1.2.1",
|
|
33
|
-
"eslint-
|
|
32
|
+
"eslint-config-flat-gitignore": "^2.1.0",
|
|
33
|
+
"eslint-import-resolver-typescript": "^3.8.4",
|
|
34
34
|
"eslint-plugin-astro": "^1.3.1",
|
|
35
35
|
"eslint-plugin-de-morgan": "^1.2.0",
|
|
36
36
|
"eslint-plugin-import-x": "^4.6.1",
|
|
37
37
|
"eslint-plugin-jsdoc": "^50.6.3",
|
|
38
38
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
39
|
-
"eslint-plugin-n": "^17.16.
|
|
40
|
-
"eslint-plugin-package-json": "^0.26.
|
|
41
|
-
"eslint-plugin-perfectionist": "^4.
|
|
39
|
+
"eslint-plugin-n": "^17.16.2",
|
|
40
|
+
"eslint-plugin-package-json": "^0.26.3",
|
|
41
|
+
"eslint-plugin-perfectionist": "^4.10.1",
|
|
42
42
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
43
43
|
"eslint-plugin-prefer-let": "^4.0.0",
|
|
44
44
|
"eslint-plugin-promise": "^7.2.1",
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
"eslint-plugin-react-perf": "^3.3.3",
|
|
50
50
|
"eslint-plugin-regexp": "^2.7.0",
|
|
51
51
|
"eslint-plugin-sonarjs": "^3.0.2",
|
|
52
|
-
"eslint-plugin-svelte": "^3.0
|
|
52
|
+
"eslint-plugin-svelte": "^3.1.0",
|
|
53
53
|
"eslint-plugin-unicorn": "^57.0.0",
|
|
54
|
-
"eslint-plugin-vue": "^
|
|
54
|
+
"eslint-plugin-vue": "^10.0.0",
|
|
55
55
|
"globals": "^16.0.0",
|
|
56
56
|
"jsonc-eslint-parser": "^2.4.0",
|
|
57
|
-
"svelte-eslint-parser": "^1.0.
|
|
58
|
-
"typescript-eslint": "^8.
|
|
59
|
-
"vue-eslint-parser": "^
|
|
57
|
+
"svelte-eslint-parser": "^1.0.1",
|
|
58
|
+
"typescript-eslint": "^8.26.1",
|
|
59
|
+
"vue-eslint-parser": "^10.1.1"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"eslint": ">=9.
|
|
62
|
+
"eslint": ">=9.22.0"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
package/dist/a11y/index.cjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
name: "azat-io/a11y/rules",
|
|
14
|
-
files,
|
|
15
|
-
plugins: {
|
|
16
|
-
"jsx-a11y": jsxA11y
|
|
17
|
-
},
|
|
18
|
-
rules: {
|
|
19
|
-
"jsx-a11y/alt-text": "error",
|
|
20
|
-
"jsx-a11y/anchor-has-content": "error",
|
|
21
|
-
"jsx-a11y/anchor-is-valid": "error",
|
|
22
|
-
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
23
|
-
"jsx-a11y/aria-props": "error",
|
|
24
|
-
"jsx-a11y/aria-proptypes": "error",
|
|
25
|
-
"jsx-a11y/aria-role": "error",
|
|
26
|
-
"jsx-a11y/aria-unsupported-elements": "error",
|
|
27
|
-
"jsx-a11y/autocomplete-valid": "error",
|
|
28
|
-
"jsx-a11y/heading-has-content": "error",
|
|
29
|
-
"jsx-a11y/html-has-lang": "error",
|
|
30
|
-
"jsx-a11y/iframe-has-title": "error",
|
|
31
|
-
"jsx-a11y/img-redundant-alt": "error",
|
|
32
|
-
"jsx-a11y/interactive-supports-focus": "error",
|
|
33
|
-
"jsx-a11y/label-has-associated-control": "error",
|
|
34
|
-
"jsx-a11y/lang": "error",
|
|
35
|
-
"jsx-a11y/media-has-caption": "error",
|
|
36
|
-
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
37
|
-
"jsx-a11y/no-access-key": "error",
|
|
38
|
-
"jsx-a11y/no-aria-hidden-on-focusable": "error",
|
|
39
|
-
"jsx-a11y/no-autofocus": "error",
|
|
40
|
-
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
41
|
-
"jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
42
|
-
"jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
43
|
-
"jsx-a11y/no-noninteractive-tabindex": "error",
|
|
44
|
-
"jsx-a11y/no-redundant-roles": "error",
|
|
45
|
-
"jsx-a11y/no-static-element-interactions": "error",
|
|
46
|
-
"jsx-a11y/prefer-tag-over-role": "error",
|
|
47
|
-
"jsx-a11y/role-has-required-aria-props": "error",
|
|
48
|
-
"jsx-a11y/role-supports-aria-props": "error",
|
|
49
|
-
"jsx-a11y/scope": "error",
|
|
50
|
-
"jsx-a11y/tabindex-no-positive": "error"
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
exports.a11y = a11y;
|
package/dist/astro/index.cjs
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
|
-
mod
|
|
19
|
-
));
|
|
20
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21
|
-
const path = require("node:path");
|
|
22
|
-
const utilities = require("../utilities.cjs");
|
|
23
|
-
let astro = async (config) => {
|
|
24
|
-
if (!config.astro) {
|
|
25
|
-
return {};
|
|
26
|
-
}
|
|
27
|
-
let [astroPlugin, astroParser] = await Promise.all([
|
|
28
|
-
utilities.interopDefault(import("eslint-plugin-astro")),
|
|
29
|
-
utilities.interopDefault(import("astro-eslint-parser"))
|
|
30
|
-
]);
|
|
31
|
-
let files = ["**/*.astro"];
|
|
32
|
-
let additionalParserOptions = {};
|
|
33
|
-
if (config.typescript) {
|
|
34
|
-
let { parser: typescriptParser } = await utilities.interopDefault(
|
|
35
|
-
import("typescript-eslint")
|
|
36
|
-
);
|
|
37
|
-
additionalParserOptions = {
|
|
38
|
-
...additionalParserOptions,
|
|
39
|
-
parser: typescriptParser,
|
|
40
|
-
project: path.join(process.cwd(), "tsconfig.json"),
|
|
41
|
-
projectService: false,
|
|
42
|
-
tsconfigRootDir: process.cwd()
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
name: "azat-io/astro/rules",
|
|
47
|
-
files,
|
|
48
|
-
languageOptions: {
|
|
49
|
-
parser: astroParser,
|
|
50
|
-
parserOptions: {
|
|
51
|
-
ecmaVersion: "latest",
|
|
52
|
-
extraFileExtensions: [".astro"],
|
|
53
|
-
sourceType: "module",
|
|
54
|
-
...additionalParserOptions
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
plugins: {
|
|
58
|
-
astro: astroPlugin
|
|
59
|
-
},
|
|
60
|
-
rules: {
|
|
61
|
-
"astro/jsx-a11y/alt-text": "error",
|
|
62
|
-
"astro/jsx-a11y/anchor-has-content": "error",
|
|
63
|
-
"astro/jsx-a11y/anchor-is-valid": "error",
|
|
64
|
-
"astro/jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
65
|
-
"astro/jsx-a11y/aria-props": "error",
|
|
66
|
-
"astro/jsx-a11y/aria-proptypes": "error",
|
|
67
|
-
"astro/jsx-a11y/aria-role": "error",
|
|
68
|
-
"astro/jsx-a11y/aria-unsupported-elements": "error",
|
|
69
|
-
"astro/jsx-a11y/autocomplete-valid": "error",
|
|
70
|
-
"astro/jsx-a11y/heading-has-content": "error",
|
|
71
|
-
"astro/jsx-a11y/html-has-lang": "error",
|
|
72
|
-
"astro/jsx-a11y/iframe-has-title": "error",
|
|
73
|
-
"astro/jsx-a11y/img-redundant-alt": "error",
|
|
74
|
-
"astro/jsx-a11y/interactive-supports-focus": "error",
|
|
75
|
-
"astro/jsx-a11y/label-has-associated-control": "error",
|
|
76
|
-
"astro/jsx-a11y/lang": "error",
|
|
77
|
-
"astro/jsx-a11y/media-has-caption": "error",
|
|
78
|
-
"astro/jsx-a11y/mouse-events-have-key-events": "error",
|
|
79
|
-
"astro/jsx-a11y/no-access-key": "error",
|
|
80
|
-
"astro/jsx-a11y/no-aria-hidden-on-focusable": "error",
|
|
81
|
-
"astro/jsx-a11y/no-autofocus": "error",
|
|
82
|
-
"astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
83
|
-
"astro/jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
84
|
-
"astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
85
|
-
"astro/jsx-a11y/no-noninteractive-tabindex": "error",
|
|
86
|
-
"astro/jsx-a11y/no-redundant-roles": "error",
|
|
87
|
-
"astro/jsx-a11y/no-static-element-interactions": "error",
|
|
88
|
-
"astro/jsx-a11y/prefer-tag-over-role": "error",
|
|
89
|
-
"astro/jsx-a11y/role-has-required-aria-props": "error",
|
|
90
|
-
"astro/jsx-a11y/role-supports-aria-props": "error",
|
|
91
|
-
"astro/jsx-a11y/scope": "error",
|
|
92
|
-
"astro/jsx-a11y/tabindex-no-positive": "error",
|
|
93
|
-
"astro/missing-client-only-directive-value": "error",
|
|
94
|
-
"astro/no-conflict-set-directives": "error",
|
|
95
|
-
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
96
|
-
"astro/no-deprecated-astro-fetchcontent": "error",
|
|
97
|
-
"astro/no-deprecated-astro-resolve": "error",
|
|
98
|
-
"astro/no-deprecated-getentrybyslug": "error",
|
|
99
|
-
"astro/no-exports-from-components": "error",
|
|
100
|
-
"astro/no-set-text-directive": "error",
|
|
101
|
-
"astro/no-unused-define-vars-in-style": "error",
|
|
102
|
-
"astro/prefer-class-list-directive": "error",
|
|
103
|
-
"astro/prefer-object-class-list": "error",
|
|
104
|
-
"astro/prefer-split-class-list": "error",
|
|
105
|
-
"astro/sort-attributes": [
|
|
106
|
-
"error",
|
|
107
|
-
{
|
|
108
|
-
ignoreCase: true,
|
|
109
|
-
order: "desc",
|
|
110
|
-
type: "line-length"
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"astro/valid-compile": "error"
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
exports.astro = astro;
|