11.0.0 • Published 4 years ago

eslint-plugin-caleb v11.0.0

Weekly downloads
469
License
MIT
Repository
github
Last release
4 years ago

eslint-config-calebeby

Caleb Eby's ESLint Configuration. This exports itself as a "super-plugin" because of a limitation of ESLint.

The way this works is that it requires all of the plugin dependencies, and exports them from this plugin under a prefix.

The plugins that this exposes are:

This also exposes a couple rules from shopify:

To override settings for any of these plugins, you must prefix the configuration with caleb/, because the plugins are exposed through this "super-plugin".

{
  "extends": ["plugin:calebeby/recommended"],
  "rules": {
    "caleb/unicorn/catch-error-name": "off",
    "caleb/@shopify/prefer-early-return": "off"
  }
}

Installation

npm i -D eslint-plugin-caleb eslint prettier

Usage

Add this to your package.json:

{
  "scripts": {
    "check-lint": "eslint . && prettier --check .",
    "lint": "eslint --fix . && prettier --write ."
  },
  "eslintConfig": {
    "extends": ["plugin:caleb/recommended"]
  },
  "prettier": {
    "singleQuote": true,
    "trailingComma": "all",
    "semi": false
  }
}

Configurations

This plugin exposes the following configurations:

  • recommended: This is the main configuration. This exposes base rules, as well as some overrides for .ts/.tsx files
  • react: This adds some settings for React-specific rules
  • preact: This is the same as react, except it excludes rules that are irrelevant for Preact
  • jest: This adds some jest rules for test files, and declares the jest globals in those files

To include these configurations, add the ones you want to your extends array:

["plugin:caleb/recommended", "plugin:caleb/jest"]

Checking on CI

npm run check-lint

Checking Locally

(this will automatically fix many linting issues)

npm run lint
11.0.0

4 years ago

10.0.2

4 years ago

10.0.1

4 years ago

10.0.0

4 years ago

9.0.0

4 years ago

8.0.4

4 years ago

8.0.3

4 years ago

8.0.1

4 years ago

8.0.2

4 years ago

8.0.0

4 years ago

7.1.7

4 years ago

7.1.6

4 years ago

7.1.5

4 years ago

7.1.4

4 years ago

7.1.3

4 years ago

7.1.2

4 years ago

7.1.1

4 years ago

7.1.0

4 years ago

7.0.7

4 years ago

7.0.6

4 years ago

7.0.5

4 years ago

7.0.4

5 years ago

7.0.3

5 years ago

7.0.2

5 years ago

7.0.1

5 years ago

7.0.0

5 years ago

6.1.1

5 years ago

6.1.0

5 years ago

6.0.9

5 years ago

6.0.8

5 years ago

6.0.7

5 years ago

6.0.6

5 years ago

6.0.5

5 years ago

6.0.4

5 years ago

6.0.3

5 years ago

6.0.2

5 years ago

6.0.1

5 years ago

6.0.0

5 years ago

5.1.0

5 years ago

5.0.0

5 years ago

4.0.0

5 years ago

3.0.0

5 years ago

2.0.0

5 years ago

1.16.0

5 years ago

1.15.0

5 years ago

1.13.0

5 years ago

1.12.0

6 years ago

1.11.2

6 years ago

1.11.1

6 years ago

1.11.0

6 years ago

1.10.0

6 years ago

1.9.0

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago