oxc/bad-match-all-arg
oxc plugin · correctness
{
"rules": {
"oxc/bad-match-all-arg": "error"
}
}This rule warns when the matchAll method is called with a regular expression that does not have the global flag (g).
text.matchAll(/pattern/);text.matchAll(/pattern/g);Examples from the Oxlint documentation.
ESLint does not have this rule.
oxc/bad-match-all-arg
oxc plugin · correctness
{
"rules": {
"oxc/bad-match-all-arg": "error"
}
}nursery/useGlobalRegexInMatchAll
nursery · since 2.6.7
{
"linter": {
"rules": {
"nursery": {
"useGlobalRegexInMatchAll": "error"
}
}
}
}This rule applies when the comparison operator is applied two or more times in a row.
Checks whether the clamp function Math.min(Math.max(x, y), z) always evaluates to a constant result because the arguments are in the wrong order.
This rule warns when a character accessed with charAt, at, or bracket notation is compared with a string of length greater than 1.
Checks for comparisons between object and array literals.
This rule applies when an array method is called on the arguments object itself.
This rule warns when the replaceAll method is called with a regular expression that does not have the global flag (g).