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 x = { foo: 1 } as T;
function bar() {
return { foo: 1 } as T;
}const x: T = { foo: 1 };
const y = { foo: 1 } as any;
const z = { foo: 1 } as unknown;
function bar(): T {
return { foo: 1 };
}Popular · 1 of 1
Enforce consistent usage of type assertions
const x = { foo: 1 } as T;
function bar() {
return { foo: 1 } as T;
}const x: T = { foo: 1 };
const y = { foo: 1 } as any;
const z = { foo: 1 } as unknown;
function bar(): T {
return { foo: 1 };
}