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.
No rules match “”.
Popular · 1 of 50
/*eslint id-length: "error"*/ // default is minimum 2-chars ({ "min": 2 })
const x = 5;
obj.e = document.body;
const foo = function (e) { };
try {
dangerousStuff();
} catch (e) {
// ignore as many do
}
const myObj = { a: 1 };
(a) => { a * a };
class y { }
class Foo { x() {} }
class Bar { #x() {} }
class Baz { x = 1 }
class Qux { #x = 1 }
function bar(...x) { }
function baz([x]) { }
const [z] = arr;
const { prop: [i]} = {};
function qux({x}) { }
const { j } = {};
const { prop: a} = {};
({ prop: obj.x } = {});/*eslint id-length: "error"*/ // default is minimum 2-chars ({ "min": 2 })
const num = 5;
function _f() { return 42; }
function _func() { return 42; }
obj.el = document.body;
const foo = function (evt) { /* do stuff */ };
try {
dangerousStuff();
} catch (error) {
// ignore as many do
}
const myObj = { apple: 1 };
(num) => { num * num };
function bar(num = 0) { }
class MyClass { }
class Foo { method() {} }
class Bar { #method() {} }
class Baz { field = 1 }
class Qux { #field = 1 }
function baz(...args) { }
function qux([longName]) { }
const { prop } = {};
const { prop: [name] } = {};
const [longName] = arr;
function foobar({ prop }) { }
function foobaz({ a: prop }) { }
const { a: property } = {};
({ prop: obj.longName } = {});
const data = { "x": 1 }; // excused because of quotes
data["y"] = 3; // excused because of calculated property access