6.0.0 • Published 5 years ago

@lendesk/eslint-config-lendesk v6.0.0

Weekly downloads
43
License
UNLICENSED
Repository
github
Last release
5 years ago

eslint-config-lendesk

Lendesk JS ESLint Standard Config. This is based on StandardJS with some minor adjustments to work with Prettier

Installation

Install the config:

$ yarn add -D @lendesk/eslint-config-lendesk

Install the peer dependencies shown after running the above command (using yarn -D)

Then install Prettier for formatting concerns:

$ yarn add -D prettier

Once the linter and prettier are setup it is recommended to add a git commit hook to auto-run these tools when code is committed. To do this:

  1. Install Husky and LintStaged:
yarn add -D husky lint-staged
  1. Add lint-staged config to package.json:
"lint-staged": {
  "*.js": [
    "prettier --write",
    "eslint --fix",
    "git add"
  ]
}
  1. Add precommit script to the package.json "scripts" section:
"scripts": {
  "precommit": "lint-staged"
}

Usage

In ESLint config (e.g. .eslintrc.json)

{
  "extends": "@lendesk/eslint-config-lendesk"
}
6.0.0

5 years ago

5.0.0

5 years ago

4.1.0

5 years ago

4.0.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

7 years ago

1.0.0

7 years ago