Package Exports
- @eslint-react/eslint-plugin
- @eslint-react/eslint-plugin/package.json
Readme
ESLint x React
A set of ESLint rules to catch common mistakes and improve your React code.
Public packages
@eslint-react/eslint-plugin
- The main ESLint plugin package including all rules and configs in this repository.@eslint-react/jsx
- TSESTree AST utility module for static analysis of JSX.
Supported engines
Node.js
- 18.x LTS Hydrogen
- 20.x Current
Bun
- 1.0.11 or later
Installation
Presets
Rules
Philosophy
- Focus on code rather than style.
- Linting errors are better than runtime crashes.
- Types are the fundamental unit of correctness.
Rule introduction or modification principles
- TypeScript first. If a behavior can already be enforced by TypeScript built-in checker, don't reimplement it.
- Formatting independent. Rules should check for correctness, not style. We recommend using style focused tools for formatting (e.g. dprint or eslint-stylistic).
- No Auto-fix. Auto-fix is a great feature, but it's not always safe and reliable. We prefer to not to do auto-fix at all than to implement it in a way that can cause more problems than it solves.
- Sensible defaults. Rules should be easy to setup and use with minimal configuration and sensible defaults.
- Rules over Options [1]. Each rule should have a single purpose. Make multiple rules work together to achieve more complex behaviors instead of adding options to a single rule.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Inspiration
- eslint-plugin-perfectionist
- eslint-plugin-solid
- eslint-plugin-functional
- eslint-plugin-filenames-simple
- @tanstack/eslint-plugin-query
- rome/tools
- rust-clippy