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

Package detail

eslint-plugin-lob

lob12.4kMIT1.2.0

Custom ESLint rules for Lob repositories

eslint, eslintplugin, eslint-plugin

readme

eslint-plugin-lob

Build Status Coverage Status

Custom ESLint rules for Lob repositories

Installation

You'll first need to install ESLint:

$ npm i eslint -D

Next, install eslint-plugin-lob:

$ npm install eslint-plugin-lob -D

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-lob globally.

Usage

Add lob to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": [
    "lob"
  ]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "lob/rule-name": 2
  }
}

Supported Rules

  • align-equals - equal signs of variable declarations involving require, Factory.build (including named factories like UserFactory.build), Bluebird.promisify, or Bluebird.promisifyAll must be aligned
  • newline-after-mocha - new lines must be between mocha blocks (describe, it, beforeEach, etc)
  • padded-describes - describe blocks must be padded by blank lines

Testing

To run the test suite, just clone the repository and run the following:

$ npm i
$ npm test

Contributing

To contribute, please see the CONTRIBUTING.md file.

License

This project is released under the MIT license, which can be found in LICENSE.txt.

changelog

1.2.0 (2017-08-29)

Refactors
  • node: support node < v4 (#10) (0d7d979d)

1.1.0 (2017-5-29)

New Features
  • eslint: loosen eslint peer dependency (e9efa55a)

1.0.1 (2016-8-30)

Chores
  • deps: make eslint v1.x a peer dep (7c8927e7)
  • npm: ignore the coverage directory (b444ab55)
Bug Fixes
  • align-equals:
    • align named factories as well (44228d11)
    • account for promisification when aligning (256dadc8)

1.0.0 (2016-2-15)

Chores
New Features
  • align-requires: add align-requires rule (d92c356e)
  • newline-after-mocha: add the newline-after-mocha rule (245ea880)
  • padded-describes: add the padded-describes rule (0a14a3a9)
Bug Fixes
  • align-equals:
    • consider CallExpressions as well (fb61409d)
    • consider MemberExpressions as well (8b66539c)
    • avoid possible syntax error (e33c0d5d)
  • padded-describes: make the error message more specific (0faed142)
Code Style Changes
  • padded-describes: remove JSDoc to stay consistent (83e42f31)