Skip to content

edwardpayton/eslint-plugin-no-empty-disable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-no-eslint-disable

Disallow eslint-disable comments without at least one rule.

INSTALL

npm i -D eslint-plugin-no-empty-disable

RULE ID

no-empty-eslint-disable/no-empty-eslint-disable

USAGE

// .eslintrc
{
  ...
  "plugins": ["no-empty-eslint-disable"]
  ...
  "rules": {
    ...
    "no-empty-eslint-disable/no-empty-eslint-disable": "error"
    ...
  }
}

EXAMPLES

These will error

  • const x = 1; // eslint-disable-line
  • // eslint-disable-next-line
  • /* eslint-disable */

These are okay

  • console.log('') // eslint-disable-line no-console
  • // eslint-disable-next-line eqeqeq
  • /* eslint-disable no-empty */

TODO

  • Uses tslint which has now been depecated. Migrate to eslint

Heavily inspired by [https://github.com/unlight/eslint-plugin-no-eslint-disable]

About

Disallow `eslint-disable` comments without at least one rule

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published