Skip to content

Commit

Permalink
fix(#5): correct rule usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Hoeffernig committed Jan 24, 2022
1 parent d85df9c commit 1d5a79f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"jira-ticket-todo-comment/rule-name": "error"
"jira-ticket-todo-comment/jira-ticket-todo-comment": "error"
}
}
```
Expand All @@ -43,15 +43,15 @@ This rule has an optional object option.
```json
{
"rules": {
"jira-ticket-todo-comment/rule-name": ["error", { "projectKey": "TP" }]
"jira-ticket-todo-comment/jira-ticket-todo-comment": ["error", { "projectKey": "TP" }]
}
}
```
* `"regex": "^TODO\\s[A-Z]_[A-Z]{1,9}-\\d+\\s?.*"` (default `^TODO\\s[A-Z]{2,255}-\\d+(\\s.*)?`) allows you to override the default regex which is used to check for the JIRA ticket format; can **NOT** be set together with `"projectKey"` option
```json
{
"rules": {
"jira-ticket-todo-comment/rule-name": ["error", { "regex": "^TODO\\s[A-Z]_[A-Z]{1,9}-\\d+\\s?.*" }]
"jira-ticket-todo-comment/jira-ticket-todo-comment": ["error", { "regex": "^TODO\\s[A-Z]_[A-Z]{1,9}-\\d+\\s?.*" }]
}
}
```

0 comments on commit 1d5a79f

Please sign in to comment.