@azat-io/eslint-config 2.17.0 → 2.18.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} +0 -2
- package/dist/index.js +63 -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 +4 -4
- 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
package/dist/index.cjs
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const index$c = require("./perfectionist/index.cjs");
|
|
3
|
-
const index$b = require("./package-json/index.cjs");
|
|
4
|
-
const index$5 = require("./typescript/index.cjs");
|
|
5
|
-
const index$8 = require("./svelte/index.cjs");
|
|
6
|
-
const index$6 = require("./vitest/index.cjs");
|
|
7
|
-
const index$3 = require("./react/index.cjs");
|
|
8
|
-
const index$7 = require("./astro/index.cjs");
|
|
9
|
-
const index$9 = require("./qwik/index.cjs");
|
|
10
|
-
const index$2 = require("./a11y/index.cjs");
|
|
11
|
-
const index$1 = require("./core/index.cjs");
|
|
12
|
-
const index$4 = require("./node/index.cjs");
|
|
13
|
-
const index$a = require("./vue/index.cjs");
|
|
14
|
-
const CONFIG_OPTIONS = [
|
|
15
|
-
"perfectionist",
|
|
16
|
-
"typescript",
|
|
17
|
-
"svelte",
|
|
18
|
-
"vitest",
|
|
19
|
-
"astro",
|
|
20
|
-
"react",
|
|
21
|
-
"qwik",
|
|
22
|
-
"node",
|
|
23
|
-
"vue"
|
|
24
|
-
];
|
|
25
|
-
const index = async ({
|
|
26
|
-
extends: customExtends = {},
|
|
27
|
-
...rawConfig
|
|
28
|
-
} = {}) => {
|
|
29
|
-
let config = {};
|
|
30
|
-
for (let configName of CONFIG_OPTIONS) {
|
|
31
|
-
config[configName] = rawConfig[configName] ?? false;
|
|
32
|
-
}
|
|
33
|
-
let configFunctions = [
|
|
34
|
-
index$1.core,
|
|
35
|
-
index$2.a11y,
|
|
36
|
-
index$3.react,
|
|
37
|
-
index$4.node,
|
|
38
|
-
index$5.typescript,
|
|
39
|
-
index$6.vitest,
|
|
40
|
-
index$7.astro,
|
|
41
|
-
index$8.svelte,
|
|
42
|
-
index$9.qwik,
|
|
43
|
-
index$a.vue,
|
|
44
|
-
index$b.packageJson,
|
|
45
|
-
index$c.perfectionist
|
|
46
|
-
];
|
|
47
|
-
let configs = await Promise.all(
|
|
48
|
-
configFunctions.map((createConfigFunction) => createConfigFunction(config))
|
|
49
|
-
);
|
|
50
|
-
return [
|
|
51
|
-
{
|
|
52
|
-
ignores: [
|
|
53
|
-
"**/.eslint-config-inspector/**",
|
|
54
|
-
"**/vite.config.*.timestamp-*",
|
|
55
|
-
"**/.vitepress/cache/**",
|
|
56
|
-
"**/node_modules/**",
|
|
57
|
-
"**/.svelte-kit/**",
|
|
58
|
-
"**/coverage/**",
|
|
59
|
-
"**/.history/**",
|
|
60
|
-
"**/.netlify/**",
|
|
61
|
-
"**/.vercel/**",
|
|
62
|
-
"**/.output/**",
|
|
63
|
-
"**/.astro/**",
|
|
64
|
-
"**/output/**",
|
|
65
|
-
"**/.cache/**",
|
|
66
|
-
"**/.temp/**",
|
|
67
|
-
"**/build/**",
|
|
68
|
-
"**/.nuxt/**",
|
|
69
|
-
"**/.next/**",
|
|
70
|
-
"**/dist/**",
|
|
71
|
-
"**/temp/**",
|
|
72
|
-
"**/.tmp/**",
|
|
73
|
-
"**/tmp/**"
|
|
74
|
-
],
|
|
75
|
-
name: "azat-io/core/ignores"
|
|
76
|
-
},
|
|
77
|
-
...configs,
|
|
78
|
-
...Array.isArray(customExtends) ? customExtends : [
|
|
79
|
-
{
|
|
80
|
-
name: "azat-io/custom-extends",
|
|
81
|
-
...customExtends
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
];
|
|
85
|
-
};
|
|
86
|
-
module.exports = index;
|
package/dist/index.mjs
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { perfectionist } from "./perfectionist/index.mjs";
|
|
2
|
-
import { packageJson } from "./package-json/index.mjs";
|
|
3
|
-
import { typescript } from "./typescript/index.mjs";
|
|
4
|
-
import { svelte } from "./svelte/index.mjs";
|
|
5
|
-
import { vitest } from "./vitest/index.mjs";
|
|
6
|
-
import { react } from "./react/index.mjs";
|
|
7
|
-
import { astro } from "./astro/index.mjs";
|
|
8
|
-
import { qwik } from "./qwik/index.mjs";
|
|
9
|
-
import { a11y } from "./a11y/index.mjs";
|
|
10
|
-
import { core } from "./core/index.mjs";
|
|
11
|
-
import { node } from "./node/index.mjs";
|
|
12
|
-
import { vue } from "./vue/index.mjs";
|
|
13
|
-
const CONFIG_OPTIONS = [
|
|
14
|
-
"perfectionist",
|
|
15
|
-
"typescript",
|
|
16
|
-
"svelte",
|
|
17
|
-
"vitest",
|
|
18
|
-
"astro",
|
|
19
|
-
"react",
|
|
20
|
-
"qwik",
|
|
21
|
-
"node",
|
|
22
|
-
"vue"
|
|
23
|
-
];
|
|
24
|
-
const index = async ({
|
|
25
|
-
extends: customExtends = {},
|
|
26
|
-
...rawConfig
|
|
27
|
-
} = {}) => {
|
|
28
|
-
let config = {};
|
|
29
|
-
for (let configName of CONFIG_OPTIONS) {
|
|
30
|
-
config[configName] = rawConfig[configName] ?? false;
|
|
31
|
-
}
|
|
32
|
-
let configFunctions = [
|
|
33
|
-
core,
|
|
34
|
-
a11y,
|
|
35
|
-
react,
|
|
36
|
-
node,
|
|
37
|
-
typescript,
|
|
38
|
-
vitest,
|
|
39
|
-
astro,
|
|
40
|
-
svelte,
|
|
41
|
-
qwik,
|
|
42
|
-
vue,
|
|
43
|
-
packageJson,
|
|
44
|
-
perfectionist
|
|
45
|
-
];
|
|
46
|
-
let configs = await Promise.all(
|
|
47
|
-
configFunctions.map((createConfigFunction) => createConfigFunction(config))
|
|
48
|
-
);
|
|
49
|
-
return [
|
|
50
|
-
{
|
|
51
|
-
ignores: [
|
|
52
|
-
"**/.eslint-config-inspector/**",
|
|
53
|
-
"**/vite.config.*.timestamp-*",
|
|
54
|
-
"**/.vitepress/cache/**",
|
|
55
|
-
"**/node_modules/**",
|
|
56
|
-
"**/.svelte-kit/**",
|
|
57
|
-
"**/coverage/**",
|
|
58
|
-
"**/.history/**",
|
|
59
|
-
"**/.netlify/**",
|
|
60
|
-
"**/.vercel/**",
|
|
61
|
-
"**/.output/**",
|
|
62
|
-
"**/.astro/**",
|
|
63
|
-
"**/output/**",
|
|
64
|
-
"**/.cache/**",
|
|
65
|
-
"**/.temp/**",
|
|
66
|
-
"**/build/**",
|
|
67
|
-
"**/.nuxt/**",
|
|
68
|
-
"**/.next/**",
|
|
69
|
-
"**/dist/**",
|
|
70
|
-
"**/temp/**",
|
|
71
|
-
"**/.tmp/**",
|
|
72
|
-
"**/tmp/**"
|
|
73
|
-
],
|
|
74
|
-
name: "azat-io/core/ignores"
|
|
75
|
-
},
|
|
76
|
-
...configs,
|
|
77
|
-
...Array.isArray(customExtends) ? customExtends : [
|
|
78
|
-
{
|
|
79
|
-
name: "azat-io/custom-extends",
|
|
80
|
-
...customExtends
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
];
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
index as default
|
|
87
|
-
};
|
package/dist/node/index.cjs
DELETED
|
@@ -1,75 +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 utilities = require("../utilities.cjs");
|
|
22
|
-
let node = async (config) => {
|
|
23
|
-
if (!config.node) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
let nodePlugin = await utilities.interopDefault(import("eslint-plugin-n"));
|
|
27
|
-
let files = ["**/*.js", "**/*.cjs", "**/*.mjs"];
|
|
28
|
-
if (config.typescript) {
|
|
29
|
-
files.push("**/*.ts", "**/*.cts", "**/*.mts");
|
|
30
|
-
}
|
|
31
|
-
if (config.react || config.qwik) {
|
|
32
|
-
files.push("**/*.jsx");
|
|
33
|
-
if (config.typescript) {
|
|
34
|
-
files.push("**/*.tsx");
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (config.astro) {
|
|
38
|
-
files.push("**/*.astro");
|
|
39
|
-
}
|
|
40
|
-
if (config.svelte) {
|
|
41
|
-
files.push("**/*.svelte");
|
|
42
|
-
}
|
|
43
|
-
if (config.vue) {
|
|
44
|
-
files.push("**/*.vue");
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
name: "azat-io/node/rules",
|
|
48
|
-
files,
|
|
49
|
-
plugins: {
|
|
50
|
-
node: nodePlugin
|
|
51
|
-
},
|
|
52
|
-
rules: {
|
|
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"
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
exports.node = node;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const packageJsonPlugin = require("eslint-plugin-package-json");
|
|
4
|
-
const jsoncParser = require("jsonc-eslint-parser");
|
|
5
|
-
let packageJson = (_config) => ({
|
|
6
|
-
name: "azat-io/package-json/rules",
|
|
7
|
-
files: ["**/package.json"],
|
|
8
|
-
plugins: {
|
|
9
|
-
"package-json": packageJsonPlugin
|
|
10
|
-
},
|
|
11
|
-
languageOptions: {
|
|
12
|
-
parser: jsoncParser
|
|
13
|
-
},
|
|
14
|
-
rules: {
|
|
15
|
-
"package-json/no-empty-fields": "error",
|
|
16
|
-
"package-json/no-redundant-files": "error",
|
|
17
|
-
"package-json/order-properties": [
|
|
18
|
-
"error",
|
|
19
|
-
{
|
|
20
|
-
order: "sort-package-json"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"package-json/repository-shorthand": [
|
|
24
|
-
"error",
|
|
25
|
-
{
|
|
26
|
-
form: "shorthand"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"package-json/require-author": "error",
|
|
30
|
-
"package-json/require-keywords": "error",
|
|
31
|
-
"package-json/require-name": "error",
|
|
32
|
-
"package-json/require-version": "error",
|
|
33
|
-
"package-json/sort-collections": "error",
|
|
34
|
-
"package-json/unique-dependencies": "error",
|
|
35
|
-
"package-json/valid-local-dependency": "error",
|
|
36
|
-
"package-json/valid-name": "error",
|
|
37
|
-
"package-json/valid-package-definition": "error",
|
|
38
|
-
"package-json/valid-version": "error"
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
exports.packageJson = packageJson;
|
|
@@ -1,84 +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 utilities = require("../utilities.cjs");
|
|
22
|
-
let perfectionist = async (config) => {
|
|
23
|
-
if (!config.perfectionist) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
let perfectionistPlugin = await utilities.interopDefault(
|
|
27
|
-
import("eslint-plugin-perfectionist")
|
|
28
|
-
);
|
|
29
|
-
let files = ["**/*.js", "**/*.cjs", "**/*.mjs"];
|
|
30
|
-
if (config.typescript) {
|
|
31
|
-
files.push("**/*.ts", "**/*.cts", "**/*.mts");
|
|
32
|
-
}
|
|
33
|
-
if (config.react || config.qwik) {
|
|
34
|
-
files.push("**/*.jsx");
|
|
35
|
-
if (config.typescript) {
|
|
36
|
-
files.push("**/*.tsx");
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (config.astro) {
|
|
40
|
-
files.push("**/*.astro");
|
|
41
|
-
}
|
|
42
|
-
if (config.svelte) {
|
|
43
|
-
files.push("**/*.svelte");
|
|
44
|
-
}
|
|
45
|
-
if (config.vue) {
|
|
46
|
-
files.push("**/*.vue");
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
name: "azat-io/perfectionist/rules",
|
|
50
|
-
files,
|
|
51
|
-
plugins: {
|
|
52
|
-
perfectionist: perfectionistPlugin
|
|
53
|
-
},
|
|
54
|
-
rules: {
|
|
55
|
-
"perfectionist/sort-array-includes": ["error"],
|
|
56
|
-
"perfectionist/sort-classes": ["error"],
|
|
57
|
-
"perfectionist/sort-decorators": ["error"],
|
|
58
|
-
"perfectionist/sort-enums": ["error"],
|
|
59
|
-
"perfectionist/sort-exports": ["error"],
|
|
60
|
-
"perfectionist/sort-heritage-clauses": ["error"],
|
|
61
|
-
"perfectionist/sort-imports": ["error"],
|
|
62
|
-
"perfectionist/sort-interfaces": ["error"],
|
|
63
|
-
"perfectionist/sort-intersection-types": ["error"],
|
|
64
|
-
"perfectionist/sort-jsx-props": ["error"],
|
|
65
|
-
"perfectionist/sort-maps": ["error"],
|
|
66
|
-
"perfectionist/sort-modules": ["error"],
|
|
67
|
-
"perfectionist/sort-named-exports": ["error"],
|
|
68
|
-
"perfectionist/sort-named-imports": ["error"],
|
|
69
|
-
"perfectionist/sort-object-types": ["error"],
|
|
70
|
-
"perfectionist/sort-objects": ["error"],
|
|
71
|
-
"perfectionist/sort-sets": ["error"],
|
|
72
|
-
"perfectionist/sort-switch-case": ["error"],
|
|
73
|
-
"perfectionist/sort-union-types": ["error"],
|
|
74
|
-
"perfectionist/sort-variable-declarations": ["error"]
|
|
75
|
-
},
|
|
76
|
-
settings: {
|
|
77
|
-
perfectionist: {
|
|
78
|
-
order: "desc",
|
|
79
|
-
type: "line-length"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
exports.perfectionist = perfectionist;
|
package/dist/qwik/index.cjs
DELETED
|
@@ -1,51 +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 utilities = require("../utilities.cjs");
|
|
22
|
-
let qwik = async (config) => {
|
|
23
|
-
if (!config.qwik) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
let qwikPlugin = await utilities.interopDefault(import("eslint-plugin-qwik"));
|
|
27
|
-
let files = ["**/*.jsx"];
|
|
28
|
-
if (config.typescript) {
|
|
29
|
-
files.push("**/*.tsx");
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
name: "azat-io/qwik/rules",
|
|
33
|
-
files,
|
|
34
|
-
plugins: {
|
|
35
|
-
qwik: qwikPlugin
|
|
36
|
-
},
|
|
37
|
-
rules: {
|
|
38
|
-
"qwik/jsx-a": "error",
|
|
39
|
-
"qwik/jsx-img": "error",
|
|
40
|
-
"qwik/jsx-key": "error",
|
|
41
|
-
"qwik/loader-location": "error",
|
|
42
|
-
"qwik/no-react-props": "error",
|
|
43
|
-
"qwik/no-use-visible-task": "error",
|
|
44
|
-
"qwik/prefer-classlist": "error",
|
|
45
|
-
"qwik/unused-server": "error",
|
|
46
|
-
"qwik/use-method-usage": "error",
|
|
47
|
-
"qwik/valid-lexical-scope": "error"
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
exports.qwik = qwik;
|
package/dist/react/index.cjs
DELETED
|
@@ -1,131 +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 utilities = require("../utilities.cjs");
|
|
22
|
-
let react = async (config) => {
|
|
23
|
-
if (!config.react) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
let [reactCompilerPlugin, reactHooksPlugin, reactPerfPlugin, reactPlugin] = await Promise.all([
|
|
27
|
-
utilities.interopDefault(import("eslint-plugin-react-compiler")),
|
|
28
|
-
utilities.interopDefault(import("eslint-plugin-react-hooks")),
|
|
29
|
-
utilities.interopDefault(import("eslint-plugin-react-perf")),
|
|
30
|
-
utilities.interopDefault(import("eslint-plugin-react"))
|
|
31
|
-
]);
|
|
32
|
-
let files = ["**/*.jsx"];
|
|
33
|
-
if (config.typescript) {
|
|
34
|
-
files.push("**/*.tsx");
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
name: "azat-io/react/rules",
|
|
38
|
-
files,
|
|
39
|
-
plugins: {
|
|
40
|
-
react: reactPlugin,
|
|
41
|
-
"react-compiler": reactCompilerPlugin,
|
|
42
|
-
"react-hooks": reactHooksPlugin,
|
|
43
|
-
"react-perf": reactPerfPlugin
|
|
44
|
-
},
|
|
45
|
-
rules: {
|
|
46
|
-
"react/button-has-type": "error",
|
|
47
|
-
"react/checked-requires-onchange-or-readonly": "error",
|
|
48
|
-
"react/forbid-prop-types": "error",
|
|
49
|
-
"react/forward-ref-uses-ref": "error",
|
|
50
|
-
"react/function-component-definition": [
|
|
51
|
-
"error",
|
|
52
|
-
{
|
|
53
|
-
namedComponents: "arrow-function"
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"react/hook-use-state": [
|
|
57
|
-
"error",
|
|
58
|
-
{
|
|
59
|
-
allowDestructuredState: true
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
"react/jsx-boolean-value": "error",
|
|
63
|
-
"react/jsx-curly-brace-presence": [
|
|
64
|
-
"error",
|
|
65
|
-
{
|
|
66
|
-
children: "never",
|
|
67
|
-
propElementValues: "always",
|
|
68
|
-
props: "never"
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
"react/jsx-fragments": "error",
|
|
72
|
-
"react/jsx-key": "error",
|
|
73
|
-
"react/jsx-no-comment-textnodes": "error",
|
|
74
|
-
"react/jsx-no-constructed-context-values": "error",
|
|
75
|
-
"react/jsx-no-duplicate-props": "error",
|
|
76
|
-
"react/jsx-no-leaked-render": "error",
|
|
77
|
-
"react/jsx-no-target-blank": "error",
|
|
78
|
-
"react/jsx-no-undef": "error",
|
|
79
|
-
"react/jsx-no-useless-fragment": "error",
|
|
80
|
-
"react/jsx-pascal-case": "error",
|
|
81
|
-
"react/jsx-uses-vars": "error",
|
|
82
|
-
"react/no-array-index-key": "error",
|
|
83
|
-
"react/no-arrow-function-lifecycle": "error",
|
|
84
|
-
"react/no-children-prop": "error",
|
|
85
|
-
"react/no-danger-with-children": "error",
|
|
86
|
-
"react/no-deprecated": "error",
|
|
87
|
-
"react/no-did-mount-set-state": "error",
|
|
88
|
-
"react/no-did-update-set-state": "error",
|
|
89
|
-
"react/no-direct-mutation-state": "error",
|
|
90
|
-
"react/no-find-dom-node": "error",
|
|
91
|
-
"react/no-invalid-html-attribute": "error",
|
|
92
|
-
"react/no-is-mounted": "error",
|
|
93
|
-
"react/no-namespace": "error",
|
|
94
|
-
"react/no-redundant-should-component-update": "error",
|
|
95
|
-
"react/no-render-return-value": "error",
|
|
96
|
-
"react/no-string-refs": "error",
|
|
97
|
-
"react/no-this-in-sfc": "error",
|
|
98
|
-
"react/no-typos": "error",
|
|
99
|
-
"react/no-unescaped-entities": "error",
|
|
100
|
-
"react/no-unknown-property": "error",
|
|
101
|
-
"react/no-unused-class-component-methods": "error",
|
|
102
|
-
"react/no-unused-state": "error",
|
|
103
|
-
"react/no-will-update-set-state": "error",
|
|
104
|
-
"react/require-render-return": "error",
|
|
105
|
-
"react/self-closing-comp": [
|
|
106
|
-
"error",
|
|
107
|
-
{
|
|
108
|
-
component: true,
|
|
109
|
-
html: true
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"react/style-prop-object": "error",
|
|
113
|
-
"react/void-dom-elements-no-children": "error",
|
|
114
|
-
"react-compiler/react-compiler": "error",
|
|
115
|
-
"react-hooks/exhaustive-deps": "error",
|
|
116
|
-
"react-hooks/rules-of-hooks": "error",
|
|
117
|
-
"react-perf/jsx-no-jsx-as-prop": "error",
|
|
118
|
-
"react-perf/jsx-no-new-array-as-prop": "error",
|
|
119
|
-
"react-perf/jsx-no-new-function-as-prop": "error",
|
|
120
|
-
"react-perf/jsx-no-new-object-as-prop": "error"
|
|
121
|
-
},
|
|
122
|
-
settings: {
|
|
123
|
-
react: {
|
|
124
|
-
fragment: "Fragment",
|
|
125
|
-
pragma: "React",
|
|
126
|
-
version: "detect"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
exports.react = react;
|
package/dist/svelte/index.cjs
DELETED
|
@@ -1,104 +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 utilities = require("../utilities.cjs");
|
|
22
|
-
let svelte = async (config) => {
|
|
23
|
-
if (!config.svelte) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
let files = ["**/*.svelte"];
|
|
27
|
-
let [sveltePlugin, svelteParser] = await Promise.all([
|
|
28
|
-
utilities.interopDefault(import("eslint-plugin-svelte")),
|
|
29
|
-
utilities.interopDefault(import("svelte-eslint-parser"))
|
|
30
|
-
]);
|
|
31
|
-
let additionalParserOptions = {};
|
|
32
|
-
if (config.typescript) {
|
|
33
|
-
let { parser: typescriptParser } = await utilities.interopDefault(
|
|
34
|
-
import("typescript-eslint")
|
|
35
|
-
);
|
|
36
|
-
additionalParserOptions = {
|
|
37
|
-
...additionalParserOptions,
|
|
38
|
-
parser: typescriptParser,
|
|
39
|
-
projectService: true,
|
|
40
|
-
tsconfigRootDir: process.cwd()
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
name: "azat-io/svelte/rules",
|
|
45
|
-
files,
|
|
46
|
-
languageOptions: {
|
|
47
|
-
parser: svelteParser,
|
|
48
|
-
parserOptions: {
|
|
49
|
-
ecmaVersion: "latest",
|
|
50
|
-
extraFileExtensions: [".svelte"],
|
|
51
|
-
sourceType: "module",
|
|
52
|
-
...additionalParserOptions
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
plugins: {
|
|
56
|
-
svelte: sveltePlugin
|
|
57
|
-
},
|
|
58
|
-
rules: {
|
|
59
|
-
"svelte/block-lang": [
|
|
60
|
-
"error",
|
|
61
|
-
{
|
|
62
|
-
enforceScriptPresent: true,
|
|
63
|
-
enforceStylePresent: false,
|
|
64
|
-
script: ["ts", null]
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
"svelte/button-has-type": "error",
|
|
68
|
-
"svelte/comment-directive": "error",
|
|
69
|
-
"svelte/derived-has-same-inputs-outputs": "error",
|
|
70
|
-
"svelte/infinite-reactive-loop": "error",
|
|
71
|
-
"svelte/no-at-debug-tags": "error",
|
|
72
|
-
"svelte/no-at-html-tags": "error",
|
|
73
|
-
"svelte/no-dom-manipulating": "error",
|
|
74
|
-
"svelte/no-dupe-else-if-blocks": "error",
|
|
75
|
-
"svelte/no-dupe-on-directives": "error",
|
|
76
|
-
"svelte/no-dupe-style-properties": "error",
|
|
77
|
-
"svelte/no-dupe-use-directives": "error",
|
|
78
|
-
"svelte/no-extra-reactive-curlies": "error",
|
|
79
|
-
"svelte/no-ignored-unsubscribe": "error",
|
|
80
|
-
"svelte/no-immutable-reactive-statements": "error",
|
|
81
|
-
"svelte/no-inner-declarations": "error",
|
|
82
|
-
"svelte/no-inspect": "error",
|
|
83
|
-
"svelte/no-object-in-text-mustaches": "error",
|
|
84
|
-
"svelte/no-reactive-functions": "error",
|
|
85
|
-
"svelte/no-shorthand-style-property-overrides": "error",
|
|
86
|
-
"svelte/no-svelte-internal": "error",
|
|
87
|
-
"svelte/no-target-blank": "error",
|
|
88
|
-
"svelte/no-unknown-style-directive-property": "error",
|
|
89
|
-
"svelte/no-unused-svelte-ignore": "error",
|
|
90
|
-
"svelte/no-useless-mustaches": "error",
|
|
91
|
-
"svelte/prefer-class-directive": "error",
|
|
92
|
-
"svelte/prefer-destructured-store-props": "error",
|
|
93
|
-
"svelte/prefer-style-directive": "error",
|
|
94
|
-
"svelte/require-each-key": "error",
|
|
95
|
-
"svelte/require-store-reactive-access": "error",
|
|
96
|
-
"svelte/require-stores-init": "error",
|
|
97
|
-
"svelte/shorthand-attribute": "error",
|
|
98
|
-
"svelte/shorthand-directive": "error",
|
|
99
|
-
"svelte/system": "error",
|
|
100
|
-
"svelte/valid-each-key": "error"
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
exports.svelte = svelte;
|