eslint-config-frontwerk-react

1.1.1 • Public • Published

eslint-config-frontwerk-react

Node Version Npm version Npm downloads License

This package provides Frontwerk's JavaScript .eslintrc as an extensible shared ESLint config for React projects.

Usage

  1. 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}
  1. 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 and frontwerk-react/typescript to your .eslintrc extends.

{
  "extends": [frontwerk-typescript", "frontwerk-react/typescript"],
  "parserOptions": {
     "project": "./tsconfig.json"
   },
}

Related

Contributing

  • Run tests with npm run test or yarn test.
  • Run the lint with npm run lint or yarn lint.

For details, check out the Contributing guide.

LICENSE

MIT

Package Sidebar

Install

npm i eslint-config-frontwerk-react

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

41.1 kB

Total Files

10

Last publish

Collaborators

  • tricinel