This package provides shared ESLint configurations.
Add the eslint-config
package to your workspace dev dependencies.
pnpm --filter [workspace] add @template-react/eslint-config --save-dev
Add eslint-config
to your .eslintrc
config file.
{
"root": true,
"extends": "@template-react/eslint-config/vite"
}
The following configurations are available:
- base - Base rules (includes parser config for TypeScript)
- react - React rules (extends
base
config) - next - Next.js project default rules (extends
react
config) - storybook - Storybook project default rules (extends
react
config) - vite - Vite project default rules (extends
react
config)
- TypeScript (included in
base
)
- Prettier (included in
next
andvite
) - Turbo (included in
base
)
- Format.js
- Import
- Next.js
- Promise
- React
- SonarJS
- Storybook
- Unicorn