@luxass/eslint-config 4.2.6 → 4.2.7
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/README.md +4 -5
- package/dist/index.cjs +145 -446
- package/dist/index.d.cts +733 -12
- package/dist/index.d.ts +733 -12
- package/dist/{configs/index.cjs → index.js} +288 -516
- package/package.json +51 -85
- package/dist/chunk-2IR43M6N.mjs +0 -48
- package/dist/chunk-47ISSTHW.mjs +0 -291
- package/dist/chunk-4YBQZLPS.mjs +0 -68
- package/dist/chunk-4YT54JFZ.mjs +0 -48
- package/dist/chunk-5NK24IKQ.mjs +0 -26
- package/dist/chunk-AJS3TMZE.mjs +0 -63
- package/dist/chunk-C6FE5KXJ.mjs +0 -104
- package/dist/chunk-DAJA5AV3.mjs +0 -29
- package/dist/chunk-DCOLHWHC.mjs +0 -269
- package/dist/chunk-E4RVBKZB.mjs +0 -207
- package/dist/chunk-HZNHG5PB.mjs +0 -45
- package/dist/chunk-KOXCJL3C.mjs +0 -109
- package/dist/chunk-PFCAWBCD.mjs +0 -93
- package/dist/chunk-PFYV2TWZ.mjs +0 -117
- package/dist/chunk-QT6FHTFU.mjs +0 -92
- package/dist/chunk-RDZJT36Z.mjs +0 -57
- package/dist/chunk-RVSUTDCE.mjs +0 -57
- package/dist/chunk-TWAETZPX.mjs +0 -149
- package/dist/chunk-WSQOWO67.mjs +0 -16
- package/dist/chunk-XBASVDU6.mjs +0 -215
- package/dist/chunk-XD3UVRU7.mjs +0 -274
- package/dist/chunk-XGI647GZ.mjs +0 -81
- package/dist/chunk-XMXYE5WC.mjs +0 -183
- package/dist/chunk-YNMFVYL6.mjs +0 -69
- package/dist/chunk-YO3IYQ2L.mjs +0 -220
- package/dist/chunk-YZCJUX6Z.mjs +0 -0
- package/dist/configs/comments.cjs +0 -63
- package/dist/configs/comments.d.cts +0 -15
- package/dist/configs/comments.d.ts +0 -15
- package/dist/configs/comments.mjs +0 -6
- package/dist/configs/css/tailwindcss.cjs +0 -148
- package/dist/configs/css/tailwindcss.d.cts +0 -11
- package/dist/configs/css/tailwindcss.d.ts +0 -11
- package/dist/configs/css/tailwindcss.mjs +0 -8
- package/dist/configs/css/unocss.cjs +0 -133
- package/dist/configs/css/unocss.d.cts +0 -11
- package/dist/configs/css/unocss.d.ts +0 -11
- package/dist/configs/css/unocss.mjs +0 -8
- package/dist/configs/data/json.cjs +0 -155
- package/dist/configs/data/json.d.cts +0 -11
- package/dist/configs/data/json.d.ts +0 -11
- package/dist/configs/data/json.mjs +0 -8
- package/dist/configs/data/toml.cjs +0 -131
- package/dist/configs/data/toml.d.cts +0 -11
- package/dist/configs/data/toml.d.ts +0 -11
- package/dist/configs/data/toml.mjs +0 -8
- package/dist/configs/data/yaml.cjs +0 -143
- package/dist/configs/data/yaml.d.cts +0 -11
- package/dist/configs/data/yaml.d.ts +0 -11
- package/dist/configs/data/yaml.mjs +0 -8
- package/dist/configs/docs/jsdoc.cjs +0 -85
- package/dist/configs/docs/jsdoc.d.cts +0 -27
- package/dist/configs/docs/jsdoc.d.ts +0 -27
- package/dist/configs/docs/jsdoc.mjs +0 -7
- package/dist/configs/docs/markdown.cjs +0 -164
- package/dist/configs/docs/markdown.d.cts +0 -35
- package/dist/configs/docs/markdown.d.ts +0 -35
- package/dist/configs/docs/markdown.mjs +0 -8
- package/dist/configs/formatters.cjs +0 -274
- package/dist/configs/formatters.d.cts +0 -11
- package/dist/configs/formatters.d.ts +0 -11
- package/dist/configs/formatters.mjs +0 -9
- package/dist/configs/frameworks/astro.cjs +0 -179
- package/dist/configs/frameworks/astro.d.cts +0 -11
- package/dist/configs/frameworks/astro.d.ts +0 -11
- package/dist/configs/frameworks/astro.mjs +0 -8
- package/dist/configs/frameworks/nextjs.cjs +0 -180
- package/dist/configs/frameworks/nextjs.d.cts +0 -11
- package/dist/configs/frameworks/nextjs.d.ts +0 -11
- package/dist/configs/frameworks/nextjs.mjs +0 -8
- package/dist/configs/frameworks/react.cjs +0 -377
- package/dist/configs/frameworks/react.d.cts +0 -11
- package/dist/configs/frameworks/react.d.ts +0 -11
- package/dist/configs/frameworks/react.mjs +0 -8
- package/dist/configs/frameworks/solid.cjs +0 -360
- package/dist/configs/frameworks/solid.d.cts +0 -11
- package/dist/configs/frameworks/solid.d.ts +0 -11
- package/dist/configs/frameworks/solid.mjs +0 -8
- package/dist/configs/frameworks/vue.cjs +0 -293
- package/dist/configs/frameworks/vue.d.cts +0 -11
- package/dist/configs/frameworks/vue.d.ts +0 -11
- package/dist/configs/frameworks/vue.mjs +0 -8
- package/dist/configs/ignores.cjs +0 -96
- package/dist/configs/ignores.d.cts +0 -15
- package/dist/configs/ignores.d.ts +0 -15
- package/dist/configs/ignores.mjs +0 -7
- package/dist/configs/imports.cjs +0 -104
- package/dist/configs/imports.d.cts +0 -23
- package/dist/configs/imports.d.ts +0 -23
- package/dist/configs/imports.mjs +0 -7
- package/dist/configs/index.d.cts +0 -19
- package/dist/configs/index.d.ts +0 -19
- package/dist/configs/index.mjs +0 -99
- package/dist/configs/javascript.cjs +0 -324
- package/dist/configs/javascript.d.cts +0 -11
- package/dist/configs/javascript.d.ts +0 -11
- package/dist/configs/javascript.mjs +0 -7
- package/dist/configs/node.cjs +0 -60
- package/dist/configs/node.d.cts +0 -15
- package/dist/configs/node.d.ts +0 -15
- package/dist/configs/node.mjs +0 -6
- package/dist/configs/sort.cjs +0 -240
- package/dist/configs/sort.d.cts +0 -26
- package/dist/configs/sort.d.ts +0 -26
- package/dist/configs/sort.mjs +0 -8
- package/dist/configs/stylistic.cjs +0 -98
- package/dist/configs/stylistic.d.cts +0 -11
- package/dist/configs/stylistic.d.ts +0 -11
- package/dist/configs/stylistic.mjs +0 -9
- package/dist/configs/test.cjs +0 -210
- package/dist/configs/test.d.cts +0 -11
- package/dist/configs/test.d.ts +0 -11
- package/dist/configs/test.mjs +0 -8
- package/dist/configs/typescript.cjs +0 -291
- package/dist/configs/typescript.d.cts +0 -11
- package/dist/configs/typescript.d.ts +0 -11
- package/dist/configs/typescript.mjs +0 -8
- package/dist/configs/unicorn.cjs +0 -91
- package/dist/configs/unicorn.d.cts +0 -15
- package/dist/configs/unicorn.d.ts +0 -15
- package/dist/configs/unicorn.mjs +0 -6
- package/dist/globs.cjs +0 -158
- package/dist/globs.d.cts +0 -28
- package/dist/globs.d.ts +0 -28
- package/dist/globs.mjs +0 -56
- package/dist/index.mjs +0 -278
- package/dist/types-HqEzZfQU.d.cts +0 -668
- package/dist/types-HqEzZfQU.d.ts +0 -668
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/eslint-config",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.7",
|
|
4
4
|
"description": "ESLint config for @luxass",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"email": "lucasnrgaard@gmail.com",
|
|
9
9
|
"url": "https://luxass.dev"
|
|
10
10
|
},
|
|
11
|
-
"packageManager": "pnpm@8.
|
|
11
|
+
"packageManager": "pnpm@8.15.4",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -23,49 +23,12 @@
|
|
|
23
23
|
],
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|
|
26
|
-
"import":
|
|
27
|
-
|
|
28
|
-
"default": "./dist/index.mjs"
|
|
29
|
-
},
|
|
30
|
-
"require": {
|
|
31
|
-
"types": "./dist/index.d.cts",
|
|
32
|
-
"default": "./dist/index.cjs"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"./globs": {
|
|
36
|
-
"import": {
|
|
37
|
-
"types": "./dist/globs.d.ts",
|
|
38
|
-
"default": "./dist/globs.mjs"
|
|
39
|
-
},
|
|
40
|
-
"require": {
|
|
41
|
-
"types": "./dist/globs.d.cts",
|
|
42
|
-
"default": "./dist/globs.cjs"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"./configs": {
|
|
46
|
-
"import": {
|
|
47
|
-
"types": "./dist/configs/index.d.ts",
|
|
48
|
-
"default": "./dist/configs/index.mjs"
|
|
49
|
-
},
|
|
50
|
-
"require": {
|
|
51
|
-
"types": "./dist/configs/index.d.cts",
|
|
52
|
-
"default": "./dist/configs/index.cjs"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"./configs/*": {
|
|
56
|
-
"import": {
|
|
57
|
-
"types": "./dist/configs/*.d.ts",
|
|
58
|
-
"default": "./dist/configs/*.mjs"
|
|
59
|
-
},
|
|
60
|
-
"require": {
|
|
61
|
-
"types": "./dist/configs/*.d.cts",
|
|
62
|
-
"default": "./dist/configs/*.cjs"
|
|
63
|
-
}
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"require": "./dist/index.cjs"
|
|
64
28
|
},
|
|
65
29
|
"./package.json": "./package.json"
|
|
66
30
|
},
|
|
67
|
-
"main": "./dist/index.
|
|
68
|
-
"module": "./dist/index.mjs",
|
|
31
|
+
"main": "./dist/index.js",
|
|
69
32
|
"types": "./dist/index.d.ts",
|
|
70
33
|
"files": [
|
|
71
34
|
"dist"
|
|
@@ -74,7 +37,7 @@
|
|
|
74
37
|
"node": ">=18.18.0"
|
|
75
38
|
},
|
|
76
39
|
"scripts": {
|
|
77
|
-
"build": "tsup",
|
|
40
|
+
"build": "tsup --format esm,cjs --clean --dts",
|
|
78
41
|
"dev": "tsup --watch",
|
|
79
42
|
"lint": "eslint . --report-unused-disable-directives",
|
|
80
43
|
"test": "vitest --run",
|
|
@@ -84,19 +47,26 @@
|
|
|
84
47
|
"peerDependencies": {
|
|
85
48
|
"@next/eslint-plugin-next": ">=14.0.0",
|
|
86
49
|
"@unocss/eslint-plugin": ">=0.50.0",
|
|
50
|
+
"astro-eslint-parser": "^0.16.3",
|
|
87
51
|
"eslint": ">=8.40.0",
|
|
52
|
+
"eslint-plugin-astro": "^0.31.4",
|
|
88
53
|
"eslint-plugin-format": ">=0.1.0",
|
|
89
54
|
"eslint-plugin-react": ">=7.33.2",
|
|
90
55
|
"eslint-plugin-react-hooks": ">=4.6.0",
|
|
91
56
|
"eslint-plugin-react-refresh": ">=0.4",
|
|
92
|
-
"eslint-plugin-solid": ">=0.13.0",
|
|
93
57
|
"eslint-plugin-tailwindcss": ">=3.13.0",
|
|
94
|
-
"
|
|
58
|
+
"prettier-plugin-astro": "^0.13.0"
|
|
95
59
|
},
|
|
96
60
|
"peerDependenciesMeta": {
|
|
97
61
|
"@unocss/eslint-plugin": {
|
|
98
62
|
"optional": true
|
|
99
63
|
},
|
|
64
|
+
"astro-eslint-parser": {
|
|
65
|
+
"optional": true
|
|
66
|
+
},
|
|
67
|
+
"eslint-plugin-astro": {
|
|
68
|
+
"optional": true
|
|
69
|
+
},
|
|
100
70
|
"eslint-plugin-format": {
|
|
101
71
|
"optional": true
|
|
102
72
|
},
|
|
@@ -109,16 +79,13 @@
|
|
|
109
79
|
"eslint-plugin-react-refresh": {
|
|
110
80
|
"optional": true
|
|
111
81
|
},
|
|
112
|
-
"
|
|
113
|
-
"optional": true
|
|
114
|
-
},
|
|
115
|
-
"eslint-plugin-tailwindcss": {
|
|
82
|
+
"prettier-plugin-astro": {
|
|
116
83
|
"optional": true
|
|
117
84
|
},
|
|
118
|
-
"eslint-plugin-
|
|
85
|
+
"@next/eslint-plugin-next": {
|
|
119
86
|
"optional": true
|
|
120
87
|
},
|
|
121
|
-
"eslint-plugin-
|
|
88
|
+
"eslint-plugin-tailwindcss": {
|
|
122
89
|
"optional": true
|
|
123
90
|
}
|
|
124
91
|
},
|
|
@@ -126,64 +93,63 @@
|
|
|
126
93
|
"@antfu/eslint-define-config": "^1.23.0-2",
|
|
127
94
|
"@antfu/install-pkg": "^0.3.1",
|
|
128
95
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
|
|
129
|
-
"@eslint-types/jsdoc": "^48.0
|
|
130
|
-
"@eslint-types/typescript-eslint": "^
|
|
131
|
-
"@eslint-types/unicorn": "^
|
|
132
|
-
"@stylistic/eslint-plugin": "^1.
|
|
133
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
134
|
-
"@typescript-eslint/parser": "^
|
|
135
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
96
|
+
"@eslint-types/jsdoc": "^48.2.0",
|
|
97
|
+
"@eslint-types/typescript-eslint": "^7.0.2",
|
|
98
|
+
"@eslint-types/unicorn": "^51.0.1",
|
|
99
|
+
"@stylistic/eslint-plugin": "^1.6.3",
|
|
100
|
+
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
|
101
|
+
"@typescript-eslint/parser": "^7.1.1",
|
|
102
|
+
"eslint-config-flat-gitignore": "^0.1.3",
|
|
136
103
|
"eslint-merge-processors": "^0.1.0",
|
|
137
104
|
"eslint-parser-plain": "^0.1.0",
|
|
138
|
-
"eslint-plugin-antfu": "^2.1.
|
|
139
|
-
"eslint-plugin-astro": "^0.31.3",
|
|
105
|
+
"eslint-plugin-antfu": "^2.1.2",
|
|
140
106
|
"eslint-plugin-i": "^2.29.1",
|
|
141
|
-
"eslint-plugin-jsdoc": "^48.
|
|
142
|
-
"eslint-plugin-jsonc": "^2.
|
|
107
|
+
"eslint-plugin-jsdoc": "^48.2.1",
|
|
108
|
+
"eslint-plugin-jsonc": "^2.13.0",
|
|
143
109
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
144
|
-
"eslint-plugin-markdown": "^
|
|
110
|
+
"eslint-plugin-markdown": "^4.0.1",
|
|
145
111
|
"eslint-plugin-n": "^16.6.2",
|
|
146
112
|
"eslint-plugin-sort-keys": "^2.3.5",
|
|
147
113
|
"eslint-plugin-toml": "^0.9.2",
|
|
148
|
-
"eslint-plugin-unicorn": "^
|
|
149
|
-
"eslint-plugin-unused-imports": "^3.
|
|
150
|
-
"eslint-plugin-vitest": "^0.3.
|
|
151
|
-
"eslint-plugin-vue": "^9.
|
|
114
|
+
"eslint-plugin-unicorn": "^51.0.1",
|
|
115
|
+
"eslint-plugin-unused-imports": "^3.1.0",
|
|
116
|
+
"eslint-plugin-vitest": "^0.3.24",
|
|
117
|
+
"eslint-plugin-vue": "^9.22.0",
|
|
152
118
|
"eslint-plugin-yml": "^1.12.2",
|
|
153
119
|
"eslint-processor-vue-blocks": "^0.1.1",
|
|
154
|
-
"globals": "^
|
|
120
|
+
"globals": "^14.0.0",
|
|
155
121
|
"jsonc-eslint-parser": "^2.4.0",
|
|
156
122
|
"local-pkg": "^0.5.0",
|
|
157
123
|
"parse-gitignore": "^2.0.0",
|
|
158
124
|
"prompts": "^2.4.2",
|
|
159
125
|
"toml-eslint-parser": "^0.9.3",
|
|
160
|
-
"vue-eslint-parser": "^9.4.
|
|
126
|
+
"vue-eslint-parser": "^9.4.2",
|
|
161
127
|
"yaml-eslint-parser": "^1.2.2"
|
|
162
128
|
},
|
|
163
129
|
"devDependencies": {
|
|
164
130
|
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
|
|
165
|
-
"@next/eslint-plugin-next": "^14.1.
|
|
166
|
-
"@stylistic/eslint-plugin-migrate": "^1.
|
|
167
|
-
"@types/eslint": "^8.56.
|
|
131
|
+
"@next/eslint-plugin-next": "^14.1.3",
|
|
132
|
+
"@stylistic/eslint-plugin-migrate": "^1.6.3",
|
|
133
|
+
"@types/eslint": "^8.56.5",
|
|
168
134
|
"@types/estree": "^1.0.5",
|
|
169
135
|
"@types/node": "^18.17.19",
|
|
170
136
|
"@types/prompts": "^2.4.9",
|
|
171
|
-
"@typescript-eslint/rule-tester": "^
|
|
172
|
-
"@
|
|
173
|
-
"
|
|
174
|
-
"eslint": "^8.
|
|
137
|
+
"@typescript-eslint/rule-tester": "^7.1.1",
|
|
138
|
+
"@unocss/eslint-plugin": "^0.58.5",
|
|
139
|
+
"astro-eslint-parser": "^0.16.3",
|
|
140
|
+
"eslint": "^8.57.0",
|
|
141
|
+
"eslint-plugin-astro": "^0.31.4",
|
|
175
142
|
"eslint-plugin-format": "^0.1.0",
|
|
176
|
-
"eslint-plugin-react": "^7.
|
|
143
|
+
"eslint-plugin-react": "^7.34.0",
|
|
177
144
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
178
145
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
179
|
-
"eslint-plugin-
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"vitest": "^1.2.1"
|
|
146
|
+
"eslint-plugin-tailwindcss": "^3.14.3",
|
|
147
|
+
"lint-staged": "^15.2.2",
|
|
148
|
+
"prettier-plugin-astro": "^0.13.0",
|
|
149
|
+
"simple-git-hooks": "^2.10.0",
|
|
150
|
+
"tsup": "^8.0.2",
|
|
151
|
+
"typescript": "^5.4.2",
|
|
152
|
+
"vitest": "^1.3.1"
|
|
187
153
|
},
|
|
188
154
|
"simple-git-hooks": {
|
|
189
155
|
"pre-commit": "pnpm lint-staged"
|
package/dist/chunk-2IR43M6N.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ensure,
|
|
3
|
-
interop
|
|
4
|
-
} from "./chunk-4YBQZLPS.mjs";
|
|
5
|
-
import {
|
|
6
|
-
GLOB_SRC
|
|
7
|
-
} from "./chunk-KOXCJL3C.mjs";
|
|
8
|
-
|
|
9
|
-
// src/configs/css/unocss.ts
|
|
10
|
-
async function unocss(options = {}) {
|
|
11
|
-
const {
|
|
12
|
-
attributify = true,
|
|
13
|
-
files = [GLOB_SRC],
|
|
14
|
-
overrides,
|
|
15
|
-
strict = false
|
|
16
|
-
} = options;
|
|
17
|
-
await ensure([
|
|
18
|
-
"@unocss/eslint-plugin"
|
|
19
|
-
]);
|
|
20
|
-
const [
|
|
21
|
-
pluginUnoCSS
|
|
22
|
-
] = await Promise.all([
|
|
23
|
-
interop(import("@unocss/eslint-plugin"))
|
|
24
|
-
]);
|
|
25
|
-
return [
|
|
26
|
-
{
|
|
27
|
-
name: "luxass:unocss",
|
|
28
|
-
files,
|
|
29
|
-
plugins: {
|
|
30
|
-
unocss: pluginUnoCSS
|
|
31
|
-
},
|
|
32
|
-
rules: {
|
|
33
|
-
"unocss/order": "warn",
|
|
34
|
-
...attributify ? {
|
|
35
|
-
"unocss/order-attributify": "warn"
|
|
36
|
-
} : {},
|
|
37
|
-
...strict ? {
|
|
38
|
-
"unocss/blocklist": "error"
|
|
39
|
-
} : {},
|
|
40
|
-
...overrides
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export {
|
|
47
|
-
unocss
|
|
48
|
-
};
|
package/dist/chunk-47ISSTHW.mjs
DELETED
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ensure,
|
|
3
|
-
interop
|
|
4
|
-
} from "./chunk-4YBQZLPS.mjs";
|
|
5
|
-
import {
|
|
6
|
-
GLOB_JSX,
|
|
7
|
-
GLOB_TSX
|
|
8
|
-
} from "./chunk-KOXCJL3C.mjs";
|
|
9
|
-
|
|
10
|
-
// src/configs/frameworks/react.ts
|
|
11
|
-
import { isPackageExists } from "local-pkg";
|
|
12
|
-
async function react(options = {}) {
|
|
13
|
-
const {
|
|
14
|
-
a11y = false,
|
|
15
|
-
files = [GLOB_JSX, GLOB_TSX],
|
|
16
|
-
overrides = {},
|
|
17
|
-
typescript = true
|
|
18
|
-
} = options;
|
|
19
|
-
await ensure([
|
|
20
|
-
"eslint-plugin-react",
|
|
21
|
-
"eslint-plugin-react-hooks",
|
|
22
|
-
"eslint-plugin-react-refresh",
|
|
23
|
-
...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
|
|
24
|
-
]);
|
|
25
|
-
const [
|
|
26
|
-
pluginReact,
|
|
27
|
-
pluginReactHooks,
|
|
28
|
-
pluginReactRefresh,
|
|
29
|
-
pluginA11y
|
|
30
|
-
] = await Promise.all([
|
|
31
|
-
interop(import("eslint-plugin-react")),
|
|
32
|
-
interop(import("eslint-plugin-react-hooks")),
|
|
33
|
-
interop(import("eslint-plugin-react-refresh")),
|
|
34
|
-
...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
|
|
35
|
-
]);
|
|
36
|
-
const isAllowConstantExport = isPackageExists("vite");
|
|
37
|
-
return [
|
|
38
|
-
{
|
|
39
|
-
name: "luxass:react:setup",
|
|
40
|
-
plugins: {
|
|
41
|
-
"react": pluginReact,
|
|
42
|
-
"react-hooks": pluginReactHooks,
|
|
43
|
-
"react-refresh": pluginReactRefresh,
|
|
44
|
-
...a11y ? { "jsx-a11y": pluginA11y } : {}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: "luxass:react:rules",
|
|
49
|
-
files,
|
|
50
|
-
languageOptions: {
|
|
51
|
-
parserOptions: {
|
|
52
|
-
ecmaFeatures: {
|
|
53
|
-
jsx: true
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
rules: {
|
|
58
|
-
...a11y ? {
|
|
59
|
-
// recommended rules for jsx-a11y
|
|
60
|
-
"jsx-a11y/alt-text": "error",
|
|
61
|
-
"jsx-a11y/anchor-ambiguous-text": "off",
|
|
62
|
-
"jsx-a11y/anchor-has-content": "error",
|
|
63
|
-
"jsx-a11y/anchor-is-valid": "error",
|
|
64
|
-
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
65
|
-
"jsx-a11y/aria-props": "error",
|
|
66
|
-
"jsx-a11y/aria-proptypes": "error",
|
|
67
|
-
"jsx-a11y/aria-role": "error",
|
|
68
|
-
"jsx-a11y/aria-unsupported-elements": "error",
|
|
69
|
-
"jsx-a11y/autocomplete-valid": "error",
|
|
70
|
-
"jsx-a11y/click-events-have-key-events": "error",
|
|
71
|
-
"jsx-a11y/control-has-associated-label": [
|
|
72
|
-
"off",
|
|
73
|
-
{
|
|
74
|
-
ignoreElements: [
|
|
75
|
-
"audio",
|
|
76
|
-
"canvas",
|
|
77
|
-
"embed",
|
|
78
|
-
"input",
|
|
79
|
-
"textarea",
|
|
80
|
-
"tr",
|
|
81
|
-
"video"
|
|
82
|
-
],
|
|
83
|
-
ignoreRoles: [
|
|
84
|
-
"grid",
|
|
85
|
-
"listbox",
|
|
86
|
-
"menu",
|
|
87
|
-
"menubar",
|
|
88
|
-
"radiogroup",
|
|
89
|
-
"row",
|
|
90
|
-
"tablist",
|
|
91
|
-
"toolbar",
|
|
92
|
-
"tree",
|
|
93
|
-
"treegrid"
|
|
94
|
-
],
|
|
95
|
-
includeRoles: [
|
|
96
|
-
"alert",
|
|
97
|
-
"dialog"
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"jsx-a11y/heading-has-content": "error",
|
|
102
|
-
"jsx-a11y/html-has-lang": "error",
|
|
103
|
-
"jsx-a11y/iframe-has-title": "error",
|
|
104
|
-
"jsx-a11y/img-redundant-alt": "error",
|
|
105
|
-
"jsx-a11y/interactive-supports-focus": [
|
|
106
|
-
"error",
|
|
107
|
-
{
|
|
108
|
-
tabbable: [
|
|
109
|
-
"button",
|
|
110
|
-
"checkbox",
|
|
111
|
-
"link",
|
|
112
|
-
"searchbox",
|
|
113
|
-
"spinbutton",
|
|
114
|
-
"switch",
|
|
115
|
-
"textbox"
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
],
|
|
119
|
-
"jsx-a11y/label-has-associated-control": "error",
|
|
120
|
-
"jsx-a11y/label-has-for": "off",
|
|
121
|
-
"jsx-a11y/media-has-caption": "error",
|
|
122
|
-
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
123
|
-
"jsx-a11y/no-access-key": "error",
|
|
124
|
-
"jsx-a11y/no-autofocus": "error",
|
|
125
|
-
"jsx-a11y/no-distracting-elements": "error",
|
|
126
|
-
"jsx-a11y/no-interactive-element-to-noninteractive-role": [
|
|
127
|
-
"error",
|
|
128
|
-
{
|
|
129
|
-
canvas: [
|
|
130
|
-
"img"
|
|
131
|
-
],
|
|
132
|
-
tr: [
|
|
133
|
-
"none",
|
|
134
|
-
"presentation"
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
],
|
|
138
|
-
"jsx-a11y/no-noninteractive-element-interactions": [
|
|
139
|
-
"error",
|
|
140
|
-
{
|
|
141
|
-
alert: [
|
|
142
|
-
"onKeyUp",
|
|
143
|
-
"onKeyDown",
|
|
144
|
-
"onKeyPress"
|
|
145
|
-
],
|
|
146
|
-
body: [
|
|
147
|
-
"onError",
|
|
148
|
-
"onLoad"
|
|
149
|
-
],
|
|
150
|
-
dialog: [
|
|
151
|
-
"onKeyUp",
|
|
152
|
-
"onKeyDown",
|
|
153
|
-
"onKeyPress"
|
|
154
|
-
],
|
|
155
|
-
handlers: [
|
|
156
|
-
"onClick",
|
|
157
|
-
"onError",
|
|
158
|
-
"onLoad",
|
|
159
|
-
"onMouseDown",
|
|
160
|
-
"onMouseUp",
|
|
161
|
-
"onKeyPress",
|
|
162
|
-
"onKeyDown",
|
|
163
|
-
"onKeyUp"
|
|
164
|
-
],
|
|
165
|
-
iframe: [
|
|
166
|
-
"onError",
|
|
167
|
-
"onLoad"
|
|
168
|
-
],
|
|
169
|
-
img: [
|
|
170
|
-
"onError",
|
|
171
|
-
"onLoad"
|
|
172
|
-
]
|
|
173
|
-
}
|
|
174
|
-
],
|
|
175
|
-
"jsx-a11y/no-noninteractive-element-to-interactive-role": [
|
|
176
|
-
"error",
|
|
177
|
-
{
|
|
178
|
-
fieldset: [
|
|
179
|
-
"radiogroup",
|
|
180
|
-
"presentation"
|
|
181
|
-
],
|
|
182
|
-
li: [
|
|
183
|
-
"menuitem",
|
|
184
|
-
"option",
|
|
185
|
-
"row",
|
|
186
|
-
"tab",
|
|
187
|
-
"treeitem"
|
|
188
|
-
],
|
|
189
|
-
ol: [
|
|
190
|
-
"listbox",
|
|
191
|
-
"menu",
|
|
192
|
-
"menubar",
|
|
193
|
-
"radiogroup",
|
|
194
|
-
"tablist",
|
|
195
|
-
"tree",
|
|
196
|
-
"treegrid"
|
|
197
|
-
],
|
|
198
|
-
table: [
|
|
199
|
-
"grid"
|
|
200
|
-
],
|
|
201
|
-
td: [
|
|
202
|
-
"gridcell"
|
|
203
|
-
],
|
|
204
|
-
ul: [
|
|
205
|
-
"listbox",
|
|
206
|
-
"menu",
|
|
207
|
-
"menubar",
|
|
208
|
-
"radiogroup",
|
|
209
|
-
"tablist",
|
|
210
|
-
"tree",
|
|
211
|
-
"treegrid"
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
],
|
|
215
|
-
"jsx-a11y/no-noninteractive-tabindex": [
|
|
216
|
-
"error",
|
|
217
|
-
{
|
|
218
|
-
allowExpressionValues: true,
|
|
219
|
-
roles: [
|
|
220
|
-
"tabpanel"
|
|
221
|
-
],
|
|
222
|
-
tags: []
|
|
223
|
-
}
|
|
224
|
-
],
|
|
225
|
-
"jsx-a11y/no-redundant-roles": "error",
|
|
226
|
-
"jsx-a11y/no-static-element-interactions": [
|
|
227
|
-
"error",
|
|
228
|
-
{
|
|
229
|
-
allowExpressionValues: true,
|
|
230
|
-
handlers: [
|
|
231
|
-
"onClick",
|
|
232
|
-
"onMouseDown",
|
|
233
|
-
"onMouseUp",
|
|
234
|
-
"onKeyPress",
|
|
235
|
-
"onKeyDown",
|
|
236
|
-
"onKeyUp"
|
|
237
|
-
]
|
|
238
|
-
}
|
|
239
|
-
],
|
|
240
|
-
"jsx-a11y/role-has-required-aria-props": "error",
|
|
241
|
-
"jsx-a11y/role-supports-aria-props": "error",
|
|
242
|
-
"jsx-a11y/scope": "error",
|
|
243
|
-
"jsx-a11y/tabindex-no-positive": "error"
|
|
244
|
-
} : {},
|
|
245
|
-
// recommended rules react
|
|
246
|
-
"react/display-name": "error",
|
|
247
|
-
"react/jsx-key": "error",
|
|
248
|
-
"react/jsx-no-comment-textnodes": "error",
|
|
249
|
-
"react/jsx-no-duplicate-props": "error",
|
|
250
|
-
"react/jsx-no-target-blank": "error",
|
|
251
|
-
"react/jsx-no-undef": "error",
|
|
252
|
-
"react/jsx-uses-react": "error",
|
|
253
|
-
"react/jsx-uses-vars": "error",
|
|
254
|
-
"react/no-children-prop": "error",
|
|
255
|
-
"react/no-danger-with-children": "error",
|
|
256
|
-
"react/no-deprecated": "error",
|
|
257
|
-
"react/no-direct-mutation-state": "error",
|
|
258
|
-
"react/no-find-dom-node": "error",
|
|
259
|
-
"react/no-is-mounted": "error",
|
|
260
|
-
"react/no-render-return-value": "error",
|
|
261
|
-
"react/no-string-refs": "error",
|
|
262
|
-
"react/no-unescaped-entities": "error",
|
|
263
|
-
"react/no-unknown-property": "error",
|
|
264
|
-
"react/no-unsafe": "off",
|
|
265
|
-
"react/prop-types": "error",
|
|
266
|
-
"react/react-in-jsx-scope": "off",
|
|
267
|
-
"react/require-render-return": "error",
|
|
268
|
-
// recommended rules react-hooks
|
|
269
|
-
"react-hooks/exhaustive-deps": "warn",
|
|
270
|
-
"react-hooks/rules-of-hooks": "error",
|
|
271
|
-
// react refresh
|
|
272
|
-
"react-refresh/only-export-components": ["warn", { allowConstantExport: isAllowConstantExport }],
|
|
273
|
-
...typescript ? {
|
|
274
|
-
"react/jsx-no-undef": "off",
|
|
275
|
-
"react/prop-type": "off"
|
|
276
|
-
} : {},
|
|
277
|
-
// overrides
|
|
278
|
-
...overrides
|
|
279
|
-
},
|
|
280
|
-
settings: {
|
|
281
|
-
react: {
|
|
282
|
-
version: "detect"
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
];
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export {
|
|
290
|
-
react
|
|
291
|
-
};
|
package/dist/chunk-4YBQZLPS.mjs
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// src/utils.ts
|
|
2
|
-
import process from "node:process";
|
|
3
|
-
import { isPackageExists } from "local-pkg";
|
|
4
|
-
async function combine(...configs) {
|
|
5
|
-
const resolved = await Promise.all(configs);
|
|
6
|
-
return resolved.flat();
|
|
7
|
-
}
|
|
8
|
-
function renameRules(rules, from, to) {
|
|
9
|
-
return Object.fromEntries(
|
|
10
|
-
Object.entries(rules).map(([key, value]) => {
|
|
11
|
-
if (key.startsWith(from)) {
|
|
12
|
-
return [to + key.slice(from.length), value];
|
|
13
|
-
}
|
|
14
|
-
return [key, value];
|
|
15
|
-
})
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
function toArray(value) {
|
|
19
|
-
return Array.isArray(value) ? value : [value];
|
|
20
|
-
}
|
|
21
|
-
async function interop(m) {
|
|
22
|
-
const resolved = await m;
|
|
23
|
-
return resolved.default || resolved;
|
|
24
|
-
}
|
|
25
|
-
async function ensure(packages) {
|
|
26
|
-
if (process.env.CI || process.stdout.isTTY === false) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
;
|
|
30
|
-
const nonExistingPackages = packages.filter((i) => !isPackageExists(i));
|
|
31
|
-
if (nonExistingPackages.length === 0) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
;
|
|
35
|
-
const { default: prompts } = await import("prompts");
|
|
36
|
-
const { result } = await prompts([
|
|
37
|
-
{
|
|
38
|
-
name: "result",
|
|
39
|
-
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
|
|
40
|
-
type: "confirm"
|
|
41
|
-
}
|
|
42
|
-
]);
|
|
43
|
-
if (result) {
|
|
44
|
-
await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
|
|
45
|
-
dev: true
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
;
|
|
49
|
-
}
|
|
50
|
-
function resolveSubOptions(options, key) {
|
|
51
|
-
return typeof options[key] === "boolean" ? {} : options[key] || {};
|
|
52
|
-
}
|
|
53
|
-
function getOverrides(options, key) {
|
|
54
|
-
const sub = resolveSubOptions(options, key);
|
|
55
|
-
return {
|
|
56
|
-
..."overrides" in sub ? sub.overrides : {}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export {
|
|
61
|
-
combine,
|
|
62
|
-
renameRules,
|
|
63
|
-
toArray,
|
|
64
|
-
interop,
|
|
65
|
-
ensure,
|
|
66
|
-
resolveSubOptions,
|
|
67
|
-
getOverrides
|
|
68
|
-
};
|
package/dist/chunk-4YT54JFZ.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GLOB_SRC_EXT
|
|
3
|
-
} from "./chunk-KOXCJL3C.mjs";
|
|
4
|
-
|
|
5
|
-
// src/configs/imports.ts
|
|
6
|
-
import pluginImport from "eslint-plugin-i";
|
|
7
|
-
import pluginAntfu from "eslint-plugin-antfu";
|
|
8
|
-
async function imports(options = {}) {
|
|
9
|
-
const {
|
|
10
|
-
stylistic = true
|
|
11
|
-
} = options;
|
|
12
|
-
return [
|
|
13
|
-
{
|
|
14
|
-
name: "luxass:imports",
|
|
15
|
-
plugins: {
|
|
16
|
-
antfu: pluginAntfu,
|
|
17
|
-
import: pluginImport
|
|
18
|
-
},
|
|
19
|
-
rules: {
|
|
20
|
-
"antfu/import-dedupe": "error",
|
|
21
|
-
"antfu/no-import-dist": "error",
|
|
22
|
-
"antfu/no-import-node-modules-by-path": "error",
|
|
23
|
-
"import/first": "error",
|
|
24
|
-
"import/no-duplicates": "error",
|
|
25
|
-
"import/no-mutable-exports": "error",
|
|
26
|
-
"import/no-named-default": "error",
|
|
27
|
-
"import/no-self-import": "error",
|
|
28
|
-
"import/no-webpack-loader-syntax": "error",
|
|
29
|
-
"import/order": "error",
|
|
30
|
-
...stylistic ? {
|
|
31
|
-
"import/newline-after-import": ["error", { considerComments: true, count: 1 }]
|
|
32
|
-
} : {}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: "luxass:imports:bin",
|
|
37
|
-
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
38
|
-
rules: {
|
|
39
|
-
"antfu/no-import-dist": "off",
|
|
40
|
-
"antfu/no-import-node-modules-by-path": "off"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export {
|
|
47
|
-
imports
|
|
48
|
-
};
|