Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-todo-plz

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-todo-plz - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

25

lib/rules/ticket-ref.js

@@ -12,4 +12,18 @@ /**

"{{ term }} comment doesn't reference a ticket number. Comment pattern: {{ commentPattern }}",
missingTicketWithDescription:
"{{ term }} comment doesn't reference a ticket number. {{ description }}",
};
function getMessageId({ commentPattern, description }) {
if (description) {
return "missingTicketWithDescription";
}
if (commentPattern) {
return "missingTicketWithCommentPattern";
}
return "missingTicket";
}
const schema = [

@@ -22,2 +36,5 @@ {

},
description: {
type: "string",
},
pattern: {

@@ -37,3 +54,3 @@ type: "string",

function create(context) {
const { commentPattern, pattern, terms } = {
const { commentPattern, description, pattern, terms } = {
terms: ["TODO"],

@@ -60,2 +77,3 @@ ...context.options[0],

const includedTerms = terms.filter((term) => value.includes(term));
if (!includedTerms.length) {

@@ -67,2 +85,3 @@ return;

const searchPattern = termSearchPatterns[term];
if (searchPattern.test(value)) return;

@@ -72,4 +91,4 @@

loc: comment.loc,
messageId: commentPattern ? "missingTicketWithCommentPattern" : "missingTicket",
data: { commentPattern, pattern, term },
messageId: getMessageId({ commentPattern, description }),
data: { commentPattern, description, pattern, term },
});

@@ -76,0 +95,0 @@ });

6

package.json
{
"name": "eslint-plugin-todo-plz",
"version": "1.2.1",
"version": "1.3.0",
"description": "Enforce consistent and maintainable TODO comments",

@@ -27,4 +27,4 @@ "license": "MIT",

"devDependencies": {
"eslint": "^8.0.1",
"mocha": "^9.1.3"
"eslint": "^8.23.0",
"mocha": "^10.0.0"
},

@@ -31,0 +31,0 @@ "peerDependencies": {

@@ -5,2 +5,4 @@ # eslint-plugin-todo-plz

![Screenshot](.github/assets/screenshot.png)
## Installation

@@ -7,0 +9,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc