Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-lob

lob3.8kMIT6.0.0

Shareable ESLint config for Lob repositories

eslint, eslintconfig

readme

eslint-config-lob

Shareable ESLint configuration for Lob repositories

Usage

  1. Install eslint and this module:

    npm i eslint eslint-config-lob --save-dev
  2. 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"
    }
  3. Use an .eslintignore file to specify files or directories that the linter should ignore. By default, eslint ignores the node_modules directory.
  4. Modify or create the npm lint script in the package.json to:

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

    This will lint every .js file in your project.

  5. Clean up any old lint or style tasks and config from your project.

  6. 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.

changelog

5.2.0 (2021-04-25)

Bug Fixes
  • eslint-peer-dependency: Version 5.1 intended to create lenient rules for 'eslint' as a peer. This change actually does that. (0732c16d)
Other Changes

5.1.0 (2021-04-24) [DEPRECATED]

  • eslint: Allow newer versions of eslint, and update syntax to work with major versions 4-7. (#33) (bb3ec96)
Chores
  • deps: bump lodash from 4.17.15 to 4.17.19 (e50e3bb6)
Deprecation notes
  • This version attempted to allow eslint versions 4-7 as peer dependency. Due to a syntax mistake, it does not actually do so. Please use version 5.2.0 instead.

5.0.0 (2020-07-24)

  • mixed &&s and ||s change rules to disallow mixing operators. Since this rule cannot be auto-fixed, this is a breaking change.

4.2.0 (2020-07-09)

Chores
  • indent: change indentation of "dot" chains (4048ece)

4.1.0 (2020-03-04)

Chores
  • align-equals: removing equal alignment to modernize rules (7ab1c67e)

4.0.0 (2018-05-11)

New Features
  • config: enable no-new-func in error mode (3245475f)

3.0.0 (2017-11-13)

Chores
  • eslint: upgrade eslint to 4.x.x and update rule names (#22) (5137b9cb)

2.4.0 (2016-11-11)

New Features
  • browser: upgrade to ES6 rules (df48b84d)

2.3.0 (2016-8-31)

Chores
  • npm: remove shrinkwrap file (7771eec1)
New Features
  • plugin: add eslint-plugin-lob (c67d3985)
Bug Fixes
  • config: use correct extends syntax (8e96a902)
  • key-spacing: use strict mode (e696fcec)
Refactors
  • config: move common rules to base config file (b7c59cea)

2.2.0 (2016-6-29)

Bug Fixes
  • rules: enable semi and comma-spacing (6e6bbeb3)

2.1.0 (2016-6-10)

New Features
  • es5: add rule set for es5 for older repos (af53f573)
Bug Fixes
  • max-lines: reduce it from 2 to 1 (b27957e0)

2.0.1 (2016-5-5)

Bug Fixes
  • arrow-body-style: remove the buggy rule (5a19e0c6)

2.0.0 (2016-2-11)

Bug Fixes
  • object-shorthand: only enable it for properties (7610c8e0)
  • env: enable es6 env (46c098a1)
  • typo: fix typo in config (2bc3121e)
  • changelog: use generate-changelog (505dd9a9)
Chores
  • style: use single quotes in rule configuration (d495cde6)
New Features
  • main: enable all es6 rules (39bcb398)
  • browser: create separate rules for browser env (41a9f1e2)
  • rules:
  • readme: document usage and contribution (528eb310)

1.0.1 (2015-11-07)

New Features
  • publish: prepare for publishing (6ec3f0d)
  • rules: initial rules (4fc3e61)