What rule do you want to change?
no-constant-binary-expression
What change do you want to make?
Generate more warnings
How do you think the change should be implemented?
A new default behavior
Example code
Boolean(x) === null; // Flagged
String(x) === null; // Flagged
Number(x) === {}; // Flagged
BigInt(x) === null; // Passes (Should be flagged)
Symbol(x) === null; // Passes (Should be flagged)
What does the rule currently do for this code?
the rule currently ignores comparisons involving BigInt() and Symbol(), allowing them to pass without any warnings.
In contrast, it already flags identical comparison patterns for other global primitive wrappers, such as Boolean(x) === null, String(x) === null, and Number(x) === {}.
What will the rule do after it's changed?
After the change, the following comparisons will be flagged:
Symbol() === null
Symbol("abc") === undefined
Symbol() != null
BigInt(1) === null
BigInt(2) === undefined
BigInt(3) != null
Participation
AI acknowledgment
Additional comments
No response
What rule do you want to change?
no-constant-binary-expression
What change do you want to make?
Generate more warnings
How do you think the change should be implemented?
A new default behavior
Example code
What does the rule currently do for this code?
the rule currently ignores comparisons involving BigInt() and Symbol(), allowing them to pass without any warnings.
In contrast, it already flags identical comparison patterns for other global primitive wrappers, such as
Boolean(x) === null,String(x) === null, andNumber(x) === {}.What will the rule do after it's changed?
After the change, the following comparisons will be flagged:
Symbol() === nullSymbol("abc") === undefinedSymbol() != nullBigInt(1) === nullBigInt(2) === undefinedBigInt(3) != nullParticipation
AI acknowledgment
Additional comments
No response