chore: 强化代码质量与风格检查体系
ESLint 升级到 recommended-type-checked + stylistic-type-checked, 引入 perfectionist 导入排序和 import 插件导入验证。 Prettier 显式声明全部格式化参数,消除跨环境差异。 TypeScript 启用 noUnusedLocals 和 noPropertyAccessFromIndexSignature。 完善 ignore 列表,排除 .agents/、bun.lock、data/ 等。 引入 husky + lint-staged(pre-commit)+ commitlint(commit-msg)。 更新 DEVELOPMENT.md 代码质量章节。 修复所有新增规则检测到的类型和风格违规。
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
const backendPort = Number(process.env.BACKEND_PORT ?? process.env.PORT ?? 3000);
|
||||
const backendPort = Number(process.env["BACKEND_PORT"] ?? process.env["PORT"] ?? 3000);
|
||||
|
||||
export default defineConfig({
|
||||
root: "src/web",
|
||||
build: {
|
||||
assetsDir: "assets",
|
||||
emptyOutDir: true,
|
||||
outDir: "../../dist/web",
|
||||
},
|
||||
plugins: [react()],
|
||||
root: "src/web",
|
||||
server: {
|
||||
host: "127.0.0.1",
|
||||
port: 5173,
|
||||
strictPort: true,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: `http://127.0.0.1:${backendPort}`,
|
||||
changeOrigin: true,
|
||||
target: `http://127.0.0.1:${backendPort}`,
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: "../../dist/web",
|
||||
emptyOutDir: true,
|
||||
assetsDir: "assets",
|
||||
strictPort: true,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user