ES

ESLint

Find and fix problems in your TypeScript code

Details

Language / Topic
typescriptTypeScript
Category
Linter / Formatter
Source
eslint

Rules

balanced
- Use ESLint flat config (`eslint.config.js`). Extend recommended configs for your framework.
- Run `eslint --fix .` for auto-fixable issues. Run `eslint .` in CI without `--fix`.
- Use `typescript-eslint` with `strict` and `stylistic` configs — enable type-checked rules with `parserOptions.project` for deep type analysis.
- Use `@typescript-eslint/recommended` for TypeScript projects. Enable `strict` preset for stricter checks.
- Combine with Prettier: use `eslint-config-prettier` to disable formatting rules ESLint shouldn't handle.
- Use framework-specific plugins: `eslint-plugin-react-hooks`, `eslint-plugin-next`, `eslint-plugin-vue`.
- Configure `no-unused-vars`, `no-console`, `prefer-const` as errors — catch real issues, not style nits.