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.
a.charAt(4) === 'a2';
'abc'.at(4) === 'a2';
'abc'[4] === 'a2';
a.charAt(4) === '/n';a.charAt(4) === 'a'
a.charAt(4) === '\n';Popular · 1 of 50
This rule warns when a character accessed with charAt, at, or bracket notation is compared with a string of length greater than 1.
a.charAt(4) === 'a2';
'abc'.at(4) === 'a2';
'abc'[4] === 'a2';
a.charAt(4) === '/n';a.charAt(4) === 'a'
a.charAt(4) === '\n';