8.0.1 • Published 10 months ago

eslint-config-cratebind v8.0.1

Weekly downloads
363
License
MIT
Repository
github
Last release
10 months ago

eslint-config-cratebind

Cratebind ES Lint Config

Installation

  1. Install ESLint:
$ npm i eslint --save-dev
# OR
$ yarn add eslint
  1. Install eslint-config-cratebind:
$ npm install eslint-config-cratebind --save-dev
# OR
$ yarn add eslint-config-cratebind

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-config-cratebind globally.

Usage

Create or update the .eslintrc file in the root of your directory and extend cratebind. You can omit the eslint-config- prefix:

{
    "extends": ["cratebind"]
}

Then overwrite rules as needed:

{
    "extends": ["cratebind"],
    "rules": {
        // 0 is ignore, 1 is warning, 2 is error
        "react/prop-types": 0
    }
}

NPM Script

It's recommended to add a lint script to your NPM scripts:

{
    "scripts": {
        // --cache flag improves performance, --fix will autofix fixable issues
        "lint": "eslint --cache \"**/*.js\" --fix"
    }
}

Git Hooks

It's also highly recommended to use Husky and Lint Staged to lint your code before committing:

  1. Install Husky and Lint Staged
yarn add -D husky lint-staged
  1. Add these to your package.json
{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.+(js|ts|tsx)": [
      "eslint --cache --fix --quiet",
      "git add"
    ]
  }
}

This combination is

8.0.1

10 months ago

8.0.0

1 year ago

7.0.0

3 years ago

7.0.2

3 years ago

7.0.1

3 years ago

6.0.7

3 years ago

6.0.6

3 years ago

6.0.5

3 years ago

6.0.4

3 years ago

6.0.3

4 years ago

6.0.1

4 years ago

6.0.2

4 years ago

6.0.0

4 years ago

5.0.2

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.0.10

4 years ago

3.0.9

4 years ago

3.0.8

4 years ago

3.0.7

4 years ago

3.0.6

4 years ago

3.0.5

4 years ago

3.0.4

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.12

4 years ago

2.0.11

4 years ago

2.0.10

5 years ago

2.0.9

5 years ago

2.0.8

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago