1.1.1 • Published 5 years ago
eslint-config-frontwerk-react v1.1.1
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
.eslintrcby 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-typescriptandfrontwerk-react/typescriptto your.eslintrcextends.{ "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 testoryarn test. - Run the lint with
npm run lintoryarn lint.
For details, check out the Contributing guide.
LICENSE
MIT