Skip to content

Commit

Permalink
chore: no-commented-out-tests (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
veritem committed Jul 9, 2023
1 parent 36e7e90 commit 12f87f5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/rules/no-commented-out-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ export type MESSAGE_IDS = 'noCommentedOutTests';
export type Options = [];

function hasTests(node: TSESTree.Comment) {
return /^\s*[xf]?(test|it|describe)(\.\w+|\[['"]\w+['"]\])?\s*\(/mu.test(
node.value
)
return /^\s*[xf]?(test|it|describe)(\.\w+|\[['"]\w+['"]\])?\s*\(/mu.test(node.value)
}

export default createEslintRule<Options, MESSAGE_IDS>({
Expand All @@ -20,7 +18,7 @@ export default createEslintRule<Options, MESSAGE_IDS>({
recommended: 'warn'
},
messages: {
noCommentedOutTests: 'Remove commented out tests'
noCommentedOutTests: 'Remove commented out tests. You may want to use `skip` or `only` instead.'
},
schema: [],
type: 'suggestion'
Expand Down

0 comments on commit 12f87f5

Please sign in to comment.