eslint-plugin-no-underscore

0.2.1 • Public • Published

eslint-plugin-no-underscure

Underscore (the character, not the library) specific linting rules

Installation

$ npm install eslint --save-dev
$ npm install eslint-plugin-no-underscore --save-dev

Configuration

Add plugins section and specify no-underscore as a plugin>

{
  "plugins": [
    "no-underscore"
  ]
}

Enable the rule:

  "rules": {
    "no-underscore/no-underscore": "warn"
  }

Options

  • allowConstants [bool], (ex.: API_URL)
  • allowLeadingUnderscores [bool], (ex.: _myFancyLocalVariable)

Example:

  "rules": {
    "no-underscore/no-underscore": ["warn", {
      "allowConstants": true
    }]
  }

/eslint-plugin-no-underscore/

    Package Sidebar

    Install

    npm i eslint-plugin-no-underscore

    Weekly Downloads

    6

    Version

    0.2.1

    License

    MIT

    Last publish

    Collaborators

    • chrisakakay