Skip to content

Commit

Permalink
Remove no-jira-todo fixer (#19)
Browse files Browse the repository at this point in the history
* remove fix rule from no-jira-todo

* remove fixable property

* remove fixer reference from docs

* update tests

---------

Co-authored-by: George Wright <[email protected]>
  • Loading branch information
gwright170 and George Wright authored Jul 17, 2024
1 parent ff6f9e5 commit 0c56d51
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
6 changes: 0 additions & 6 deletions src/rules/no-jira-todo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,3 @@ Examples of invalid comments:
// @FIXME description of the change needed WALL-1234
// @TODO: https://skyscanner.atlassian.net/browse/not-a-ticket
```

If an invalid `TODO` comment is recognised, there is a auto fix available to update the comment to the format. This should be updated with the ticket and description. This is provided in the format:

```tsx
// TODO: [JIRA-XXX]
```
3 changes: 0 additions & 3 deletions src/rules/no-jira-todo/no-jira-todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ module.exports = {
messages,
type: 'suggestion',
schema: [],
fixable: 'code',
},
create(context) {
return {
Expand All @@ -60,8 +59,6 @@ module.exports = {
context.report({
node: comment,
messageId: 'todo-error',
fix: (fixer) =>
fixer.replaceText(comment, '// TODO: [JIRA-XXXX]'),
});
}
}
Expand Down
5 changes: 0 additions & 5 deletions src/rules/no-jira-todo/no-jira-todo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,22 @@ ruleTester.run('no-jira-todo', rule, {
{
code: '// TODO: please fail',
errors: [{ messageId: 'todo-error' }],
output: '// TODO: [JIRA-XXXX]',
},
{
code: '// TODO: this should also fail WALL-1234',
errors: [{ messageId: 'todo-error' }],
output: '// TODO: [JIRA-XXXX]',
},
{
code: '// FIXME another fail WALL-1234',
errors: [{ messageId: 'todo-error' }],
output: '// TODO: [JIRA-XXXX]',
},
{
code: '// @FIXME and this too [WALL-1234]',
errors: [{ messageId: 'todo-error' }],
output: '// TODO: [JIRA-XXXX]',
},
{
code: '// @TODO: https://skyscanner.atlassian.net/browse/not-a-ticket',
errors: [{ messageId: 'todo-error' }],
output: '// TODO: [JIRA-XXXX]',
},
],
});

0 comments on commit 0c56d51

Please sign in to comment.