From 8519b16cfc68291e0c74e74067723e477eecdad1 Mon Sep 17 00:00:00 2001 From: lif <1835304752@qq.com> Date: Tue, 27 Jan 2026 09:32:55 +0800 Subject: [PATCH] docs: add ESLint guide to AGENTS.md (#31559) Signed-off-by: majiayu000 <1835304752@qq.com> --- AGENTS.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index deab7c8629..7d96ac3a6d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,6 +25,30 @@ pnpm type-check:tsgo pnpm test ``` +### Frontend Linting + +ESLint is used for frontend code quality. Available commands: + +```bash +# Lint all files (report only) +pnpm lint + +# Lint and auto-fix issues +pnpm lint:fix + +# Lint specific files or directories +pnpm lint:fix app/components/base/button/ +pnpm lint:fix app/components/base/button/index.tsx + +# Lint quietly (errors only, no warnings) +pnpm lint:quiet + +# Check code complexity +pnpm lint:complexity +``` + +**Important**: Always run `pnpm lint:fix` before committing. The pre-commit hook runs `lint-staged` which only lints staged files. + ## Testing & Quality Practices - Follow TDD: red → green → refactor.