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.
const a = { ['0']: 0 };
const b = { ['0+1,234']: 0 };
const c = { [0]: 0 };
const d = { ['x']: 0 };
const e = { ['x']() {} };
const { [0]: foo } = obj;
const { ['x']: bar } = obj;
class Foo {
["foo"] = "bar";
[0]() {}
['a']() {}
get ['b']() {}
set ['c'](value) {}
static ["foo"] = "bar";
static ['a']() {}
}const a = { 'a': 0 };
const b = { 0: 0 };
const c = { x() {} };
const d = { a: 0 };
const e = { '0+1,234': 0 };
const { 0: foo } = obj;
const { 'x': bar } = obj;
class Foo {
"foo" = "bar";
0() {}
'a'() {}
get 'b'() {}
set 'c'(value) {}
static "foo" = "bar";
static 'a'() {}
}Popular · 1 of 50
Disallow unnecessary computed property keys in objects and classes
const a = { ['0']: 0 };
const b = { ['0+1,234']: 0 };
const c = { [0]: 0 };
const d = { ['x']: 0 };
const e = { ['x']() {} };
const { [0]: foo } = obj;
const { ['x']: bar } = obj;
class Foo {
["foo"] = "bar";
[0]() {}
['a']() {}
get ['b']() {}
set ['c'](value) {}
static ["foo"] = "bar";
static ['a']() {}
}const a = { 'a': 0 };
const b = { 0: 0 };
const c = { x() {} };
const d = { a: 0 };
const e = { '0+1,234': 0 };
const { 0: foo } = obj;
const { 'x': bar } = obj;
class Foo {
"foo" = "bar";
0() {}
'a'() {}
get 'b'() {}
set 'c'(value) {}
static "foo" = "bar";
static 'a'() {}
}