4.45.6 • Published 20 days ago

@cutting/eslint-config v4.45.6

Weekly downloads
123
License
MIT
Repository
-
Last release
20 days ago

Cutting eslint-config

This package centralises eslint rules to a common package that can be consumed by other packages.

Intstallation

Import this library:

pnpm add @cutting/eslint-config -S

Create a .eslintrc.json in the root of the project that will consume this library.

The bare minimum that is required for a consuming package's .eslintrc.json is:

{
  "extends": ["@cutting/eslint-config/react"]
}

Packages.json scripts

Add the following lines to your package.json to enable linting and prettier to run on files without extensions:

  "scripts": {
    "lint": "eslint 'src/**/*.{ts,tsx}'",
    "lint:fix": "pnpm run lint -- --fix"
  }

VS Code extensions

ESLint

After installing the extension, we need to change some settings of VSCode under: File > Preferences > Settings . Here we want to go to the JSON view of our settings in the top right corner there is a Button with {} on it. Here we need to add this config 👇:

"eslint.validate": [
  "javascript",
  "javascriptreact",
  {
    "language": "typescript",
    "autoFix": true
  },
  {
    "language": "typescriptreact",
    "autoFix": true
  }
]

What rules are applied

The following sets of rules are implemented in this package:

Typescript

@typescript-eslint/recommended (rules)

React All typescript rules, plus (in order):

eslint-plugin-react/recommended (rules) eslint-plugin-jsx-a11y (rules) eslint-plugin-react-hooks (rules set manually) eslint-plugin-import (rules) eslint-config-prettier (rules) eslint-config-prettier/@typescript-eslint Overrides Some rules are overriden. Please see .eslintrc.json in the package.

Overrides

Rules can be overriden in the consuming project's .eslintrc.json, or you can disable rules in the files rule by adding the following types of comment

/* eslint-disable: <rule> */

//eslint-disable-next-line <rule>
4.45.6

20 days ago

4.45.5

1 month ago

4.45.4

2 months ago

4.45.3

4 months ago

4.45.2

6 months ago

4.45.1

6 months ago

4.45.0

6 months ago

4.44.1

11 months ago

4.44.0

1 year ago

4.43.1

1 year ago

4.43.0

1 year ago

4.42.0

2 years ago

4.41.0

2 years ago

4.39.0

2 years ago

4.37.0

2 years ago

4.40.1

2 years ago

4.40.0

2 years ago

4.31.0

2 years ago

4.35.0

2 years ago

4.33.0

2 years ago

4.38.1

2 years ago

4.38.0

2 years ago

4.29.2

2 years ago

4.32.0

2 years ago

4.30.0

2 years ago

4.36.0

2 years ago

4.34.0

2 years ago

4.32.1

2 years ago

4.29.1

2 years ago

4.29.0

2 years ago

4.28.2

2 years ago

4.28.3

2 years ago

4.28.5

2 years ago

4.28.1

2 years ago

4.28.0

2 years ago

4.26.0

3 years ago

4.27.0

3 years ago

4.25.1

3 years ago

4.25.3

3 years ago

4.25.0

3 years ago

4.24.1

3 years ago

4.23.2

3 years ago

4.24.0

3 years ago

4.21.1

3 years ago

4.23.0

3 years ago

4.23.1

3 years ago

4.22.0

3 years ago

4.21.0

3 years ago

4.20.1

3 years ago

4.20.0

3 years ago

4.19.0

3 years ago

4.18.0

3 years ago

4.17.0

3 years ago

4.15.0

3 years ago

4.16.0

3 years ago

4.14.0

3 years ago

4.13.0

3 years ago

4.11.0

3 years ago

4.10.0

3 years ago

4.9.0

3 years ago

4.8.3

3 years ago

4.8.0

3 years ago

4.6.3

3 years ago

4.6.2

3 years ago

4.6.4

3 years ago

4.7.0

3 years ago

4.6.1

3 years ago

4.6.0

3 years ago

4.5.0

3 years ago

4.3.0

3 years ago

4.2.1

3 years ago

4.2.0

3 years ago

4.1.4

3 years ago

4.1.1

3 years ago

4.1.0

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.8.0

4 years ago

3.9.0

4 years ago

3.7.0

4 years ago

3.6.1

4 years ago

3.5.3

4 years ago

3.5.2

4 years ago

3.5.1

4 years ago

3.5.0

4 years ago

2.3.2

4 years ago

2.3.1

4 years ago

2.1.0

4 years ago

1.1.0

4 years ago

1.0.0

5 years ago