Rules
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
function doSomething() {
return foo = bar + 2;
}
function doSomethingElse() {
return foo += 2;
}
const foo = (a, b) => a = b
const bar = (a, b, c) => (a = b, c == b)
function doSomethingMore() {
return foo = bar && foo > 0;
}function doSomething() {
return foo == bar + 2;
}
function doSomethingElse() {
return foo === bar + 2;
}
function doSomethingMore() {
return (foo = bar + 2);
}
const foo = (a, b) => (a = b)
const bar = (a, b, c) => ((a = b), c == b)
function doAnotherThing() {
return (foo = bar) && foo > 0;
}Popular · 1 of 50
Disallow assignment operators in return statements
function doSomething() {
return foo = bar + 2;
}
function doSomethingElse() {
return foo += 2;
}
const foo = (a, b) => a = b
const bar = (a, b, c) => (a = b, c == b)
function doSomethingMore() {
return foo = bar && foo > 0;
}function doSomething() {
return foo == bar + 2;
}
function doSomethingElse() {
return foo === bar + 2;
}
function doSomethingMore() {
return (foo = bar + 2);
}
const foo = (a, b) => (a = b)
const bar = (a, b, c) => ((a = b), c == b)
function doAnotherThing() {
return (foo = bar) && foo > 0;
}