eslint-config-frontwerk-react
v1.1.1
Published
ESLint config for Frontwerk with React
Downloads
7
Maintainers
Readme
eslint-config-frontwerk-react
This package provides Frontwerk's JavaScript .eslintrc as an extensible shared ESLint config for React projects.
Usage
- Install the versions of the package, including its
peerDependencies
:
npm install --dev eslint-config-frontwerk-react eslint eslint-plugin-{import,jsx-a11y,react,react-hooks}
Or with yarn:
yarn add --dev eslint-config-frontwerk-react eslint eslint-plugin-{import,jsx-a11y,react,react-hooks}
- Extend your desired config file in your
.eslintrc
by adding"extends": "frontwerk-react"
to your.eslintrc
.
With TypeScript
If you want to use React with TypeScript, you will need to install the required TypeScript packages and add "extends": "frontwerk-react/typescript"
to your .eslintrc
.
You can use Frontwerk's TypeScript config for ESLint as well. See details for this here and add both
frontwerk-typescript
andfrontwerk-react/typescript
to your.eslintrc
extends.
{ "extends": [frontwerk-typescript", "frontwerk-react/typescript"], "parserOptions": { "project": "./tsconfig.json" }, }
Related
- If you're looking for the plain JavaScript config, you might want to check out eslint-config-frontwerk.
- If you're a TypeScript user, you might want to check out eslint-config-frontwerk-typescript.
Contributing
- Run tests with
npm run test
oryarn test
. - Run the lint with
npm run lint
oryarn lint
.
For details, check out the Contributing guide.
LICENSE
MIT