Enforce consistent and maintainable TODO comments.
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-todo-plz:
$ npm install eslint-plugin-todo-plz --save-dev
Import eslint-plugin-todo-plz in your eslint.config.js, register it under
plugins, and configure the rules you want to use:
const todoPlz = require("eslint-plugin-todo-plz");
module.exports = [
{
plugins: {
"todo-plz": todoPlz,
},
rules: {
"todo-plz/ticket-ref": ["error", { pattern: "PROJ-[0-9]+" }],
},
},
];- Shoutout
expiring-todo-commentsfor showing me how to build my first ESLint rule.
