Files
rustfs-console/AGENTS.md
T
overtrue 11bead072e chore: 清理语言包中的测试用例相关内容
- 移除 149 个测试相关的翻译键(应该/should 开头的测试描述)
- 移除测试数据相关的键(folder%test 等)
- 移除函数性能测试相关的键
- 更新 AGENTS.md,添加语言包处理规则:排除测试目录
- 确保三个语言包的键保持一致(847 个键)
2025-10-31 21:37:24 +08:00

2.3 KiB
Raw Blame History

Repository Guidelines

Project Structure & Module Organization

  • Core application lives under pages/, with supporting UI atoms in components/.
  • Shared state and utilities are in store/, composables/, and lib/.
  • Configuration lives in app.config.ts, nuxt.config.ts, and config/.
  • Tests belong in tests/, and static assets in public/ or assets/.

Build, Test, and Development Commands

  • pnpm dev – start the Nuxt development server with hot reload.
  • pnpm build – create a production build.
  • pnpm preview – run the production bundle locally.
  • pnpm test:run – execute the Vitest suite once.
  • pnpm vue-tsc --noEmit – perform a strict type check.
  • pnpm lint – run vue-tsc and Prettier (format check only).

Coding Style & Naming Conventions

  • Use Prettier defaults (see .prettierrc.ts); run pnpm lint or pnpm lint:fix.
  • Vue files use <script setup> with TypeScript; prefer composables for shared logic.
  • Component files use kebab-case (e.g. bucket-selector.vue), but reference them using StudlyCase in templates (e.g. <BucketSelector />).
  • Override shadcn primitives outside components/ui/; never edit files in that directory directly.
  • Render tabular data with the shared DataTable + useDataTable utilities unless a specific requirement makes them unsuitable.
  • Language pack files should exclude test directories when processing translation keys.

Testing Guidelines

  • Vitest is the primary framework; add new suites under tests/.
  • Name files *.spec.ts or *.test.ts and mirror source structure.
  • Keep tests deterministic; mock network calls through provided composables.
  • Run pnpm test:run before submitting major changes.

Commit & Pull Request Guidelines

  • Follow conventional, action-oriented commit subjects (e.g. feat: add bucket selector).
  • Each pull request should include: a concise summary, linked issue or task, screenshots for UI work, and testing notes (pnpm test:run, pnpm vue-tsc, etc.).
  • Keep PRs scoped; large refactors should be coordinated in advance.

UI Theme Overrides

  • Apply visual tweaks (e.g., removing shadows, altering colors) at usage sites via classes such as class="shadow-none".
  • When extending shadcn components, create wrapper utilities (e.g., BucketSelector.vue) instead of forking primitives.