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.
String('123');
'123'.toString();
'' + '123';
'123' + '';
Number(123);
+123;
~~123;
Boolean(true);
!!true;
BigInt(BigInt(1));
let str = '123';
str += '';function foo(bar: string | number) {
String(bar);
bar.toString();
'' + bar;
bar + '';
Number(bar);
+bar;
~~bar;
Boolean(bar);
!!bar;
BigInt(1);
bar += '';
}Popular · 1 of 50
Disallow conversion idioms when they do not change the type or value of the expression
String('123');
'123'.toString();
'' + '123';
'123' + '';
Number(123);
+123;
~~123;
Boolean(true);
!!true;
BigInt(BigInt(1));
let str = '123';
str += '';function foo(bar: string | number) {
String(bar);
bar.toString();
'' + bar;
bar + '';
Number(bar);
+bar;
~~bar;
Boolean(bar);
!!bar;
BigInt(1);
bar += '';
}