Socket
Book a DemoInstallSign in
Socket

eslint-config-lob

Package Overview
Dependencies
Maintainers
45
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-lob

Shareable ESLint config for Lob repositories

latest
Source
npmnpm
Version
6.0.0
Version published
Maintainers
45
Created
Source

eslint-config-lob

Shareable ESLint configuration for Lob repositories

Usage

  • Install eslint and this module:
npm i eslint eslint-config-lob --save-dev
  • Create an .eslintrc file in the root of your project with the following object:
{
  extends: "eslint-config-lob"
}

This will use the rules in eslint-config-lob's index.js. You can access rules in files other than eslint-config-lob's index.js via:

{
  extends: "eslint-config-lob/migrations"
}
  • Use an .eslintignore file to specify files or directories that the linter should ignore. By default, eslint ignores the node_modules directory.
  • Modify or create the npm lint script in the package.json to:
{
  "scripts": {
    "lint": "eslint ."
  }
}

This will lint every .js file in your project.

  • Clean up any old lint or style tasks and config from your project.
  • Don't forget to shrinkwrap before you commit your changes.

Contributing

Modifying or adding rules.

  • To add to the main rules, modify the index.js file.
  • To use most of the main rules but override some of them, create a new file in the root of this module, extend from index.js and add your overrides. See migrations.js for an example. If you're creating a file like this, its rules should be reusable and not a one-off. For example, you could create a file for angular rules. To make a one-off change, do so in your project's .eslintrc.

Keywords

eslint

FAQs

Package last updated on 21 Dec 2023

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