eslint-config-loopback
ESLint configs for LoopBack projects.
Last updated a year ago by bajtos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-config-loopback 
SYNC missed versions from official npm registry.

eslint-config-loopback

LoopBack's ESLint shareable configs.

Usage

Add eslint and eslint-config-loopback to devDependencies:

npm install -D eslint eslint-config-loopback

In your project root, create/modify .eslintrc:

{
  "extends": "loopback"
}

Then in package.json, set your run script:

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

That's it. Try it out by running:

npm run lint

It is recommended to set a posttest run script to auto lint after running tests:

...
"scripts": {
  "lint": "eslint .",
  "test": "mocha",
  "posttest": "npm run lint"
},
...

Overriding rules

To override a particular rule, use the rules key:

{
  "extends": "loopback",
  "rules": {
    "comma-dangle": "off"
  }
}

While adopting ESLint in existing projects, there may be too many errors to fix at once. In such cases, it may be desirable to modify the rule setting of individual rules:

  • "off" - Turn the rule off
  • "warn" - Turn the rule on as a warning (doesn't affect exit code)
  • "error" - Turn the rule on as an error (exit code is 1 when triggered)

Current Tags

  • 13.1.0                                ...           latest (a year ago)

16 Versions

  • 13.1.0                                ...           a year ago
  • 13.0.0                                ...           2 years ago
  • 12.1.0                                ...           2 years ago
  • 12.0.0                                ...           2 years ago
  • 11.0.0                                ...           2 years ago
  • 10.0.0                                ...           3 years ago
  • 8.0.0                                ...           3 years ago
  • 7.0.1                                ...           4 years ago
  • 6.1.0                                ...           4 years ago
  • 6.0.0                                ...           4 years ago
  • 5.0.0                                ...           4 years ago
  • 4.0.0                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |