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.
throw "error";
throw 0;
throw undefined;
throw null;
const err = new Error();
throw "an " + err;
// err is recast to a string literal
const er2 = new Error();
throw `${err2}`throw new Error();
throw new Error("error");
const e = new Error("error");
throw e;
try {
throw new Error("error");
} catch (e) {
throw e;
}Popular · 1 of 50
throw "error";
throw 0;
throw undefined;
throw null;
const err = new Error();
throw "an " + err;
// err is recast to a string literal
const er2 = new Error();
throw `${err2}`throw new Error();
throw new Error("error");
const e = new Error("error");
throw e;
try {
throw new Error("error");
} catch (e) {
throw e;
}