Skip to content

Eslint rule that disallows comment out except annotation comment

License

Notifications You must be signed in to change notification settings

kazu728/eslint-plugin-commentout

Repository files navigation

eslint-plugin-commentout

npm version test codecov

Eslint plugin that check commentout except annotation comment. This plugin supports following annotation.

  • TODO:
  • FIXME:
  • HACK:
  • NOTE:
  • XXX:
  • WARNING:
  • @.*

Install

yarn add -D @kzmat/eslint-plugin-commentout

Usage

.eslintrc.js

module.exports = {
  "plugins": [
    ...,
    "@kzmat/commentout"
  ],
  "rules": [
    ...,
    "@kzmat/commentout/commentout": "error"
  ]
  ...,
}

Example

🙆‍♂️ Good
const foo = 'bar'
// TODO: todo something
// FIXME: fix something

// @ts-ignore
const foo: any = 'bar'

🙅‍♂️ Bad
// const foo = 'bar'

License

MIT

About

Eslint rule that disallows comment out except annotation comment

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published