Skip to content
Sarj Code Standards

ESLint core

110 rules oxlint@1.95.0

Complete effective rule inventory.

Docs

Rules

14 rules on this page · 110 total

  • object-shorthand

    Require or disallow method and property shorthand syntax for object literals

    : error in All ESLint core contexts
    Autofix available
  • prefer-arrow-callback

    Require using arrow functions for callbacks

    : error in All ESLint core contexts
    Autofix available
  • prefer-const

    Require const declarations for variables that are never reassigned after declared

    : error in All ESLint core contexts
    Autofix available
  • prefer-exponentiation-operator

    Prefer exponentiation over Math.pow().

    : warning in All ESLint core contexts
    Autofix available
  • prefer-numeric-literals

    Binary, octal and hexadecimal literals over radix parsing of constants.

    : warning in All ESLint core contexts
    Autofix available
  • prefer-object-has-own

    Disallow use of Object.prototype.hasOwnProperty.call() and prefer use of Object.hasOwn()

    : error in All ESLint core contexts
    Autofix available
  • prefer-object-spread

    Prefer object spread over Object.assign({}, ...).

    : warning in All ESLint core contexts
    Autofix available; suggestions available
  • prefer-rest-params

    Require rest parameters instead of arguments

    : error in TypeScript source, React source, Next.js app source, Next.js pages source, TypeScript tests, Bun tests, Playwright end-to-end tests, Syntax-only tool configuration, Design-system React source
    No autofix
  • prefer-spread

    Require spread operators instead of .apply()

    : error in TypeScript source, React source, Next.js app source, Next.js pages source, TypeScript tests, Bun tests, Playwright end-to-end tests, Syntax-only tool configuration, Design-system React source
    No autofix
  • prefer-template

    Require template literals instead of string concatenation

    : error in All ESLint core contexts
    Autofix available
  • radix

    Enforce the use of the radix argument when using parseInt()

    : error in All ESLint core contexts
    Autofix available
  • require-yield

    Require generator functions to contain yield

    : error in All ESLint core contexts
    No autofix
  • use-isnan

    Require calls to isNaN() when checking for NaN

    : error in All ESLint core contexts
    Autofix available
  • valid-typeof

    Enforce comparing typeof expressions against valid strings

    : error in All ESLint core contexts
    Autofix available