eslint-plugin-todo-tickets
v1.0.2
Published
ESLint plugin to enforce TODO comments with ticket numbers
Maintainers
Readme
eslint-plugin-todo-tickets
ESLint plugin to enforce TODO comments with ticket numbers (JIRA, GitHub issues, etc.)
[!NOTE] Disclaimer 1: This plugin was initially vibe-coded in a rush, but I promise, I reviewed the code and tested it.
[!TIP] Disclaimer 2: Before I push this mess I found similar projects:
I should've googled things before, but yeah, here am I, procrastinating and re-inventing the wheel.
Installation
npm install --save-dev eslint-plugin-todo-ticketsUsage
Add todo-tickets to the plugins section of your .eslintrc configuration file:
{
"plugins": ["todo-tickets"],
"rules": {
"todo-tickets/todo-tickets": "error"
}
}Configuration
You can customize the ticket patterns and keywords:
{
"rules": {
"todo-tickets/todo-tickets": ["error", {
"ticketPatterns": [
"[A-Z]{2,}-\\d+", // JIRA format (e.g., ABC-123)
"#\\d+" // GitHub format (e.g., #42)
],
"keywords": ["TODO", "FIXME", "BUG", "HACK"]
}]
}
}Examples
Valid
// TODO ABC-123: Fix this issue
// FIXME #42: Something to fix
/* BUG ASMO-42: Important bug */
// HACK MCO-123: Temporary solutionInvalid
// TODO: Missing ticket
// FIXME: No ticket here
// TODO INVALID-TICKET: Invalid formatLicense
This project is licensed under the MIT License - see the LICENSE file for details.
