eslint-plugin-comment-pattern

1.0.0 • Public • Published

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"
          }
        ]
      }
    ]
  }
}

/eslint-plugin-comment-pattern/

    Package Sidebar

    Install

    npm i eslint-plugin-comment-pattern

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.16 kB

    Total Files

    5

    Last publish

    Collaborators

    • 22116