Skip to content

This plugin allows you to add patterns to block certain comments in your codebase.

Notifications You must be signed in to change notification settings

22116/eslint-plugin-comment-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESLint Comment Plugin

This plugin allows you to add patterns to block certain comments in your codebase.

Installation

npm install --save-dev eslint-plugin-comment-pattern

Usage

Add comment-pattern to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["comment-pattern"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "comment-pattern/no-pattern-comments": [
      "error",
      {
        "patterns": [
          {
            "pattern": "[а-яА-ЯёЁ]",
            "message": "Cyrillic characters are not allowed in comments"
          },
          {
            "pattern": "TODO",
            "message": "TODO comments are not allowed"
          }
        ]
      }
    ]
  }
}

About

This plugin allows you to add patterns to block certain comments in your codebase.

Resources

Stars

Watchers

Forks

Packages

No packages published