eslint
ESLint
Commands
| Task | Command |
|---|---|
| Lint everything | pnpm lint |
| Lint only ESLint | pnpm lint:eslint |
| Lint a specific file | pnpm exec eslint <path> |
| Lint with auto-fix | pnpm exec eslint --fix <path> |
Default action: When asked to "lint" or "run ESLint" without further qualification, run pnpm lint.
Before linting — explore the project first
Before running or modifying ESLint, read the project's eslint.config.mjs to understand:
- Which plugins and extends are active (e.g.
typescript-eslint,angular-eslint,eslint-plugin-storybook) - Which files and globs are covered or ignored
- Which rules are customized beyond the recommended defaults
- Whether type-aware linting is enabled (
parserOptions.projectService: true) — this requires a validtsconfig.json - How
eslint-config-prettieris applied (it must be the last entry to correctly disable formatting rules)
Also check package.json scripts to understand what pnpm lint and pnpm lint:eslint actually invoke for this specific project — the command and glob patterns vary across repos.
Configuration format
All projects use the ESLint 9 flat config (eslint.config.mjs). The legacy .eslintrc.* format is not used. When writing or modifying configs, always use defineConfig and globalIgnores from eslint/config.
Relationship with Prettier
ESLint and Prettier have a strict separation of concerns:
- ESLint — code quality, type safety, framework-specific rules
- Prettier — all formatting (indentation, quotes, line length, trailing commas, etc.)
eslint-config-prettieris always the last config entry to disable ESLint rules that conflict with Prettier
Never add formatting rules to ESLint. Never use eslint --fix to fix formatting — use pnpm format:write instead.
Import organization is handled exclusively by Prettier (prettier-plugin-organize-imports) — do not introduce ESLint import-sorting plugins.
Workflow notes
- Run
pnpm lintbefore every commit alongsidepnpm format:write - If
lintfails in CI, fix the issues locally and confirm withpnpm format:write && pnpm lintbefore committing - Prefer fixing the root cause over disabling rules with
eslint-disablecomments - When disabling a rule is truly necessary, use the most targeted scope (single line > block > file) and add a comment explaining why
More from dnd-mapp/ai-standards
pull-request
This skill should be used whenever the user asks to create a pull request, open a PR, or submit changes for review.
11prisma
>
10angular
>
10prettier
>
10commit
This skill should be used whenever the user asks to commit changes, create a git commit, or stage and commit files. Enforces Conventional Commits format for this project.
10nestjs
>
10