eslint-prettier
Use when setting up code linting and formatting with ESLint and Prettier — configuration, rule customization, IDE integration, or CI enforcement. Also use when migrating ESLint to flat config or resolving ESLint/Prettier conflicts.
| Model | Source |
|---|---|
| sonnet | pack: tooling |
Full Reference
┏━ 🔧 eslint-prettier ━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when setting up code linting and formattin… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
ESLint + Prettier
Section titled “ESLint + Prettier”ESLint 9 (current) uses flat config (eslint.config.js) by default — the legacy .eslintrc format is deprecated in v9 and removed in v10. Prettier 3.x handles formatting. They integrate via eslint-config-prettier (disables conflicting rules) plus an optional eslint-plugin-prettier for running Prettier as a lint rule.
The recommended integration runs ESLint for code quality and Prettier CLI separately for formatting, keeping the two concerns clean and CI fast.
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| ESLint | v9.x (flat config default) |
| Prettier | v3.x (latest: 3.8.x) |
| Config file | eslint.config.js (or .mjs) |
| Prettier config | .prettierrc or prettier.config.js |
| Install | npm install -D eslint @eslint/js prettier eslint-config-prettier |
| Run lint | npx eslint . |
| Run format | npx prettier --write . |
| Format check (CI) | npx prettier --check . |
| Migrate from .eslintrc | npx @eslint/migrate-config .eslintrc.json |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Set up ESLint and Prettier from scratch | reference/setup.md |
| Configure rules, integration strategies, and custom rules | reference/rules.md |
| Add TypeScript support and type-aware rules | reference/typescript.md |
| Configure React and Next.js plugins | reference/react.md |
| Ignore specific files and paths | reference/ignoring.md |
| Set up GitHub Actions, pre-commit hooks, and IDE integration | reference/ci-integration.md |
| Migrate from .eslintrc to flat config | reference/migration.md |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.