eslint-config
Personal Eslint config (react + typescript)
Prettier friendly !
Installation
Install @wardes/eslint-config-react
:
npm i -D eslint @wardes/eslint-config-react
yarn add -D eslint @wardes/eslint-config-react
pnpm add -D eslint @wardes/eslint-config-react
Add the following to your eslint config:
{
"extends": [
"@wardes/eslint-config-react"
]
}
or for nextjs:
{
"extends": [
"@wardes/eslint-config-react/next"
]
}
And add ECMAScript env in your eslint config from Eslint envrionement config
Typescript compilerOptions (in tsconfig.json) :
{
"strict": true,
"parserOptions": {
"project": "./tsconfig.json"
}
}
or
{
"noImplicitAny": true,
"strictNullChecks": true,
"parserOptions": {
"project": "./tsconfig.json"
}
}