ESLint automatically identifies coding errors and enforces a consistent coding style across a codebase. It offers extensibility through plugins and can be integrated into various development workflows.
- Configuration:
.eslintrc.json
- Main configuraiton file that controls eslint linting and formatting rules
package.json
scripts:npm run lint
- Runeslint
project binary with.eslintrc.json
configurationnpm run lint_fix
- Run theeslint
project binary using the.eslintrc.json
configuration to automatically fix errors where possible and report those it can't. Note: This will modify your files.
package.json --save-dev
Development Dependencies:eslint
- ESLint statically analyzes your code to quickly find problems@typescript-eslint/eslint-plugin
- The tooling that enables ESLint and Prettier to support TypeScript@typescript-eslint/parser
- ESLint parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source codeeslint-plugin-jest
- ESLint plugin for Jesteslint-plugin-jsx-a11y
- JSX accessibility lintingeslint-plugin-react
- React lintingeslint-plugin-react-hooks
- React "Rules of Hooks" linting - https://react.dev/warnings/invalid-hook-call-warning