@aerian/eslint-config-react
v13.2.0
Published
This is a sharable ESLint config for React. The base config is NO LONGER included by default so you will likely need to include it yourself. If you're using TypeScript, add `@aerian/eslint-config-typescript` too.
Downloads
128
Readme
@aerian/eslint-config-react
This is a sharable ESLint config for React. The base config is NO LONGER included by default so you will likely need to include it yourself. If you're using TypeScript, add
@aerian/eslint-config-typescript
too.
If you're not using React, try @aerian/eslint-config
instead. If you're using
Preact, try @aerian/eslint-config-preact
To install, run:
#npm
npm i -D eslint prettier @aerian/eslint-config @aerian/eslint-config-react
#yarn
yarn add -D eslint prettier @aerian/eslint-config @aerian/eslint-config-react
To use it, create the following .eslintrc.json:
{
"extends": ["@aerian/eslint-config", "@aerian/eslint-config-react"]
}
..or if you're using TypeScript:
{
"extends": [
"@aerian/eslint-config",
"@aerian/eslint-config-react",
"@aerian/eslint-config-typescript"
]
}
The base formatting uses Prettier, which parses and reformats your code. It runs
this through ESLint, so you can run use eslint . --fix
to apply Prettier
formatting as well as ESLint rules.