Rules from ESLint, Oxlint and Biome
Trending this quarter
All- Avoid
function test(onlyUsedInRecursion) { return test(onlyUsedInRecursion); }Preferfunction f(a: number): number { if (a == 0) { return 1 } else { return f(a - 1) } }
Trending this quarter · 1 of 10
oxc/only-used-in-recursion
Checks for arguments that are only used in recursion with no side-effects.
In Oxlint, BiomeJavaScript
Avoid
function test(onlyUsedInRecursion) {
return test(onlyUsedInRecursion);
}Prefer
function f(a: number): number {
if (a == 0) {
return 1
} else {
return f(a - 1)
}
}- Reach
- 51.7M
- Trend
- +186.3%
- Presets
- 3
Most popular
All- Avoid
// Unintentional assignment let x; if (x = 0) { const b = 1; } // Practical example that is similar to an error const setHeight = function (someNode) { do { someNode.height = "100px"; } while (someNode = someNode.parentNode); }Prefer// Assignment replaced by comparison let x; if (x === 0) { const b = 1; } // Practical example that wraps the assignment in parentheses const setHeight = function (someNode) { do { someNode.height = "100px"; } while ((someNode = someNode.parentNode)); } // Practical example that wraps the assignment and tests for 'null' const set_height = function (someNode) { do { someNode.height = "100px"; } while ((someNode = someNode.parentNode) !== null); }
Most popular · 1 of 10
eslint/no-cond-assign
Disallow assignment operators in conditional expressions
In ESLint, Oxlint, BiomeJavaScript
Avoid
// Unintentional assignment
let x;
if (x = 0) {
const b = 1;
}
// Practical example that is similar to an error
const setHeight = function (someNode) {
do {
someNode.height = "100px";
} while (someNode = someNode.parentNode);
}Prefer
// Assignment replaced by comparison
let x;
if (x === 0) {
const b = 1;
}
// Practical example that wraps the assignment in parentheses
const setHeight = function (someNode) {
do {
someNode.height = "100px";
} while ((someNode = someNode.parentNode));
}
// Practical example that wraps the assignment and tests for 'null'
const set_height = function (someNode) {
do {
someNode.height = "100px";
} while ((someNode = someNode.parentNode) !== null);
}- Reach
- 279.5M
- Trend
- +44.9%
- Presets
- 17
Reach is the weekly npm downloads of the presets that enable a rule: an estimate of how many installs run it, not a count of people. Trend is the change in reach over the last quarter. Many rules share the same presets and so tie on reach.
The three linters
Weekly npm downloads, last 26 weeks
100M
200M
300M
ESLint
196.1M
Oxlint
49.8M
Biome
27.5M
26 weeks agoThis week
Technologies
Rules per technology
Preset rankings
Most popular
Weekly npm downloads
Trending this quarter
Growth in weekly npm downloads
Presets by size
Small
Under 40 rules- typescript-eslint recommendedESLint · 24 rules174.5M+28.9%
- typescript-eslint strictESLint · 32 rules174.5M+28.9%
- typescript-eslint stylisticESLint · 17 rules174.5M+28.9%
- React Hooks recommendedESLint · 16 rules117.6M+21.2%
- React recommendedESLint · 21 rules80.9M+35.1%
- import recommendedESLint · 8 rules80.1M+34.5%
- jsx-a11y recommendedESLint · 31 rules64.9M+43.0%
- jsx-a11y strictESLint · 31 rules64.9M+43.0%
Medium
40 to 149 rules- ESLint recommendedESLint · 64 rules177.7M+25.9%
- typescript-eslint strict type-checkedESLint · 75 rules174.5M+28.9%
- typescript-eslint recommended type-checkedESLint · 47 rules174.5M+28.9%
- Oxlint defaultOxlint · 111 rules49.7M+187.9%
- Next.js Core Web VitalsESLint · 62 rules46.9M+50.6%
- Vue recommendedESLint · 118 rules9.4M+46.5%
- Vue essentialESLint · 85 rules9.4M+46.5%
- Vue strongly recommendedESLint · 110 rules9.4M+46.5%
Large
150 rules or more- Biome recommendedBiome · 476 rules28M+107.1%
- Unicorn recommendedESLint · 340 rules9.5M+30.0%
- Unicorn unopinionatedESLint · 236 rules9.5M+30.0%
- Airbnb baseESLint · 241 rules6.5M+2.6%
- SonarJS recommendedESLint · 230 rules6.1M+62.8%
- AirbnbESLint · 346 rules3.4M+2.4%
- JavaScript Standard StyleESLint · 161 rules3.1M+12.5%
- Ultracite for BiomeBiome · 601 rules2M+151.7%