Skip to content

Commit ea0ac9e

Browse files
committed
Skip nullish rule for declaration files
1 parent 3d521d7 commit ea0ac9e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/tsl-dx/src/rules/nullish.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const nullish = defineRule((options?: nullishOptions) => ({
4747
});
4848
},
4949
BinaryExpression(ctx, node) {
50+
if (node.getSourceFile().isDeclarationFile) return;
5051
const newOperatorText = match(node.operatorToken.kind)
5152
.with(SyntaxKind.EqualsEqualsEqualsToken, () => "==")
5253
.with(SyntaxKind.ExclamationEqualsEqualsToken, () => "!=")

0 commit comments

Comments
 (0)