Socket
Socket
Sign inDemoInstall

eslint-config-loopback

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-loopback

ESLint configs for LoopBack projects.


Version published
Weekly downloads
6.8K
decreased by-4.77%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-config-loopback

ESLint configs for LoopBack projects.

Usage

Add eslint-config-loopback to devDependencies:

npm install -D 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)

Keywords

FAQs

Package last updated on 04 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc