1.2.2 • Published 9 months ago
@josejefferson/eslint-config-react v1.2.2
ESLint config React
This package provides ESLint configuration for React projects.
It is recommended to use this package alongside @josejefferson/eslint-config-typescript
and eslint-plugin-react-hooks
.
!WARNING Don't include
eslint-plugin-react-hooks
in your project if you are using Next.js, as it already includes this plugin.
Installation
npm install -D @josejefferson/eslint-config-typescript @josejefferson/eslint-config-react eslint-plugin-react-hooks
yarn add -D @josejefferson/eslint-config-typescript @josejefferson/eslint-config-react eslint-plugin-react-hooks
bun add -D @josejefferson/eslint-config-typescript @josejefferson/eslint-config-react eslint-plugin-react-hooks
Usage
.eslintrc.json
{
"extends": [
"plugin:react-hooks/recommended",
"@josejefferson/eslint-config-react",
"@josejefferson/eslint-config-typescript"
]
}
!WARNING The TypeScript configuration must come after the React configuration in the
extends
array.
With Next.js
npm install -D eslint-config-next
yarn add -D eslint-config-next
bun add -D eslint-config-next
.eslintrc.json
{
"extends": ["next", "@josejefferson/eslint-config-react", "@josejefferson/eslint-config-typescript"]
}
With Vite
{
"extends": [
"plugin:react-hooks/recommended",
"@josejefferson/eslint-config-react",
"@josejefferson/eslint-config-typescript"
],
"ignorePatterns": ["vite.config.ts"],
"parserOptions": {
"project": "./tsconfig.app.json"
}
}
1.2.2
9 months ago
1.2.1
9 months ago
1.2.0
9 months ago
1.2.0-beta
9 months ago
1.1.0
10 months ago
1.1.0-beta
10 months ago
1.0.1
10 months ago
1.0.0
10 months ago