oxc/missing-throw
oxc plugin · correctness
{
"rules": {
"oxc/missing-throw": "error"
}
}Checks whether the throw keyword is missing in front of a new expression.
function foo() { throw Error() }
const foo = () => { new Error() }function foo() { throw new Error() }
const foo = () => { throw new Error() }Examples from the Oxlint documentation.
ESLint does not have this rule.
oxc/missing-throw
oxc plugin · correctness
{
"rules": {
"oxc/missing-throw": "error"
}
}nursery/noMissingThrow
nursery · since 2.6.5
{
"linter": {
"rules": {
"nursery": {
"noMissingThrow": "error"
}
}
}
}Checks whether the radix or precision arguments of number-related functions exceed the limit.
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).
This rule applies when an Array function has a callback argument used for an array with empty slots.
This rule warns when the replaceAll method is called with a regular expression that does not have the global flag (g).
Checks for comparisons between object and array literals.