浏览代码

chore(eslint-config): migrate build to tsdown

xingyu4j 3 月之前
父节点
当前提交
db9b9df8f7

+ 0 - 7
internal/lint-configs/eslint-config/build.config.ts

@@ -1,7 +0,0 @@
-import { defineBuildConfig } from 'unbuild';
-
-export default defineBuildConfig({
-  clean: true,
-  declaration: true,
-  entries: ['src/index'],
-});

+ 3 - 4
internal/lint-configs/eslint-config/package.json

@@ -12,7 +12,8 @@
   "license": "MIT",
   "type": "module",
   "scripts": {
-    "stub": "pnpm unbuild --stub"
+    "build": "pnpm exec tsdown",
+    "stub": "pnpm exec tsdown"
   },
   "files": [
     "dist"
@@ -27,12 +28,10 @@
     }
   },
   "dependencies": {
-    "@vben/oxlint-config": "workspace:*"
-  },
-  "devDependencies": {
     "@eslint/js": "catalog:",
     "@typescript-eslint/eslint-plugin": "catalog:",
     "@typescript-eslint/parser": "catalog:",
+    "@vben/oxlint-config": "workspace:*",
     "eslint": "catalog:",
     "eslint-plugin-jsonc": "catalog:",
     "eslint-plugin-n": "catalog:",

+ 16 - 0
internal/lint-configs/eslint-config/tsdown.config.ts

@@ -0,0 +1,16 @@
+import { defineConfig } from 'tsdown';
+
+export default defineConfig({
+  clean: true,
+  deps: {
+    skipNodeModulesBundle: true,
+  },
+  dts: {
+    resolver: 'tsc',
+  },
+  entry: ['src/index.ts'],
+  format: ['esm'],
+  outExtensions: () => ({
+    dts: '.d.ts',
+  }),
+});