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
Disallow assigning non-instance values to class instance typed locations
class Point {
constructor(
public x: number,
public y: number,
) {}
}
const point: Point = { x: -1, y: -2 };
declare const plain: { x: number; y: number };
const points: Point[] = [plain];class Point {
constructor(
public x: number,
public y: number,
) {}
}
const point = new Point(1, 2);
const points: Point[] = [new Point(1, 2)];