Skip to content

CoffeeLint rule that forbids specified regular expressions.

Notifications You must be signed in to change notification settings

bentrombley/coffeelint-forbidden-regex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

coffeelint-forbidden-regex

NPM Version

A CoffeeLint rule that searches for specified regular expressions in code and fails when it founds them.

Installation

npm install coffeelint-forbidden-regex

Configuration

Add the following entry to your coffeelint.json file:

"forbidden_regex": {
    "module": "coffeelint-forbidden-regex",
    "level": "error",
    "regexList": [
      "sampleForbiddenRegex1",
      "sampleForbiddenRegex2"
    ]
}

Example

If you want to reject cosole.log or console.err calls, add it as forbidden regular expression for coffeelint:

"forbidden_regex": {
    "module": "coffeelint-forbidden-regex",
    "level": "error",
    "regexList": [
      "console\\.(log|err)"
    ]
}

About

CoffeeLint rule that forbids specified regular expressions.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 100.0%