@pawover/kit 0.6.0 → 0.8.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.
Files changed (121) hide show
  1. package/README.en.md +123 -0
  2. package/README.md +145 -1
  3. package/entry/eslint-rules.cjs +1 -0
  4. package/entry/eslint-rules.d.cts +1 -0
  5. package/entry/eslint-rules.d.ts +2 -0
  6. package/entry/eslint-rules.js +2 -0
  7. package/entry/hooks-alova.cjs +1 -0
  8. package/entry/hooks-alova.d.cts +1 -0
  9. package/entry/hooks-alova.d.ts +1 -0
  10. package/entry/hooks-alova.js +1 -0
  11. package/entry/hooks-react.cjs +1 -0
  12. package/entry/hooks-react.d.cts +1 -0
  13. package/entry/hooks-react.d.ts +1 -0
  14. package/entry/hooks-react.js +1 -0
  15. package/entry/index.cjs +1 -0
  16. package/entry/index.d.cts +1 -0
  17. package/entry/index.d.ts +1 -0
  18. package/entry/index.js +1 -0
  19. package/entry/math.cjs +1 -0
  20. package/entry/math.d.cts +1 -0
  21. package/entry/math.d.ts +1 -0
  22. package/entry/math.js +1 -0
  23. package/entry/types-react.cjs +1 -0
  24. package/entry/types-react.d.cts +1 -0
  25. package/entry/types-react.d.ts +1 -0
  26. package/entry/types-react.js +1 -0
  27. package/entry/types.cjs +1 -0
  28. package/entry/types.d.cts +1 -0
  29. package/entry/types.d.ts +1 -0
  30. package/entry/types.js +1 -0
  31. package/entry/vite.cjs +1 -0
  32. package/entry/vite.d.cts +1 -0
  33. package/entry/vite.d.ts +1 -0
  34. package/entry/vite.js +1 -0
  35. package/entry/zod.cjs +1 -0
  36. package/entry/zod.d.cts +1 -0
  37. package/entry/zod.d.ts +1 -0
  38. package/entry/zod.js +1 -0
  39. package/package.json +81 -96
  40. package/packages/eslint-rules/dist/core.antfu.cjs +0 -78
  41. package/packages/eslint-rules/dist/core.antfu.d.cts +0 -1
  42. package/packages/eslint-rules/dist/core.antfu.d.ts +0 -74
  43. package/packages/eslint-rules/dist/core.antfu.js +0 -79
  44. package/packages/eslint-rules/dist/core.imports.cjs +0 -59
  45. package/packages/eslint-rules/dist/core.imports.d.cts +0 -1
  46. package/packages/eslint-rules/dist/core.imports.d.ts +0 -61
  47. package/packages/eslint-rules/dist/core.imports.js +0 -59
  48. package/packages/eslint-rules/dist/core.importsSort.cjs +0 -7
  49. package/packages/eslint-rules/dist/core.importsSort.d.cts +0 -1
  50. package/packages/eslint-rules/dist/core.importsSort.d.ts +0 -7
  51. package/packages/eslint-rules/dist/core.importsSort.js +0 -7
  52. package/packages/eslint-rules/dist/core.javascript.cjs +0 -1208
  53. package/packages/eslint-rules/dist/core.javascript.d.cts +0 -1
  54. package/packages/eslint-rules/dist/core.javascript.d.ts +0 -1216
  55. package/packages/eslint-rules/dist/core.javascript.js +0 -1208
  56. package/packages/eslint-rules/dist/core.react.cjs +0 -551
  57. package/packages/eslint-rules/dist/core.react.d.cts +0 -1
  58. package/packages/eslint-rules/dist/core.react.d.ts +0 -551
  59. package/packages/eslint-rules/dist/core.react.js +0 -551
  60. package/packages/eslint-rules/dist/core.reactHooks.cjs +0 -107
  61. package/packages/eslint-rules/dist/core.reactHooks.d.cts +0 -1
  62. package/packages/eslint-rules/dist/core.reactHooks.d.ts +0 -107
  63. package/packages/eslint-rules/dist/core.reactHooks.js +0 -107
  64. package/packages/eslint-rules/dist/core.stylistic.cjs +0 -608
  65. package/packages/eslint-rules/dist/core.stylistic.d.cts +0 -1
  66. package/packages/eslint-rules/dist/core.stylistic.d.ts +0 -595
  67. package/packages/eslint-rules/dist/core.stylistic.js +0 -608
  68. package/packages/eslint-rules/dist/core.typescript.cjs +0 -905
  69. package/packages/eslint-rules/dist/core.typescript.d.cts +0 -1
  70. package/packages/eslint-rules/dist/core.typescript.d.ts +0 -917
  71. package/packages/eslint-rules/dist/core.typescript.js +0 -906
  72. package/packages/eslint-rules/dist/core.vue.cjs +0 -312
  73. package/packages/eslint-rules/dist/core.vue.d.cts +0 -1
  74. package/packages/eslint-rules/dist/core.vue.d.ts +0 -293
  75. package/packages/eslint-rules/dist/core.vue.js +0 -313
  76. package/packages/eslint-rules/dist/index.cjs +0 -126
  77. package/packages/eslint-rules/dist/index.d.cts +0 -1
  78. package/packages/eslint-rules/dist/index.d.ts +0 -113
  79. package/packages/eslint-rules/dist/index.js +0 -126
  80. package/packages/eslint-rules/dist/preset-Bk6lxNP0.cjs +0 -107
  81. package/packages/eslint-rules/dist/preset-CQJST7pW.js +0 -102
  82. package/packages/hooks/dist/alova.cjs +0 -53
  83. package/packages/hooks/dist/alova.d.cts +0 -1
  84. package/packages/hooks/dist/alova.d.ts +0 -33
  85. package/packages/hooks/dist/alova.js +0 -50
  86. package/packages/hooks/dist/index.cjs +0 -0
  87. package/packages/hooks/dist/index.d.cts +0 -1
  88. package/packages/hooks/dist/index.d.ts +0 -1
  89. package/packages/hooks/dist/index.js +0 -0
  90. package/packages/hooks/dist/react.cjs +0 -169
  91. package/packages/hooks/dist/react.d.cts +0 -1
  92. package/packages/hooks/dist/react.d.ts +0 -95
  93. package/packages/hooks/dist/react.js +0 -163
  94. package/packages/types/dist/index.cjs +0 -0
  95. package/packages/types/dist/index.d.cts +0 -1
  96. package/packages/types/dist/index.d.ts +0 -271
  97. package/packages/types/dist/index.js +0 -0
  98. package/packages/types/dist/react.cjs +0 -0
  99. package/packages/types/dist/react.d.cts +0 -1
  100. package/packages/types/dist/react.d.ts +0 -64
  101. package/packages/types/dist/react.js +0 -0
  102. package/packages/utils/dist/index.cjs +0 -2300
  103. package/packages/utils/dist/index.d.cts +0 -1
  104. package/packages/utils/dist/index.d.ts +0 -2740
  105. package/packages/utils/dist/index.js +0 -2287
  106. package/packages/utils/dist/math-BznvO4qI.cjs +0 -1029
  107. package/packages/utils/dist/math-DRbCtLQH.js +0 -1012
  108. package/packages/utils/dist/math.cjs +0 -3
  109. package/packages/utils/dist/math.d.cts +0 -1
  110. package/packages/utils/dist/math.d.ts +0 -60
  111. package/packages/utils/dist/math.js +0 -2
  112. package/packages/utils/dist/vite.cjs +0 -44
  113. package/packages/utils/dist/vite.d.cts +0 -1
  114. package/packages/utils/dist/vite.d.ts +0 -28
  115. package/packages/utils/dist/vite.js +0 -43
  116. package/packages/zod/dist/index.cjs +0 -91
  117. package/packages/zod/dist/index.d.cts +0 -1
  118. package/packages/zod/dist/index.d.ts +0 -57
  119. package/packages/zod/dist/index.js +0 -61
  120. /package/{packages/hooks/dist/metadata.json → entry/hooks-metadata.json} +0 -0
  121. /package/{packages/utils/dist → entry}/metadata.json +0 -0
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/pawover"
7
7
  },
