oxc/double-comparisons
oxc plugin · correctness
{
"rules": {
"oxc/double-comparisons": "error"
}
}This rule checks for double comparisons in logical expressions.
x === y || x < y;
x < y || x === y;x <= y;
x >= y;Examples from the Oxlint documentation.
ESLint does not have this rule.
oxc/double-comparisons
oxc plugin · correctness
{
"rules": {
"oxc/double-comparisons": "error"
}
}nursery/noDoubleComparison
nursery · since 2.6.0
{
"linter": {
"rules": {
"nursery": {
"noDoubleComparison": "error"
}
}
}
}Checks for arguments that are only used in recursion with no side-effects.
This rule applies when an Array function has a callback argument used for an array with empty slots.
Checks whether the radix or precision arguments of number-related functions exceed the limit.
Checks whether the throw keyword is missing in front of a new expression.
Checks for redundant or logically impossible comparisons. This includes: - Ineffective double comparisons against constants. - Impossible comparisons involving constants. - Redundant comparisons where both operands are the same (e.g., a < a).