Skip to content

Commit

Permalink
address SL comments
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSonOfThomp committed Oct 16, 2024
1 parent 4863f88 commit ba80868
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/eslint-plugin/src/rules/boolean-verb-prefix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils';
import upperFirst from 'lodash/upperFirst';

import { createRule } from '../utils/createRule';
// import { deepOmit } from '../utils/deepOmit';
import { isTestFile } from '../utils/isTestFile';
import { RuleContext } from '../utils/RuleContext';

const VERBS = ['is', 'are', 'has', 'should', 'did', 'does', 'will', 'use'];
const booleanComparators = ['===', '==', '>', '>=', '<', '<=', '!=', '!=='];
const BOOLEAN_COMPARATORS = ['===', '==', '>', '>=', '<', '<=', '!=', '!=='];

type BooleanVerbPrefixOptions = [
{
Expand Down Expand Up @@ -78,7 +77,7 @@ export const booleanVerbPrefixRule = createRule<

if (
node.init.type === AST_NODE_TYPES.BinaryExpression &&
booleanComparators.includes(node.init.operator)
BOOLEAN_COMPARATORS.includes(node.init.operator)
) {
lintBooleanDeclaration(context, node);
}
Expand Down

0 comments on commit ba80868

Please sign in to comment.