@justia/eslint-config-react
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

@justia/eslint-config-react version 2.1.6

Justia's ESLint configuration for React projects

This package uses @justia/eslint-config as a base configuration, slightly modifies prettier rules and adds React-specific rules for React projects.

Install

Install the correct versions of the peer dependencies, which are listed by the command:

npm info "@justia/eslint-config-react@latest" peerDependencies

If using npm 5+, use this shortcut

npx install-peerdeps --dev @justia/eslint-config-react

If using npm < 5, Linux/OSX users can run

(
export PKG=@justia/eslint-config-react;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)

Which produces and runs a command like:

npm install --save-dev @justia/eslint-config-react eslint@^#.#.# prettier@^#.#.# babel-eslint@^#.#.# eslint-config-prettier@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-prettier@^#.#.# eslint-plugin-promise@^#.#.# eslint-plugin-jsx-a11y@^#.#.# eslint-plugin-react@^#.#.# eslint-plugin-react-hooks@^#.#.#

Usage

@justia/eslint-config-react

Default configuration that contains all the base ESLint rules, including ECMAScript 6+ and React. It requires the following external packages:

  • eslint
  • prettier
  • babel-eslint
  • eslint-config-prettier
  • eslint-plugin-import
  • eslint-plugin-prettier
  • eslint-plugin-promise
  • eslint-plugin-jsx-a11y
  • eslint-plugin-react

After installation of the package and the peer dependencies, add "extends": ["@justia/eslint-config-react"] to your .eslintrc.

@justia/eslint-config-react/hooks

This entry point enables the linting rules for React hooks (requires v16.8+). It requires eslint-plugin-react-hooks.

To use, add the following to your .eslintrc:

{
  "extends": [
    "@justia/eslint-config-react",
    "@justia/eslint-config-react/hooks"
  ]
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.05latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.05
2.1.63
2.1.50
2.1.41
2.1.30
2.1.20
2.1.10
2.1.00
2.0.30
2.0.20
2.0.10
2.0.00
1.0.00
0.2.30
0.2.20
0.2.10
0.2.00

Package Sidebar

Install

npm i @justia/eslint-config-react

Weekly Downloads

9

Version

3.0.0

License

MIT

Unpacked Size

38 kB

Total Files

11

Last publish

Collaborators

  • justiauser
  • mayrop
  • digznav