Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.37 KB

File metadata and controls

53 lines (35 loc) · 1.37 KB

eslint-plugin-todo-plz

Enforce consistent and maintainable TODO comments.

A screenshot of ESLint output in the editor, displaying "TODO comment doesn't reference a ticket number. Ticket pattern: PROJ-[0-9]+""

Installation

You'll first need to install ESLint:

npm install --save-dev eslint

Next, install eslint-plugin-todo-plz:

npm install --save-dev eslint-plugin-todo-plz

Usage

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

{
  "plugins": ["todo-plz"]
}

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

{
  "rules": {
    "todo-plz/ticket-ref": ["error", { "pattern": "PROJ-[0-9]+" }]
  }
}

Supported Rules

Name Description
ticket-ref Require a ticket reference in the TODO comment

Inspiration