Skip to content

Commit

Permalink
Merge pull request #6 from bamboechop/bugfix/#5-improve-readme
Browse files Browse the repository at this point in the history
fix(#5): correct rule usage example
  • Loading branch information
bamboechop authored Jan 24, 2022
2 parents d85df9c + 1d5a79f commit 0db49c3
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 0db49c3

Please sign in to comment.