@th1o/frontend-lint 0.0.1

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.
@@ -0,0 +1,6 @@
1
+ //#region src/namespace.ts
2
+ const LINT_NAMESPACE = "ynzh";
3
+ const PACKAGE_NAMESPACE = "frontend-lint";
4
+
5
+ //#endregion
6
+ export { PACKAGE_NAMESPACE as n, LINT_NAMESPACE as t };
@@ -0,0 +1,6 @@
1
+ import { Config } from "stylelint";
2
+
3
+ //#region src/stylelint.d.ts
4
+ declare function createStylelintConfig(): Config;
5
+ //#endregion
6
+ export { createStylelintConfig };
@@ -0,0 +1,18 @@
1
+ //#region src/stylelint.ts
2
+ function createStylelintConfig() {
3
+ return {
4
+ extends: [
5
+ "stylelint-config-standard",
6
+ "stylelint-config-recess-order",
7
+ "stylelint-config-recommended-vue"
8
+ ],
9
+ rules: {
10
+ "declaration-no-important": true,
11
+ "function-url-quotes": "never",
12
+ "selector-max-id": [0, { ignoreContextFunctionalPseudoClasses: [":not", "/^:(h|H)as$/"] }]
13
+ }
14
+ };
15
+ }
16
+
17
+ //#endregion
18
+ export { createStylelintConfig };
package/package.json ADDED
@@ -0,0 +1,208 @@
1
+ {
2
+ "name": "@th1o/frontend-lint",
3
+ "type": "module",
4
+ "version": "0.0.1",
5
+ "description": "ESLint config",
6
+ "author": "张天昊 <theozhang.tech@outlook.com>",
7
+ "keywords": [
8
+ "eslint-config"
9
+ ],
10
+ "exports": {
11
+ ".": "./dist/index.mjs",
12
+ "./cli": "./dist/cli.mjs",
13
+ "./stylelint": "./dist/stylelint.mjs",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "main": "./dist/index.mjs",
17
+ "module": "./dist/index.mjs",
18
+ "types": "./dist/index.d.mts",
19
+ "bin": "./bin/index.mjs",
20
+ "files": [
21
+ "bin",
22
+ "dist"
23
+ ],
24
+ "peerDependencies": {
25
+ "@eslint-react/eslint-plugin": "^2.0.1",
26
+ "@next/eslint-plugin-next": ">=15.0.0",
27
+ "@prettier/plugin-xml": "^3.4.1",
28
+ "@unocss/eslint-plugin": ">=0.50.0",
29
+ "astro-eslint-parser": "^1.0.2",
30
+ "eslint": "^9.10.0",
31
+ "eslint-plugin-astro": "^1.2.0",
32
+ "eslint-plugin-format": ">=0.1.0",
33
+ "eslint-plugin-jsx-a11y": ">=6.10.2",
34
+ "eslint-plugin-react-hooks": "^7.0.0",
35
+ "eslint-plugin-react-refresh": "^0.4.19",
36
+ "eslint-plugin-solid": "^0.14.3",
37
+ "eslint-plugin-svelte": ">=2.35.1",
38
+ "eslint-plugin-vuejs-accessibility": "^2.4.1",
39
+ "prettier-plugin-astro": "^0.14.0",
40
+ "prettier-plugin-slidev": "^1.0.5",
41
+ "stylelint": ">=17.0.0",
42
+ "svelte-eslint-parser": ">=0.37.0"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "@eslint-react/eslint-plugin": {
46
+ "optional": true
47
+ },
48
+ "@next/eslint-plugin-next": {
49
+ "optional": true
50
+ },
51
+ "@prettier/plugin-xml": {
52
+ "optional": true
53
+ },
54
+ "@unocss/eslint-plugin": {
55
+ "optional": true
56
+ },
57
+ "astro-eslint-parser": {
58
+ "optional": true
59
+ },
60
+ "eslint-plugin-astro": {
61
+ "optional": true
62
+ },
63
+ "eslint-plugin-format": {
64
+ "optional": true
65
+ },
66
+ "eslint-plugin-jsx-a11y": {
67
+ "optional": true
68
+ },
69
+ "eslint-plugin-react-hooks": {
70
+ "optional": true
71
+ },
72
+ "eslint-plugin-react-refresh": {
73
+ "optional": true
74
+ },
75
+ "eslint-plugin-solid": {
76
+ "optional": true
77
+ },
78
+ "eslint-plugin-svelte": {
79
+ "optional": true
80
+ },
81
+ "eslint-plugin-vuejs-accessibility": {
82
+ "optional": true
83
+ },
84
+ "prettier-plugin-astro": {
85
+ "optional": true
86
+ },
87
+ "prettier-plugin-slidev": {
88
+ "optional": true
89
+ },
90
+ "svelte-eslint-parser": {
91
+ "optional": true
92
+ }
93
+ },
94
+ "dependencies": {
95
+ "@antfu/install-pkg": "^1.1.0",
96
+ "@clack/prompts": "^0.11.0",
97
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
98
+ "@eslint/markdown": "^7.5.1",
99
+ "@stylistic/eslint-plugin": "^5.7.1",
100
+ "@typescript-eslint/eslint-plugin": "^8.54.0",
101
+ "@typescript-eslint/parser": "^8.54.0",
102
+ "@vitest/eslint-plugin": "^1.6.6",
103
+ "ansis": "^4.2.0",
104
+ "cac": "^6.7.14",
105
+ "eslint-config-flat-gitignore": "^2.1.0",
106
+ "eslint-flat-config-utils": "^2.1.4",
107
+ "eslint-merge-processors": "^2.0.0",
108
+ "eslint-plugin-antfu": "^3.1.3",
109
+ "eslint-plugin-command": "^3.4.0",
110
+ "eslint-plugin-import-lite": "^0.5.0",
111
+ "eslint-plugin-jsdoc": "^62.4.1",
112
+ "eslint-plugin-jsonc": "^2.21.0",
113
+ "eslint-plugin-n": "^17.23.2",
114
+ "eslint-plugin-no-only-tests": "^3.3.0",
115
+ "eslint-plugin-perfectionist": "^5.4.0",
116
+ "eslint-plugin-pnpm": "^1.5.0",
117
+ "eslint-plugin-regexp": "^2.10.0",
118
+ "eslint-plugin-toml": "^1.0.3",
119
+ "eslint-plugin-typescript-enum": "^2.1.0",
120
+ "eslint-plugin-unicorn": "^62.0.0",
121
+ "eslint-plugin-unused-imports": "^4.3.0",
122
+ "eslint-plugin-vue": "^10.7.0",
123
+ "eslint-plugin-yml": "^3.0.0",
124
+ "eslint-processor-vue-blocks": "^2.0.0",
125
+ "globals": "^17.1.0",
126
+ "jsonc-eslint-parser": "^2.4.2",
127
+ "local-pkg": "^1.1.2",
128
+ "parse-gitignore": "^2.0.0",
129
+ "stylelint-config-recess-order": "^7.6.0",
130
+ "stylelint-config-recommended-vue": "^1.6.1",
131
+ "stylelint-config-standard": "^40.0.0",
132
+ "toml-eslint-parser": "^1.0.3",
133
+ "vue-eslint-parser": "^10.2.0",
134
+ "yaml-eslint-parser": "^2.0.0"
135
+ },
136
+ "devDependencies": {
137
+ "@antfu/ni": "^28.2.0",
138
+ "@eslint-react/eslint-plugin": "^2.7.4",
139
+ "@eslint/config-inspector": "^1.4.2",
140
+ "@next/eslint-plugin-next": "^16.1.5",
141
+ "@prettier/plugin-xml": "^3.4.2",
142
+ "@types/eslint-plugin-jsx-a11y": "^6.10.1",
143
+ "@types/node": "^25.0.10",
144
+ "@unocss/eslint-plugin": "^66.6.0",
145
+ "astro-eslint-parser": "^1.2.2",
146
+ "bumpp": "^10.4.0",
147
+ "eslint": "^9.39.2",
148
+ "eslint-plugin-astro": "^1.5.0",
149
+ "eslint-plugin-erasable-syntax-only": "^0.4.0",
150
+ "eslint-plugin-format": "^1.3.1",
151
+ "eslint-plugin-jsx-a11y": "^6.10.2",
152
+ "eslint-plugin-react-hooks": "^7.0.1",
153
+ "eslint-plugin-react-refresh": "^0.4.26",
154
+ "eslint-plugin-solid": "^0.14.5",
155
+ "eslint-plugin-svelte": "^3.14.0",
156
+ "eslint-plugin-vuejs-accessibility": "^2.4.1",
157
+ "eslint-typegen": "^2.3.0",
158
+ "execa": "^9.6.1",
159
+ "find-up-simple": "^1.0.1",
160
+ "jiti": "^2.6.1",
161
+ "lint-staged": "^16.2.7",
162
+ "pnpm-workspace-yaml": "^1.5.0",
163
+ "prettier-plugin-astro": "^0.14.1",
164
+ "prettier-plugin-slidev": "^1.0.5",
165
+ "simple-git-hooks": "^2.13.1",
166
+ "stylelint": "^17.0.0",
167
+ "svelte": "^5.48.3",
168
+ "svelte-eslint-parser": "^1.4.1",
169
+ "taze": "^19.9.2",
170
+ "tinyglobby": "^0.2.15",
171
+ "tsdown": "^0.18.4",
172
+ "tsx": "^4.21.0",
173
+ "typescript": "^5.9.3",
174
+ "vitest": "^4.0.18",
175
+ "vue": "^3.5.27",
176
+ "frontend-lint": "npm:@th1o/frontend-lint@0.0.1"
177
+ },
178
+ "resolutions": {
179
+ "@eslint-community/eslint-utils": "catalog:peer",
180
+ "@typescript-eslint/types": "catalog:peer",
181
+ "@typescript-eslint/utils": "catalog:peer",
182
+ "chokidar": "catalog:dev",
183
+ "eslint": "catalog:peer",
184
+ "synckit": "catalog:dev",
185
+ "tsx": "catalog:dev"
186
+ },
187
+ "simple-git-hooks": {
188
+ "pre-commit": "npx lint-staged"
189
+ },
190
+ "lint-staged": {
191
+ "*": "eslint --fix"
192
+ },
193
+ "scripts": {
194
+ "build": "nr gen && tsdown --clean --dts",
195
+ "stub": "tsdown",
196
+ "dev": "npx @eslint/config-inspector --config eslint.config.ts",
197
+ "build:inspector": "pnpm build && npx @eslint/config-inspector build",
198
+ "watch": "tsdown --watch",
199
+ "lint": "eslint",
200
+ "lint:fix": "eslint --fix",
201
+ "gen": "tsx scripts/typegen.ts && tsx scripts/versiongen.ts",
202
+ "pack": "pnpm pack --pack-destination release",
203
+ "release": "bumpp",
204
+ "test": "vitest",
205
+ "typecheck": "tsc --noEmit",
206
+ "up": "taze --interactive"
207
+ }
208
+ }