Skip to content
Lint Overview

Rules from ESLint, Oxlint and Biome

All
  1. Avoid
    function test(onlyUsedInRecursion) {
        return test(onlyUsedInRecursion);
    }
    Prefer
    function f(a: number): number {
       if (a == 0) {
           return 1
       } else {
           return f(a - 1)
       }
    }
    In Oxlint, BiomeJavaScriptConfig for each linter
All
  1. 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);
    }
    In ESLint, Oxlint, BiomeJavaScriptConfig for each linter

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

Technologies

Rules per technology

Preset rankings

Presets by size