0.35.5 • Published 2 years ago

@reactizer/eslint-config v0.35.5

Weekly downloads
5
License
MIT
Repository
-
Last release
2 years ago

@reactizer/eslint-config

The best ESlint config.

Setup

yarn add -D eslint @reactizer/eslint-config @babel/eslint-parser

For @reactizer/eslint-config/ts:

  • yarn add -D typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript

For @reactizer/eslint-config/jest:

  • yarn add -D eslint-plugin-jest

For @reactizer/eslint-config/react:

  • yarn add -D eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y

Make a .eslintrc.js file:

module.exports = {
  extends: [
    "@reactizer",
    "@reactizer/eslint-config/react", // if using React
    "@reactizer/eslint-config/ts", // if using TypeScript
  ],
  overrides: [
    // If using Jest
    {
      files: ["*.spec.js", "*.spec.jsx"], // or .ts, .tsx
      extends: ["@reactizer/eslint-config/jest"],
    },
  ],
};

Add to package.json:

{
  "scripts": {
    "lint": "eslint ."
  }
}

Prettier

yarn add prettier

Prettier rules to avoid conflicts are included, however, prettier itself is not.

Install yarn add prettier -D separately, create prettier.config.js and add the following scripts to package.json:

{
  "scripts": {
    "prettier": "prettier --check . || (echo \"oops 🙀 pls run 'yarn fmt'\" && exit 1)",
    "fmt": "prettier --write ."
  }
}

Development

Benchmark:

  • TIMING=1 eslint ...

Checking prettier conflicts:

  • eslint --print-config index.js | eslint-config-prettier-check

License

MIT

0.35.5

2 years ago

0.35.4

2 years ago

0.35.3

2 years ago

0.35.2

2 years ago

0.35.1

2 years ago

0.34.2

2 years ago

0.35.0

2 years ago

0.34.1

3 years ago

0.34.0

3 years ago

0.33.0

3 years ago

0.32.6

3 years ago

0.32.5

3 years ago

0.32.4

3 years ago

0.32.3

3 years ago

0.32.2

4 years ago

0.32.1

4 years ago

0.32.0

4 years ago

0.31.0

4 years ago

0.30.2

4 years ago

0.30.1

4 years ago

0.30.0

4 years ago

0.29.0

4 years ago

0.28.0

4 years ago

0.27.1

4 years ago

0.27.0

4 years ago

0.26.0

4 years ago

0.24.5

4 years ago

0.24.3

4 years ago

0.25.0

4 years ago

0.24.1

4 years ago

0.23.0

4 years ago

0.21.4

4 years ago

0.22.0

4 years ago

0.20.0

4 years ago

0.19.0

4 years ago

0.18.1

4 years ago

0.19.2

4 years ago

0.17.0

4 years ago

0.18.0

4 years ago

0.15.0

4 years ago

0.16.0

4 years ago

0.14.0

4 years ago