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.
declare function unionFn(): Promise<boolean> | boolean;
if (unionFn()) {
// Do something
}
declare function genericFn<T>(arg: T): Promise<T> | string;
if (genericFn(false)) {
// Do something
}declare function unionFn(): Promise<boolean> | boolean;
if (await unionFn()) {
// Do something
}
declare function genericFn<T>(arg: T): Promise<T> | string;
if (await genericFn(false)) {
// Do something
}Popular · 1 of 50
Disallow Promises in places not designed to handle them
declare function unionFn(): Promise<boolean> | boolean;
if (unionFn()) {
// Do something
}
declare function genericFn<T>(arg: T): Promise<T> | string;
if (genericFn(false)) {
// Do something
}declare function unionFn(): Promise<boolean> | boolean;
if (await unionFn()) {
// Do something
}
declare function genericFn<T>(arg: T): Promise<T> | string;
if (await genericFn(false)) {
// Do something
}