Skip to content

chrisakakay/eslint-plugin-no-underscore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
  • disallowValues [bool], (ex.: var a = 'abc_def';)

Example:

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published