Skip to content
Sarj Code Standards

Oxc

17 rules oxlint@1.91.0

Complete effective rule inventory.

Docs

Rules

17 rules on this page · 17 total

  • oxc/approx-constant

    Prefer Math constants over their approximate numeric values.

    : error in All Oxc contexts
    Autofix available; suggestions available
  • oxc/bad-array-method-on-arguments

    Disallow calling array methods on the arguments object

    : error in All Oxc contexts
    No autofix
  • oxc/bad-bitwise-operator

    Disallow bitwise operators where a logical operator was likely intended.

    : error in All Oxc contexts
    Autofix available; suggestions available
  • oxc/bad-char-at-comparison

    Disallow comparing a single character from a string to a multi-character string.

    : error in All Oxc contexts
    No autofix
  • oxc/bad-comparison-sequence

    Disallow chained comparisons such as a < b < c.

    : error in All Oxc contexts
    No autofix
  • oxc/bad-match-all-arg

    disallow missing g flag in patterns used in String#matchAll and String#replaceAll

    : warning in All Oxc contexts
    No autofix
  • oxc/bad-min-max-func

    Disallow Math.min and Math.max clamps whose argument order always yields a constant

    : error in All Oxc contexts
    No autofix
  • oxc/bad-object-literal-comparison

    Disallow comparing a value with an object or array literal

    : error in All Oxc contexts
    No autofix
  • oxc/bad-replace-all-arg

    disallow missing g flag in patterns used in String#matchAll and String#replaceAll

    : warning in All Oxc contexts
    No autofix
  • oxc/const-comparisons

    Disallow adjacent duplicate operands in logical expressions.

    : error in All Oxc contexts
    No autofix
  • oxc/double-comparisons

    Disallow two comparisons of the same operands that can be combined into one.

    : error in All Oxc contexts
    Autofix available; suggestions available
  • oxc/erasing-op

    Disallow arithmetic and bitwise operations that always evaluate to 0.

    : error in All Oxc contexts
    Autofix available
  • oxc/misrefactored-assign-op

    Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.

    : error in All Oxc contexts
    Autofix available; suggestions available
  • oxc/missing-throw

    Require throw in front of a new error expression statement

    : error in All Oxc contexts
    Autofix available; suggestions available
  • oxc/number-arg-out-of-range

    Disallow radix and precision arguments outside the range number methods accept

    : error in All Oxc contexts
    No autofix
  • oxc/only-used-in-recursion

    Disallow parameters that are only passed to recursive calls

    : error in All Oxc contexts
    Autofix available
  • oxc/uninvoked-array-callback

    Disallow array callbacks on arrays with empty slots, which never invoke them

    : error in All Oxc contexts
    No autofix