Skip to content

peerlibrary/coffeelint-forbidden-keywords

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coffeelint-forbidden-tokens

A CoffeeLint rule that forbids specified keywords.

Description

This CoffeeLint rule forbids the usage of a specified subset of the following keywords: this, if, unless, while, loop, until, true, yes, on, false, no, off, is, ==, isnt, !=, !, not, &&, and, ||, or, ++, --, .., and ...

By default, yes, no, on, and off are forbidden.

Installation

npm install coffeelint-forbidden-keywords

Usage

Add the following configuration to coffeelint.json:

"forbidden_keywords": {
  "module": "coffeelint-forbidden-keywords"
}

Configuration

forbidden: a hash that maps forbidden keywords to suggested replacements. To forbid a keyword with no suggestion, map the keyword to null.

For example:

"forbidden_keywords": {
  "module": "coffeelint-forbidden-keywords",
  "forbidden": {
    "yes": "true",
    "no": "false",
    "on": "true",
    "off": "false",
    "is": "==",
    "isnt": "!="
  }
}

About

A CoffeeLint rule that forbids specified keywords.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CoffeeScript 95.1%
  • JavaScript 4.9%