eslint-config-lob
v6.0.1
Published
Shareable ESLint config for Lob repositories
Downloads
3,643
Maintainers
Readme
eslint-config-lob
Shareable ESLint configuration for Lob repositories
Usage
- Install
eslintand this module:
npm i eslint eslint-config-lob --save-dev- Create an
.eslintrcfile 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
.eslintignorefile to specify files or directories that the linter should ignore. By default, eslint ignores thenode_modulesdirectory. - Modify or create the npm
lintscript 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.jsfile. - 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.jsand add your overrides. Seemigrations.jsfor 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.
