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

eslint-plugin-jira-ticket-todo-comment

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jira-ticket-todo-comment - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

3

CHANGELOG.md
# Changelog
## 1.0.5
* feat: Add a message option to override the default warning message [#11](https://github.com/bamboechop/eslint-plugin-jira-ticket-todo-comment/pull/11)
## 1.0.4

@@ -4,0 +7,0 @@ * fix: hardcoded `TODO` check

@@ -8,2 +8,3 @@ module.exports = {

const regexOption = options && options.regex;
const messageOption = options && options.message;
if(projectKey && regexOption) {

@@ -23,3 +24,4 @@ context.report({ messageId: `bothOptionsProvided`, node });

if(value.toLowerCase().startsWith(`todo`) && !regex.test(value)) {
context.report({ data: { ticketNumber: `${projectKey ? projectKey : `MP`}-123` }, messageId: `addJiraTicketNumber`, node });
const message = messageOption ? { message: messageOption } : { messageId: `addJiraTicketNumber`};
context.report({ data: { ticketNumber: `${projectKey ? projectKey : `MP`}-123` }, ...message, node });
}

@@ -51,2 +53,5 @@ }

},
message: {
type: `string`,
},
},

@@ -53,0 +58,0 @@ type: `object`,

4

package.json

@@ -42,3 +42,3 @@ {

},
"version": "1.0.4"
}
"version": "1.0.5"
}

@@ -58,1 +58,9 @@ # eslint-plugin-jira-ticket-todo-comment

```
* `"message": "Please replace this TODO with a JIRA reference."` allows you to override the default message that appears when a TODO is detected without any JIRA key.
```json
{
"rules": {
"jira-ticket-todo-comment/jira-ticket-todo-comment": ["error", { "message": "Please replace this TODO with a JIRA reference." }]
}
}
```

@@ -33,2 +33,6 @@ /* eslint-disable quotes */

{
code: `// TODO TP-123 fix this`,
options: [{ projectKey: `TP`, message: "Please replace this TODO with a JIRA reference." }],
},
{
code: `// TODO T_P-123 fix this`,

@@ -35,0 +39,0 @@ options: [{ regex: `^TODO\\s[A-Z]_[A-Z]{1,9}-\\d+\\s?.*` }],

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