--- jd-id: "01.10" name: "configs" desc: "Project-root configuration files. Together they pin the Node engine, alias `@` to `src/`, set up the dev server on `0.0.0.0:5173`, and provide lint + format tooling." author: "Clark Lin" updateTime: "2026-07-06" status: active type: "A-高层系统" tags: - 配置 - Vite - ESLint - Prettier --- ## Core Files | File path | Role | |-----------|------| | `package.json` | Dependencies and npm scripts: `dev` (`vite`), `build` (`vite build`), `preview` (`vite preview`), `lint` (`eslint . --fix`), `format` (`prettier --write src/`). Enforces `engines.node: "^20.19.0 || >=22.12.0"`. | | `vite.config.js` | Vite config — installs `vue` + `vite-plugin-vue-devtools` plugins, registers the `@` alias pointing at `./src`, and binds the dev server to `host: '0.0.0.0'`, `port: 5173` (so other devices on the LAN can reach the app). | | `eslint.config.js` | Flat-config ESLint setup — lints `**/*.{js,mjs,jsx,vue}`, uses `eslint-plugin-vue` (`flat/essential`), Prettier conflict-free via `skipFormatting`. | | `jsconfig.json` | IDE/TS path mapping for the `@` alias (`@/* → ./src/*`); excluded `node_modules`, `dist`. | | `.editorconfig` | Editor baseline (UTF-8, LF, 2-space indent, final newline). | | `.prettierrc.json` | Prettier rules referenced by `npm run format`. | | `.gitattributes` | Line-ending / diff handling for cross-platform development. | | `.vscode/extensions.json` | Workspace-recommended VS Code extensions. | | `docs/step 0 - 整体规划.md` | Project planning notes (中文). | | `docs/step 1 - 项目初始化和环境搭建.md` | Setup walkthrough notes. | --- ## Conventions - Use `npm run dev` for development (the server binds to all interfaces so LAN devices can reach it during paired testing). - Path imports must use the `@/` alias — see `vite.config.js` (`'@': fileURLToPath(new URL('./src', import.meta.url))`) and `jsconfig.json`. - No test runner is configured — add new lint/format scripts through `package.json` to keep tooling centralized. --- Home: [[01.00 student-app-frontend]] | **Location:** `C:\Projects\vue\student-app-frontend` (project root)