8
8
  "description": "一个基于 TypeScript 的开发工具包",
9
- "version": "0.6.0",
9
+ "version": "0.8.0",
10
10
  "type": "module",
11
11
  "engines": {
12
12
  "node": ">=22.20.0"
@@ -27,168 +27,145 @@
27
27
  "url": "git+https://github.com/pawover/pawover-kit.git"
28
28
  },
29
29
  "license": "MIT",
30
- "main": "./packages/utils/dist/index.cjs",
31
- "module": "./packages/utils/dist/index.js",
32
- "types": "./packages/utils/dist/index.d.ts",
30
+ "main": "./entry/index.cjs",
31
+ "module": "./entry/index.js",
32
+ "types": "./entry/index.d.ts",
33
33
  "files": [
34
- "packages/utils/dist",
35
- "packages/hooks/dist",
36
- "packages/types/dist",
37
- "packages/eslint-rules/dist",
38
- "packages/zod/dist"
34
+ "entry"
39
35
  ],
40
36
  "exports": {
41
37
  ".": {
42
38
  "import": {
43
- "types": "./packages/utils/dist/index.d.ts",
44
- "default": "./packages/utils/dist/index.js"
39
+ "types": "./entry/index.d.ts",
40
+ "default": "./entry/index.js"
45
41
  },
46
42
  "require": {
47
- "types": "./packages/utils/dist/index.d.cts",
48
- "default": "./packages/utils/dist/index.cjs"
43
+ "types": "./entry/index.d.cts",
44
+ "default": "./entry/index.cjs"
49
45
  }
50
46
  },
51
- "./math": {
47
+ "./utils": {
52
48
  "import": {
53
- "types": "./packages/utils/dist/math.d.ts",
54
- "default": "./packages/utils/dist/math.js"
49
+ "types": "./entry/index.d.ts",
50
+ "default": "./entry/index.js"
55
51
  },
56
52
  "require": {
57
- "types": "./packages/utils/dist/math.d.cts",
58
- "default": "./packages/utils/dist/math.cjs"
53
+ "types": "./entry/index.d.cts",
54
+ "default": "./entry/index.cjs"
59
55
  }
60
56
  },
61
- "./vite": {
57
+ "./math": {
62
58
  "import": {
63
- "types": "./packages/utils/dist/vite.d.ts",
64
- "default": "./packages/utils/dist/vite.js"
59
+ "types": "./entry/math.d.ts",
60
+ "default": "./entry/math.js"
65
61
  },
66
62
  "require": {
67
- "types": "./packages/utils/dist/vite.d.cts",
68
- "default": "./packages/utils/dist/vite.cjs"
63
+ "types": "./entry/math.d.cts",
64
+ "default": "./entry/math.cjs"
69
65
  }
70
66
  },
71
- "./metadata.json": "./packages/utils/dist/metadata.json",
72
- "./utils": {
67
+ "./vite": {
73
68
  "import": {
74
- "types": "./packages/utils/dist/index.d.ts",
75
- "default": "./packages/utils/dist/index.js"
69
+ "types": "./entry/vite.d.ts",
70
+ "default": "./entry/vite.js"
76
71
  },
77
72
  "require": {
78
- "types": "./packages/utils/dist/index.d.cts",
79
- "default": "./packages/utils/dist/index.cjs"
73
+ "types": "./entry/vite.d.cts",
74
+ "default": "./entry/vite.cjs"
80
75
  }
81
76
  },
82
77
  "./utils/math": {
83
78
  "import": {
84
- "types": "./packages/utils/dist/math.d.ts",
85
- "default": "./packages/utils/dist/math.js"
79
+ "types": "./entry/math.d.ts",
80
+ "default": "./entry/math.js"
86
81
  },
87
82
  "require": {
88
- "types": "./packages/utils/dist/math.d.cts",
89
- "default": "./packages/utils/dist/math.cjs"
83
+ "types": "./entry/math.d.cts",
84
+ "default": "./entry/math.cjs"
90
85
  }
91
86
  },
92
87
  "./utils/vite": {
93
88
  "import": {
94
- "types": "./packages/utils/dist/vite.d.ts",
95
- "default": "./packages/utils/dist/vite.js"
89
+ "types": "./entry/vite.d.ts",
90
+ "default": "./entry/vite.js"
96
91
  },
97
92
  "require": {
98
- "types": "./packages/utils/dist/vite.d.cts",
99
- "default": "./packages/utils/dist/vite.cjs"
93
+ "types": "./entry/vite.d.cts",
94
+ "default": "./entry/vite.cjs"
100
95
  }
101
96
  },
102
- "./utils/*": {
103
- "import": {
104
- "types": "./packages/utils/dist/*",
105
- "default": "./packages/utils/dist/*"
106
- },
107
- "require": "./packages/utils/dist/*"
108
- },
109
- "./hooks/alova": {
97
+ "./hooks/react": {
110
98
  "import": {
111
- "types": "./packages/hooks/dist/alova.d.ts",
112
- "default": "./packages/hooks/dist/alova.js"
99
+ "types": "./entry/hooks-react.d.ts",
100
+ "default": "./entry/hooks-react.js"
113
101
  },
114
102
  "require": {
115
- "types": "./packages/hooks/dist/alova.d.cts",
116
- "default": "./packages/hooks/dist/alova.cjs"
103
+ "types": "./entry/hooks-react.d.cts",
104
+ "default": "./entry/hooks-react.cjs"
117
105
  }
118
106
  },
119
- "./hooks/react": {
107
+ "./hooks/alova": {
120
108
  "import": {
121
- "types": "./packages/hooks/dist/react.d.ts",
122
- "default": "./packages/hooks/dist/react.js"
109
+ "types": "./entry/hooks-alova.d.ts",
110
+ "default": "./entry/hooks-alova.js"
123
111
  },
124
112
  "require": {
125
- "types": "./packages/hooks/dist/react.d.cts",
126
- "default": "./packages/hooks/dist/react.cjs"
113
+ "types": "./entry/hooks-alova.d.cts",
114
+ "default": "./entry/hooks-alova.cjs"
127
115
  }
128
116
  },
129
- "./hooks/*": {
130
- "import": {
131
- "types": "./packages/hooks/dist/*",
132
- "default": "./packages/hooks/dist/*"
133
- },
134
- "require": "./packages/hooks/dist/*"
135
- },
117
+ "./hooks/metadata.json": "./entry/hooks-metadata.json",
136
118
  "./zod": {
137
119
  "import": {
138
- "types": "./packages/zod/dist/index.d.ts",
139
- "default": "./packages/zod/dist/index.js"
120
+ "types": "./entry/zod.d.ts",
121
+ "default": "./entry/zod.js"
140
122
  },
141
123
  "require": {
142
- "types": "./packages/zod/dist/index.d.cts",
143
- "default": "./packages/zod/dist/index.cjs"
124
+ "types": "./entry/zod.d.cts",
125
+ "default": "./entry/zod.cjs"
144
126
  }
145
127
  },
146
- "./zod/*": {
147
- "import": {
148
- "types": "./packages/zod/dist/*",
149
- "default": "./packages/zod/dist/*"
150
- },
151
- "require": "./packages/zod/dist/*"
152
- },
153
- "./eslint-rules": {
128
+ "./types": {
154
129
  "import": {
155
- "types": "./packages/eslint-rules/dist/index.d.ts",
156
- "default": "./packages/eslint-rules/dist/index.js"
130
+ "types": "./entry/types.d.ts",
131
+ "default": "./entry/types.js"
157
132
  },
158
133
  "require": {
159
- "types": "./packages/eslint-rules/dist/index.d.cts",
160
- "default": "./packages/eslint-rules/dist/index.cjs"
134
+ "types": "./entry/types.d.cts",
135
+ "default": "./entry/types.cjs"
161
136
  }
162
137
  },
163
- "./types": {
138
+ "./types/react": {
164
139
  "import": {
165
- "types": "./packages/types/dist/index.d.ts",
166
- "default": "./packages/types/dist/index.js"
140
+ "types": "./entry/types-react.d.ts",
141
+ "default": "./entry/types-react.js"
167
142
  },
168
143
  "require": {
169
- "types": "./packages/types/dist/index.d.cts",
170
- "default": "./packages/types/dist/index.cjs"
144
+ "types": "./entry/types-react.d.cts",
145
+ "default": "./entry/types-react.cjs"
171
146
  }
172
147
  },
173
- "./types/react": {
148
+ "./eslint-rules": {
174
149
  "import": {
175
- "types": "./packages/types/dist/react.d.ts",
176
- "default": "./packages/types/dist/react.js"
150
+ "types": "./entry/eslint-rules.d.ts",
151
+ "default": "./entry/eslint-rules.js"
177
152
  },
178
153
  "require": {
179
- "types": "./packages/types/dist/react.d.cts",
180
- "default": "./packages/types/dist/react.cjs"
154
+ "types": "./entry/eslint-rules.d.cts",
155
+ "default": "./entry/eslint-rules.cjs"
181
156
  }
182
157
  },
183
- "./types/*": {
184
- "import": {
185
- "types": "./packages/types/dist/*",
186
- "default": "./packages/types/dist/*"
187
- },
188
- "require": "./packages/types/dist/*"
189
- }
158
+ "./metadata.json": "./entry/metadata.json"
159
+ },
160
+ "dependencies": {
161
+ "@pawover/kit-eslint-rules": "0.0.0-alpha.3",
162
+ "@pawover/kit-hooks": "0.0.0-alpha.3",
163
+ "@pawover/kit-types": "0.0.0-alpha.3",
164
+ "@pawover/kit-utils": "0.0.0-alpha.3",
165
+ "@pawover/kit-zod": "0.0.0-alpha.3"
190
166
  },
191
167
  "devDependencies": {
168
+ "@changesets/cli": "^3.0.0",
192
169
  "@commitlint/cli": "^21.2.1",
193
170
  "@commitlint/config-conventional": "^21.2.0",
194
171
  "@eslint-react/eslint-plugin": "^5.18.2",
@@ -220,8 +197,7 @@
220
197
  "turbo": "^2.10.8",
221
198
  "typescript": "^6.0.3",
222
199
  "typescript-eslint": "^8.66.0",
223
- "vitest": "^4.1.10",
224
- "@pawover/kit-eslint-rules": "0.0.0-alpha.1"
200
+ "vitest": "^4.1.10"
225
201
  },
226
202
  "peerDependencies": {
227
203
  "alova": "^3.5.1",
@@ -247,6 +223,9 @@
247
223
  "optional": true
248
224
  }
249
225
  },
226
+ "publishConfig": {
227
+ "access": "public"
228
+ },
250
229
  "config": {
251
230
  "commitizen": {
252
231
  "path": "node_modules/cz-customizable"
@@ -264,12 +243,18 @@
264
243
  "test:types": "tsc -p test/tsconfig.json --noEmit",
265
244
  "test:smoke": "node test/scripts/smoke.mjs",
266
245
  "test:ci": "pnpm test:types && pnpm test && pnpm build && pnpm test:smoke && pnpm check:pack",
246
+ "postbuild": "node scripts/sync-entry.ts",
267
247
  "build": "turbo build",
268
248
  "build:force": "turbo build --force",
269
249
  "build:package": "turbo build:package && pnpm package",
270
250
  "build:package:force": "turbo build:package --force && pnpm package",
271
251
  "package": "pnpm pack",
272
252
  "public": "turbo build && pnpm publish --access public",
253
+ "changeset": "changeset",
254
+ "ci:version": "pnpm changeset version && pnpm install",
255
+ "ci:publish": "pnpm build && pnpm changeset publish",
256
+ "pre:enter-alpha": "pnpm changeset pre enter alpha",
257
+ "pre:exit": "pnpm changeset pre exit",
273
258
  "check": "pnpm check:types & pnpm check:eslint & pnpm check:format",
274
259
  "check:types": "tsc --noEmit",
275
260
  "check:eslint": "eslint --fix \"**/*.{js,cjs,mjs,ts,cts,mts,jsx,tsx,vue}\" --cache-location=.cache/eslint.cache.json --cache",
@@ -1,78 +0,0 @@
1
- //#region src/core.antfu.ts
2
- var core_antfu_default = {
3
- /**
4
- * @desc 强制链式成员访问的换行风格保持一致
5
- * @descEN Enforce consistent line breaks for chaining member access
6
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-chaining.md
7
- */
8
- "antfu/consistent-chaining": 2,
9
- /**
10
- * @desc 强制括号和圆括号内部的换行风格保持一致
11
- * @descEN Enforce consistent line breaks inside braces and parentheses
12
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
13
- */
14
- "antfu/consistent-list-newline": 2,
15
- /**
16
- * @desc 个人偏好的花括号规则,允许单行同时使用两种风格
17
- * @descEN Opinionated curly bracket enforcement that allows both styles on one-liners
18
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.md
19
- */
20
- "antfu/curly": 0,
21
- /**
22
- * @desc 强制 if 语句与其后续表达式之间换行
23
- * @descEN Enforce a newline between `if` and its consequent
24
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md
25
- */
26
- "antfu/if-newline": 2,
27
- /**
28
- * @desc 自动去重来自同一来源的具名导入
29
- * @descEN Auto-fix duplicate named imports from the same source
30
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/import-dedupe.md
31
- */
32
- "antfu/import-dedupe": 2,
33
- /**
34
- * @desc 强制 `unindent` 模板字符串标签内的缩进风格保持一致
35
- * @descEN Enforce consistent indentation inside `unindent` tagged template strings
36
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/indent-unindent.md
37
- */
38
- "antfu/indent-unindent": [2, {
39
- indent: require("./preset-Bk6lxNP0.cjs").preset_default.indent,
40
- tags: [
41
- "$",
42
- "unindent",
43
- "unIndent"
44
- ]
45
- }],
46
- /**
47
- * @desc 禁止从本地 dist 文件夹导入
48
- * @descEN Prevent importing from a local `dist` folder
49
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-import-dist.md
50
- */
51
- "antfu/no-import-dist": 2,
52
- /**
53
- * @desc 禁止通过相对或绝对路径从 node_modules 导入
54
- * @descEN Prevent importing from `node_modules` by relative or absolute path
55
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-import-node-modules-by-path.md
56
- */
57
- "antfu/no-import-node-modules-by-path": 2,
58
- /**
59
- * @desc 禁止顶层 await
60
- * @descEN Prevent top-level `await`
61
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-top-level-await.md
62
- */
63
- "antfu/no-top-level-await": 0,
64
- /**
65
- * @desc 禁止使用 TypeScript 的 export = 语法
66
- * @descEN Disallow TypeScript's `export =` syntax
67
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-ts-export-equal.md
68
- */
69
- "antfu/no-ts-export-equal": 2,
70
- /**
71
- * @desc 强制顶层函数使用 function 关键字声明
72
- * @descEN Enforce top-level functions to be declared with the `function` keyword
73
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/top-level-function.md
74
- */
75
- "antfu/top-level-function": 2
76
- };
77
- //#endregion
78
- module.exports = core_antfu_default;
@@ -1 +0,0 @@
1
- export type * from './core.antfu.d.ts'
@@ -1,74 +0,0 @@
1
- //#region src/core.antfu.d.ts
2
- declare const _default: {
3
- /**
4
- * @desc 强制链式成员访问的换行风格保持一致
5
- * @descEN Enforce consistent line breaks for chaining member access
6
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-chaining.md
7
- */
8
- "antfu/consistent-chaining": number;
9
- /**
10
- * @desc 强制括号和圆括号内部的换行风格保持一致
11
- * @descEN Enforce consistent line breaks inside braces and parentheses
12
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
13
- */
14
- "antfu/consistent-list-newline": number;
15
- /**
16
- * @desc 个人偏好的花括号规则,允许单行同时使用两种风格
17
- * @descEN Opinionated curly bracket enforcement that allows both styles on one-liners
18
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.md
19
- */
20
- "antfu/curly": number;
21
- /**
22
- * @desc 强制 if 语句与其后续表达式之间换行
23
- * @descEN Enforce a newline between `if` and its consequent
24
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md
25
- */
26
- "antfu/if-newline": number;
27
- /**
28
- * @desc 自动去重来自同一来源的具名导入
29
- * @descEN Auto-fix duplicate named imports from the same source
30
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/import-dedupe.md
31
- */
32
- "antfu/import-dedupe": number;
33
- /**
34
- * @desc 强制 `unindent` 模板字符串标签内的缩进风格保持一致
35
- * @descEN Enforce consistent indentation inside `unindent` tagged template strings
36
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/indent-unindent.md
37
- */
38
- "antfu/indent-unindent": (number | {
39
- indent: number;
40
- tags: string[];
41
- })[];
42
- /**
43
- * @desc 禁止从本地 dist 文件夹导入
44
- * @descEN Prevent importing from a local `dist` folder
45
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-import-dist.md
46
- */
47
- "antfu/no-import-dist": number;
48
- /**
49
- * @desc 禁止通过相对或绝对路径从 node_modules 导入
50
- * @descEN Prevent importing from `node_modules` by relative or absolute path
51
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-import-node-modules-by-path.md
52
- */
53
- "antfu/no-import-node-modules-by-path": number;
54
- /**
55
- * @desc 禁止顶层 await
56
- * @descEN Prevent top-level `await`
57
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-top-level-await.md
58
- */
59
- "antfu/no-top-level-await": number;
60
- /**
61
- * @desc 禁止使用 TypeScript 的 export = 语法
62
- * @descEN Disallow TypeScript's `export =` syntax
63
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-ts-export-equal.md
64
- */
65
- "antfu/no-ts-export-equal": number;
66
- /**
67
- * @desc 强制顶层函数使用 function 关键字声明
68
- * @descEN Enforce top-level functions to be declared with the `function` keyword
69
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/top-level-function.md
70
- */
71
- "antfu/top-level-function": number;
72
- };
73
- //#endregion
74
- export { _default as default };
@@ -1,79 +0,0 @@
1
- import { t as preset_default } from "./preset-CQJST7pW.js";
2
- //#region src/core.antfu.ts
3
- var core_antfu_default = {
4
- /**
5
- * @desc 强制链式成员访问的换行风格保持一致
6
- * @descEN Enforce consistent line breaks for chaining member access
7
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-chaining.md
8
- */
9
- "antfu/consistent-chaining": 2,
10
- /**
11
- * @desc 强制括号和圆括号内部的换行风格保持一致
12
- * @descEN Enforce consistent line breaks inside braces and parentheses
13
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md
14
- */
15
- "antfu/consistent-list-newline": 2,
16
- /**
17
- * @desc 个人偏好的花括号规则,允许单行同时使用两种风格
18
- * @descEN Opinionated curly bracket enforcement that allows both styles on one-liners
19
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.md
20
- */
21
- "antfu/curly": 0,
22
- /**
23
- * @desc 强制 if 语句与其后续表达式之间换行
24
- * @descEN Enforce a newline between `if` and its consequent
25
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md
26
- */
27
- "antfu/if-newline": 2,
28
- /**
29
- * @desc 自动去重来自同一来源的具名导入
30
- * @descEN Auto-fix duplicate named imports from the same source
31
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/import-dedupe.md
32
- */
33
- "antfu/import-dedupe": 2,
34
- /**
35
- * @desc 强制 `unindent` 模板字符串标签内的缩进风格保持一致
36
- * @descEN Enforce consistent indentation inside `unindent` tagged template strings
37
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/indent-unindent.md
38
- */
39
- "antfu/indent-unindent": [2, {
40
- indent: preset_default.indent,
41
- tags: [
42
- "$",
43
- "unindent",
44
- "unIndent"
45
- ]
46
- }],
47
- /**
48
- * @desc 禁止从本地 dist 文件夹导入
49
- * @descEN Prevent importing from a local `dist` folder
50
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-import-dist.md
51
- */
52
- "antfu/no-import-dist": 2,
53
- /**
54
- * @desc 禁止通过相对或绝对路径从 node_modules 导入
55
- * @descEN Prevent importing from `node_modules` by relative or absolute path
56
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-import-node-modules-by-path.md
57
- */
58
- "antfu/no-import-node-modules-by-path": 2,
59
- /**
60
- * @desc 禁止顶层 await
61
- * @descEN Prevent top-level `await`
62
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-top-level-await.md
63
- */
64
- "antfu/no-top-level-await": 0,
65
- /**
66
- * @desc 禁止使用 TypeScript 的 export = 语法
67
- * @descEN Disallow TypeScript's `export =` syntax
68
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-ts-export-equal.md
69
- */
70
- "antfu/no-ts-export-equal": 2,
71
- /**
72
- * @desc 强制顶层函数使用 function 关键字声明
73
- * @descEN Enforce top-level functions to be declared with the `function` keyword
74
- * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/top-level-function.md
75
- */
76
- "antfu/top-level-function": 2
77
- };
78
- //#endregion
79
- export { core_antfu_default as default };
@@ -1,59 +0,0 @@
1
- //#region src/core.imports.ts
2
- var core_imports_default = {
3
- /**
4
- * @desc 强制类型导入的标记风格保持一致(顶级或内联)
5
- * @descEN Enforce consistent style for type-only import specifiers (top-level vs inline)
6
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/consistent-type-specifier-style/README.md
7
- */
8
- "imports/consistent-type-specifier-style": [2, "prefer-top-level"],
9
- /**
10
- * @desc 确保所有导出语句都在文件末尾
11
- * @descEN Ensure all exports are declared at the bottom of the file
12
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/exports-last/README.md
13
- */
14
- "imports/exports-last": 0,
15
- /**
16
- * @desc 确保所有 import 语句在文件顶部
17
- * @descEN Ensure all imports are at the top of the file
18
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/first/README.md
19
- */
20
- "imports/first": 2,
21
- /**
22
- * @desc 强制在最后一个 import 或 require 语句后留有空行
23
- * @descEN Enforce one or more empty lines after the last top-level import or require
24
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/newline-after-import/README.md
25
- */
26
- "imports/newline-after-import": [2, { count: 1 }],
27
- /**
28
- * @desc 禁止使用默认导出
29
- * @descEN Disallow default exports
30
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-default-export/README.md
31
- */
32
- "imports/no-default-export": 0,
33
- /**
34
- * @desc 禁止重复导入同一模块
35
- * @descEN Disallow duplicate imports from the same module
36
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-duplicates/README.md
37
- */
38
- "imports/no-duplicates": 2,
39
- /**
40
- * @desc 禁止使用 var 或 let 导出可变绑定
41
- * @descEN Forbid mutable exports using `var` or `let`
42
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-mutable-exports/README.md
43
- */
44
- "imports/no-mutable-exports": 2,
45
- /**
46
- * @desc 禁止将默认导入作为具名导入使用
47
- * @descEN Disallow named import of default exports
48
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-named-default/README.md
49
- */
50
- "imports/no-named-default": 2,
51
- /**
52
- * @desc 优先使用默认导出而非具名导出
53
- * @descEN Prefer default export over named export
54
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/prefer-default-export/README.md
55
- */
56
- "imports/prefer-default-export": 0
57
- };
58
- //#endregion
59
- module.exports = core_imports_default;
@@ -1 +0,0 @@
1
- export type * from './core.imports.d.ts'
@@ -1,61 +0,0 @@
1
- //#region src/core.imports.d.ts
2
- declare const _default: {
3
- /**
4
- * @desc 强制类型导入的标记风格保持一致(顶级或内联)
5
- * @descEN Enforce consistent style for type-only import specifiers (top-level vs inline)
6
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/consistent-type-specifier-style/README.md
7
- */
8
- "imports/consistent-type-specifier-style": (string | number)[];
9
- /**
10
- * @desc 确保所有导出语句都在文件末尾
11
- * @descEN Ensure all exports are declared at the bottom of the file
12
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/exports-last/README.md
13
- */
14
- "imports/exports-last": number;
15
- /**
16
- * @desc 确保所有 import 语句在文件顶部
17
- * @descEN Ensure all imports are at the top of the file
18
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/first/README.md
19
- */
20
- "imports/first": number;
21
- /**
22
- * @desc 强制在最后一个 import 或 require 语句后留有空行
23
- * @descEN Enforce one or more empty lines after the last top-level import or require
24
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/newline-after-import/README.md
25
- */
26
- "imports/newline-after-import": (number | {
27
- count: number;
28
- })[];
29
- /**
30
- * @desc 禁止使用默认导出
31
- * @descEN Disallow default exports
32
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-default-export/README.md
33
- */
34
- "imports/no-default-export": number;
35
- /**
36
- * @desc 禁止重复导入同一模块
37
- * @descEN Disallow duplicate imports from the same module
38
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-duplicates/README.md
39
- */
40
- "imports/no-duplicates": number;
41
- /**
42
- * @desc 禁止使用 var 或 let 导出可变绑定
43
- * @descEN Forbid mutable exports using `var` or `let`
44
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-mutable-exports/README.md
45
- */
46
- "imports/no-mutable-exports": number;
47
- /**
48
- * @desc 禁止将默认导入作为具名导入使用
49
- * @descEN Disallow named import of default exports
50
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-named-default/README.md
51
- */
52
- "imports/no-named-default": number;
53
- /**
54
- * @desc 优先使用默认导出而非具名导出
55
- * @descEN Prefer default export over named export
56
- * @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/prefer-default-export/README.md
57
- */
58
- "imports/prefer-default-export": number;
59
- };
60
- //#endregion
61
- export { _default as default };