2.1.5 • Published 6 months ago

@justia/eslint-config-react v2.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 months ago

@justia/eslint-config-react version 2.1.5

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"
  ]
}
2.1.4

9 months ago

2.1.5

6 months ago

2.1.2

1 year ago

2.1.3

1 year ago

2.0.3

1 year ago

2.1.1

1 year ago

2.0.2

2 years ago

2.1.0

1 year ago

2.0.1

2 years ago

1.0.0

2 years ago

2.0.0

2 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

4 years ago

0.2.0

4 years ago