@macalinao/eslint-config-react
v6.1.3
Published
ESLint configuration to use for React projects
Maintainers
Readme
@macalinao/eslint-config-react
ESLint configuration to use for React projects using Tanstack Query and Router.
This package is only available via ES Modules and requires ESLint 9 or greater, since it uses flat configs.
Configurations
This package provides two configurations:
- reactFull - Full configuration extending
@macalinao/eslint-configbase with React rules - reactFast - Performance-optimized configuration extending
@macalinao/eslint-configfast with React rules
Recommended Starter Configuration
For most React projects, use the fast configuration with TypeScript project settings:
// eslint.config.js
import { configs } from "@macalinao/eslint-config-react";
export default [
// For full configuration with Prettier and all plugins
// ...configs.reactFull,
// For fast configuration optimized for Biome (recommended)
...configs.reactFast,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: import.meta.dirname,
},
},
},
];Biome Integration
When using reactFast, you get the same React-specific rules but with the performance benefits from the base fast configuration. For optimal performance, use @macalinao/biome-config alongside the fast configuration:
bun add -D @macalinao/biome-config @biomejs/biome// biome.jsonc
{
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
"extends": ["@macalinao/biome-config/base"],
}What's Different in Fast Mode
The fast configuration inherits optimizations from @macalinao/eslint-config fast mode:
- No Prettier - Use Biome's formatter instead
- No simple-import-sort - Use Biome's
organizeImportsinstead - No unused-imports plugin - Use Biome's
noUnusedImportsinstead - Delegated rules - Basic linting rules handled by Biome
React-Specific Rules (Same in Both Configs)
All React-specific rules remain the same since Biome doesn't have React equivalents:
- React recommended rules
- React Hooks rules
- JSX accessibility (strict mode)
- TanStack Query linting
- React import validation
See @macalinao/eslint-config README for the full list of rules handled by Biome.
License
Apache-2.0
