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.
let status;
if (status === 'ready') {
console.log('Ready!');
}
let user;
greet(user);
function test() {
let error;
return error || "Unknown error";
}
let options;
const { debug } = options || {};
let flag;
while (!flag) {
// Do something...
}
let config;
function init() {
return config?.enabled;
}declare let value: number | undefined;
console.log(value);
declare module "my-module" {
let value: string;
export = value;
}Popular · 1 of 5
Disallow let or var variables that are read but never assigned
let status;
if (status === 'ready') {
console.log('Ready!');
}
let user;
greet(user);
function test() {
let error;
return error || "Unknown error";
}
let options;
const { debug } = options || {};
let flag;
while (!flag) {
// Do something...
}
let config;
function init() {
return config?.enabled;
}declare let value: number | undefined;
console.log(value);
declare module "my-module" {
let value: string;
export = value;
}