# Lint rules

> Every rule built into bun lint

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit. */}

`bun lint` has 1,021 rules built in. Turn one on in [`bunfig.toml`](/lint#configure-rules), or read about it in the terminal with `bun lint --explain <rule>`.

## ESLint

218 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`accessor-pairs`](/lint/rules/eslint/accessor-pairs) | Require a getter for every setter in objects and classes |  |  |  |
| [`array-callback-return`](/lint/rules/eslint/array-callback-return) | Require callbacks of array methods such as `map` and `filter` to return a value |  | suggestion |  |
| [`arrow-body-style`](/lint/rules/eslint/arrow-body-style) | Enforce one style for the braces around arrow function bodies |  | yes |  |
| [`block-scoped-var`](/lint/rules/eslint/block-scoped-var) | Disallow using a `var` outside the block it is declared in |  |  |  |
| [`callback-return`](/lint/rules/eslint/callback-return) | Require `return` when calling a callback |  |  |  |
| [`camelcase`](/lint/rules/eslint/camelcase) | Require camelCase names for variables, functions and properties |  |  |  |
| [`capitalized-comments`](/lint/rules/eslint/capitalized-comments) | Require comments to start with a capital letter, or forbid it |  | yes |  |
| [`class-methods-use-this`](/lint/rules/eslint/class-methods-use-this) | Require class methods to use `this` |  |  |  |
| [`complexity`](/lint/rules/eslint/complexity) | Enforce a maximum number of branches in a function |  |  |  |
| [`consistent-return`](/lint/rules/eslint/consistent-return) | Require every `return` in a function to have a value, or none of them |  |  |  |
| [`consistent-this`](/lint/rules/eslint/consistent-this) | Enforce one name for variables that hold `this` |  |  |  |
| [`constructor-super`](/lint/rules/eslint/constructor-super) | Require `super()` to be called exactly once in the constructor of a derived class | error |  |  |
| [`curly`](/lint/rules/eslint/curly) | Require braces around the bodies of `if`, `else` and loops |  | yes |  |
| [`default-case`](/lint/rules/eslint/default-case) | Require a `default` case in every `switch` |  |  |  |
| [`default-case-last`](/lint/rules/eslint/default-case-last) | Require `default` to be the last clause of a `switch` |  |  |  |
| [`default-param-last`](/lint/rules/eslint/default-param-last) | Require parameters with a default value to come after the required ones |  |  |  |
| [`dot-notation`](/lint/rules/eslint/dot-notation) | Require `user.name` instead of `user["name"]` |  | yes |  |
| [`eqeqeq`](/lint/rules/eslint/eqeqeq) | Require `===` and `!==` instead of `==` and `!=` |  | yes |  |
| [`for-direction`](/lint/rules/eslint/for-direction) | Require the update clause of a `for` loop to move the counter toward the end of the loop | error |  |  |
| [`func-name-matching`](/lint/rules/eslint/func-name-matching) | Require a function expression's name to match the variable or property it is assigned to |  |  |  |
| [`func-names`](/lint/rules/eslint/func-names) | Require or disallow names for `function` expressions |  |  |  |
| [`func-style`](/lint/rules/eslint/func-style) | Enforce one way to define functions: declarations, or expressions assigned to variables |  |  |  |
| [`getter-return`](/lint/rules/eslint/getter-return) | Require getters to return a value | error |  |  |
| [`global-require`](/lint/rules/eslint/global-require) | Require `require()` calls to be at the top level of the module |  |  |  |
| [`grouped-accessor-pairs`](/lint/rules/eslint/grouped-accessor-pairs) | Require the getter and setter of a property to be next to each other |  |  |  |
| [`guard-for-in`](/lint/rules/eslint/guard-for-in) | Require the body of a `for...in` loop to be guarded by an `if` |  |  |  |
| [`handle-callback-err`](/lint/rules/eslint/handle-callback-err) | Require callbacks to use their error parameter |  |  |  |
| [`id-blacklist`](/lint/rules/eslint/id-blacklist) | Disallow the identifier names you list (old name of `id-denylist`) |  |  |  |
| [`id-denylist`](/lint/rules/eslint/id-denylist) | Disallow the identifier names you list |  |  |  |
| [`id-length`](/lint/rules/eslint/id-length) | Enforce a minimum and a maximum length for identifier names |  |  |  |
| [`id-match`](/lint/rules/eslint/id-match) | Require identifier names to match a regular expression |  |  |  |
| [`init-declarations`](/lint/rules/eslint/init-declarations) | Require or disallow a value in variable declarations |  |  |  |
| [`logical-assignment-operators`](/lint/rules/eslint/logical-assignment-operators) | Require or disallow the logical assignment operators `\|\|=`, `&&=` and `??=` |  | yes |  |
| [`max-classes-per-file`](/lint/rules/eslint/max-classes-per-file) | Enforce a maximum number of classes per file |  |  |  |
| [`max-depth`](/lint/rules/eslint/max-depth) | Enforce a maximum depth that blocks can be nested |  |  |  |
| [`max-lines`](/lint/rules/eslint/max-lines) | Enforce a maximum number of lines per file |  |  |  |
| [`max-lines-per-function`](/lint/rules/eslint/max-lines-per-function) | Enforce a maximum number of lines in a function |  |  |  |
| [`max-nested-callbacks`](/lint/rules/eslint/max-nested-callbacks) | Enforce a maximum depth that callbacks can be nested |  |  |  |
| [`max-params`](/lint/rules/eslint/max-params) | Enforce a maximum number of parameters in function definitions |  |  |  |
| [`max-statements`](/lint/rules/eslint/max-statements) | Enforce a maximum number of statements in a function |  |  |  |
| [`new-cap`](/lint/rules/eslint/new-cap) | Require constructor names to begin with a capital letter |  |  |  |
| [`no-alert`](/lint/rules/eslint/no-alert) | Disallow `alert`, `confirm`, and `prompt` |  |  |  |
| [`no-array-constructor`](/lint/rules/eslint/no-array-constructor) | Disallow `Array` constructors in favor of array literals |  | yes |  |
| [`no-async-promise-executor`](/lint/rules/eslint/no-async-promise-executor) | Disallow an async function as a Promise executor | error |  |  |
| [`no-await-in-loop`](/lint/rules/eslint/no-await-in-loop) | Disallow `await` inside of loops |  |  |  |
| [`no-bitwise`](/lint/rules/eslint/no-bitwise) | Disallow bitwise operators |  |  |  |
| [`no-buffer-constructor`](/lint/rules/eslint/no-buffer-constructor) | Disallow the deprecated `Buffer()` constructor |  |  |  |
| [`no-caller`](/lint/rules/eslint/no-caller) | Disallow `arguments.caller` and `arguments.callee` |  |  |  |
| [`no-case-declarations`](/lint/rules/eslint/no-case-declarations) | Disallow `let`, `const`, `function` and `class` declarations directly in a `case` clause | warn | suggestion |  |
| [`no-catch-shadow`](/lint/rules/eslint/no-catch-shadow) | Disallow a `catch` parameter with the name of a variable in the scope around it |  |  |  |
| [`no-class-assign`](/lint/rules/eslint/no-class-assign) | Disallow assigning to the name of a class | error |  |  |
| [`no-compare-neg-zero`](/lint/rules/eslint/no-compare-neg-zero) | Disallow comparing against `-0` | error | suggestion |  |
| [`no-cond-assign`](/lint/rules/eslint/no-cond-assign) | Disallow assignments in the test of `if`, loops and `? :` | warn |  |  |
| [`no-console`](/lint/rules/eslint/no-console) | Disallow the use of `console` |  | suggestion |  |
| [`no-const-assign`](/lint/rules/eslint/no-const-assign) | Disallow reassigning `const`, `using` and `await using` variables | error |  |  |
| [`no-constant-binary-expression`](/lint/rules/eslint/no-constant-binary-expression) | Disallow comparisons and `&&`, `\|\|`, `??` that always give the same result | error |  |  |
| [`no-constant-condition`](/lint/rules/eslint/no-constant-condition) | Disallow conditions that are always truthy or always falsy | warn |  |  |
| [`no-constructor-return`](/lint/rules/eslint/no-constructor-return) | Disallow returning a value from a constructor |  |  |  |
| [`no-continue`](/lint/rules/eslint/no-continue) | Disallow `continue` statements |  |  |  |
| [`no-control-regex`](/lint/rules/eslint/no-control-regex) | Disallow control characters in regular expressions | warn |  |  |
| [`no-debugger`](/lint/rules/eslint/no-debugger) | Disallow `debugger` statements | error |  |  |
| [`no-delete-var`](/lint/rules/eslint/no-delete-var) | Disallow `delete` on variables | warn |  |  |
| [`no-div-regex`](/lint/rules/eslint/no-div-regex) | Disallow regular expressions that start with `=` |  | yes |  |
| [`no-dupe-args`](/lint/rules/eslint/no-dupe-args) | Disallow two parameters with the same name in a function | error |  |  |
| [`no-dupe-class-members`](/lint/rules/eslint/no-dupe-class-members) | Disallow two class members with the same name | error |  |  |
| [`no-dupe-else-if`](/lint/rules/eslint/no-dupe-else-if) | Disallow an `else if` with a condition that an earlier branch already covers | error |  |  |
| [`no-dupe-keys`](/lint/rules/eslint/no-dupe-keys) | Disallow two keys with the same name in an object literal | error |  |  |
| [`no-duplicate-case`](/lint/rules/eslint/no-duplicate-case) | Disallow two `case` labels with the same test in a `switch` | error |  |  |
| [`no-duplicate-imports`](/lint/rules/eslint/no-duplicate-imports) | Disallow importing from the same module more than once in a file |  |  |  |
| [`no-else-return`](/lint/rules/eslint/no-else-return) | Disallow `else` after an `if` branch that always returns |  | yes |  |
| [`no-empty`](/lint/rules/eslint/no-empty) | Disallow empty block statements | warn | suggestion |  |
| [`no-empty-character-class`](/lint/rules/eslint/no-empty-character-class) | Disallow empty character classes `[]` in regular expressions | warn |  |  |
| [`no-empty-function`](/lint/rules/eslint/no-empty-function) | Disallow functions with an empty body |  | suggestion |  |
| [`no-empty-pattern`](/lint/rules/eslint/no-empty-pattern) | Disallow destructuring patterns that bind nothing | warn |  |  |
| [`no-empty-static-block`](/lint/rules/eslint/no-empty-static-block) | Disallow empty `static {}` blocks in classes | warn | suggestion |  |
| [`no-eq-null`](/lint/rules/eslint/no-eq-null) | Disallow comparing with `null` using `==` or `!=` |  |  |  |
| [`no-eval`](/lint/rules/eslint/no-eval) | Disallow `eval()` |  |  |  |
| [`no-ex-assign`](/lint/rules/eslint/no-ex-assign) | Disallow assigning to the error parameter of a `catch` clause | warn |  |  |
| [`no-extend-native`](/lint/rules/eslint/no-extend-native) | Disallow adding properties to the prototypes of built-in objects |  |  |  |
| [`no-extra-bind`](/lint/rules/eslint/no-extra-bind) | Disallow `.bind()` on functions that do not use `this` |  | yes |  |
| [`no-extra-boolean-cast`](/lint/rules/eslint/no-extra-boolean-cast) | Disallow `!!` and `Boolean()` where the value is converted to a boolean anyway | warn | yes |  |
| [`no-extra-label`](/lint/rules/eslint/no-extra-label) | Disallow labels on `break` and `continue` that name the innermost loop or `switch` |  | yes |  |
| [`no-fallthrough`](/lint/rules/eslint/no-fallthrough) | Disallow `case` clauses that run on into the next one | error |  |  |
| [`no-func-assign`](/lint/rules/eslint/no-func-assign) | Disallow assigning to the name of a function declaration | error |  |  |
| [`no-global-assign`](/lint/rules/eslint/no-global-assign) | Disallow assigning to built-in and other read-only global variables | warn |  |  |
| [`no-implicit-coercion`](/lint/rules/eslint/no-implicit-coercion) | Require `Boolean()`, `Number()` and `String()` instead of operator tricks like `!!x` and `+x` |  | yes |  |
| [`no-implicit-globals`](/lint/rules/eslint/no-implicit-globals) | Disallow declarations and assignments that create global variables by accident |  |  |  |
| [`no-implied-eval`](/lint/rules/eslint/no-implied-eval) | Disallow passing a string of code to `setTimeout()`, `setInterval()` or `execScript()` |  |  |  |
| [`no-import-assign`](/lint/rules/eslint/no-import-assign) | Disallow assigning to imported bindings | error |  |  |
| [`no-inline-comments`](/lint/rules/eslint/no-inline-comments) | Disallow comments on the same line as code |  |  |  |
| [`no-inner-declarations`](/lint/rules/eslint/no-inner-declarations) | Disallow `function` and, optionally, `var` declarations in nested blocks |  |  |  |
| [`no-invalid-regexp`](/lint/rules/eslint/no-invalid-regexp) | Disallow invalid patterns and flags in `RegExp()` and `new RegExp()` | error |  |  |
| [`no-invalid-this`](/lint/rules/eslint/no-invalid-this) | Disallow `this` where its value is `undefined` |  |  |  |
| [`no-irregular-whitespace`](/lint/rules/eslint/no-irregular-whitespace) | Disallow whitespace characters other than the ordinary space, tab and line break | error |  |  |
| [`no-iterator`](/lint/rules/eslint/no-iterator) | Disallow the `__iterator__` property |  |  |  |
| [`no-label-var`](/lint/rules/eslint/no-label-var) | Disallow labels that share a name with a variable |  |  |  |
| [`no-labels`](/lint/rules/eslint/no-labels) | Disallow labeled statements |  |  |  |
| [`no-lone-blocks`](/lint/rules/eslint/no-lone-blocks) | Disallow blocks that do nothing |  |  |  |
| [`no-lonely-if`](/lint/rules/eslint/no-lonely-if) | Require `else if` instead of an `if` alone in an `else` block |  | yes |  |
| [`no-loop-func`](/lint/rules/eslint/no-loop-func) | Disallow functions in loops that use a variable the loop changes |  |  |  |
| [`no-loss-of-precision`](/lint/rules/eslint/no-loss-of-precision) | Disallow number literals that cannot be stored exactly as written | error |  |  |
| [`no-magic-numbers`](/lint/rules/eslint/no-magic-numbers) | Require numbers to be given a name instead of being used directly |  |  |  |
| [`no-misleading-character-class`](/lint/rules/eslint/no-misleading-character-class) | Disallow characters made of several code points inside a regular expression character class | error | suggestion |  |
| [`no-mixed-requires`](/lint/rules/eslint/no-mixed-requires) | Disallow `require` calls mixed with other variables in one declaration |  |  |  |
| [`no-multi-assign`](/lint/rules/eslint/no-multi-assign) | Disallow chained assignments such as `a = b = c` |  |  |  |
| [`no-multi-str`](/lint/rules/eslint/no-multi-str) | Disallow strings that continue on the next line with a backslash |  |  |  |
| [`no-native-reassign`](/lint/rules/eslint/no-native-reassign) | Disallow assignments to built-in and other read-only global variables |  |  |  |
| [`no-negated-condition`](/lint/rules/eslint/no-negated-condition) | Disallow negated conditions in `if`/`else` and in ternaries |  |  |  |
| [`no-negated-in-lhs`](/lint/rules/eslint/no-negated-in-lhs) | Disallow negating the left operand of `in` |  |  |  |
| [`no-nested-ternary`](/lint/rules/eslint/no-nested-ternary) | Disallow a ternary inside the branch of another ternary |  |  |  |
| [`no-new`](/lint/rules/eslint/no-new) | Disallow `new` when the created object is thrown away |  |  |  |
| [`no-new-func`](/lint/rules/eslint/no-new-func) | Disallow creating functions from strings with `Function` |  |  |  |
| [`no-new-native-nonconstructor`](/lint/rules/eslint/no-new-native-nonconstructor) | Disallow `new Symbol()` and `new BigInt()` | error |  |  |
| [`no-new-object`](/lint/rules/eslint/no-new-object) | Disallow `new Object()` in favor of `{}` |  |  |  |
| [`no-new-require`](/lint/rules/eslint/no-new-require) | Disallow `new require(..)` |  |  |  |
| [`no-new-symbol`](/lint/rules/eslint/no-new-symbol) | Disallow `new Symbol()` |  |  |  |
| [`no-new-wrappers`](/lint/rules/eslint/no-new-wrappers) | Disallow `new String()`, `new Number()` and `new Boolean()` |  |  |  |
| [`no-nonoctal-decimal-escape`](/lint/rules/eslint/no-nonoctal-decimal-escape) | Disallow the `\8` and `\9` escapes in strings | warn | suggestion |  |
| [`no-obj-calls`](/lint/rules/eslint/no-obj-calls) | Disallow calling `Math`, `JSON`, `Reflect`, `Atomics`, `Intl` and `Temporal` as functions | error |  |  |
| [`no-object-constructor`](/lint/rules/eslint/no-object-constructor) | Disallow `Object()` and `new Object()` without an argument |  | suggestion |  |
| [`no-octal`](/lint/rules/eslint/no-octal) | Disallow number literals that start with `0` followed by a digit | warn |  |  |
| [`no-octal-escape`](/lint/rules/eslint/no-octal-escape) | Disallow octal escape sequences such as `\251` in strings |  |  |  |
| [`no-param-reassign`](/lint/rules/eslint/no-param-reassign) | Disallow assigning to function parameters |  |  |  |
| [`no-path-concat`](/lint/rules/eslint/no-path-concat) | Disallow building paths with `+` from `__dirname` or `__filename` |  |  |  |
| [`no-plusplus`](/lint/rules/eslint/no-plusplus) | Disallow the `++` and `--` operators |  |  |  |
| [`no-process-env`](/lint/rules/eslint/no-process-env) | Disallow `process.env` |  |  |  |
| [`no-process-exit`](/lint/rules/eslint/no-process-exit) | Disallow calls to `process.exit()` |  |  |  |
| [`no-promise-executor-return`](/lint/rules/eslint/no-promise-executor-return) | Disallow returning a value from the function passed to `new Promise` |  | suggestion |  |
| [`no-proto`](/lint/rules/eslint/no-proto) | Disallow the `__proto__` property |  |  |  |
| [`no-prototype-builtins`](/lint/rules/eslint/no-prototype-builtins) | Disallow calling `hasOwnProperty` and other `Object.prototype` methods on the object itself | warn | suggestion |  |
| [`no-redeclare`](/lint/rules/eslint/no-redeclare) | Disallow declaring the same variable twice in one scope | warn |  |  |
| [`no-regex-spaces`](/lint/rules/eslint/no-regex-spaces) | Disallow several spaces in a row in a regular expression | warn | yes |  |
| [`no-restricted-exports`](/lint/rules/eslint/no-restricted-exports) | Disallow the export names you list, or default exports |  |  |  |
| [`no-restricted-globals`](/lint/rules/eslint/no-restricted-globals) | Disallow the global variables you list |  |  |  |
| [`no-restricted-imports`](/lint/rules/eslint/no-restricted-imports) | Disallow importing the modules, or the names from them, that you list |  |  |  |
| [`no-restricted-modules`](/lint/rules/eslint/no-restricted-modules) | Disallow loading the modules you list with `require()` |  |  |  |
| [`no-restricted-properties`](/lint/rules/eslint/no-restricted-properties) | Disallow the object properties you list |  |  |  |
| [`no-restricted-syntax`](/lint/rules/eslint/no-restricted-syntax) | Disallow the syntax you describe with selectors |  |  |  |
| [`no-return-assign`](/lint/rules/eslint/no-return-assign) | Disallow assignments in `return` statements |  |  |  |
| [`no-return-await`](/lint/rules/eslint/no-return-await) | Disallow `return await` where the `await` changes nothing for the caller |  | suggestion |  |
| [`no-script-url`](/lint/rules/eslint/no-script-url) | Disallow `javascript:` URLs |  |  |  |
| [`no-self-assign`](/lint/rules/eslint/no-self-assign) | Disallow assigning a variable or a property to itself | warn |  |  |
| [`no-self-compare`](/lint/rules/eslint/no-self-compare) | Disallow comparing a value with itself |  |  |  |
| [`no-sequences`](/lint/rules/eslint/no-sequences) | Disallow the comma operator |  |  |  |
| [`no-setter-return`](/lint/rules/eslint/no-setter-return) | Disallow returning a value from a setter | warn |  |  |
| [`no-shadow`](/lint/rules/eslint/no-shadow) | Disallow a variable with the same name as one in an outer scope |  |  |  |
| [`no-shadow-restricted-names`](/lint/rules/eslint/no-shadow-restricted-names) | Disallow variables named `undefined`, `NaN`, `Infinity`, `eval`, `arguments` or `globalThis` | warn |  |  |
| [`no-sparse-arrays`](/lint/rules/eslint/no-sparse-arrays) | Disallow array literals with holes | error |  |  |
| [`no-sync`](/lint/rules/eslint/no-sync) | Disallow methods with a name that ends in `Sync` |  |  |  |
| [`no-template-curly-in-string`](/lint/rules/eslint/no-template-curly-in-string) | Disallow `${}` placeholders in strings with ordinary quotes |  |  |  |
| [`no-ternary`](/lint/rules/eslint/no-ternary) | Disallow the `? :` operator |  |  |  |
| [`no-this-before-super`](/lint/rules/eslint/no-this-before-super) | Disallow `this` and `super.x` before `super()` in a constructor | error |  |  |
| [`no-throw-literal`](/lint/rules/eslint/no-throw-literal) | Require `throw` to be given something that can be an `Error` |  |  |  |
| [`no-unassigned-vars`](/lint/rules/eslint/no-unassigned-vars) | Disallow `let` and `var` variables that are read but never assigned | warn |  |  |
| [`no-undef`](/lint/rules/eslint/no-undef) | Disallow variables that are not declared anywhere | error |  |  |
| [`no-undef-init`](/lint/rules/eslint/no-undef-init) | Disallow initializing a variable to `undefined` |  | yes |  |
| [`no-undefined`](/lint/rules/eslint/no-undefined) | Disallow the use of `undefined` as a variable |  |  |  |
| [`no-underscore-dangle`](/lint/rules/eslint/no-underscore-dangle) | Disallow names that start or end with an underscore |  |  |  |
| [`no-unexpected-multiline`](/lint/rules/eslint/no-unexpected-multiline) | Disallow lines that look like a new statement but continue the previous one | error |  |  |
| [`no-unmodified-loop-condition`](/lint/rules/eslint/no-unmodified-loop-condition) | Disallow loop conditions that test variables the loop never changes |  |  |  |
| [`no-unneeded-ternary`](/lint/rules/eslint/no-unneeded-ternary) | Disallow `? :` where the condition alone says the same |  | yes |  |
| [`no-unreachable`](/lint/rules/eslint/no-unreachable) | Disallow code after `return`, `throw`, `break`, and `continue` that can never run | warn |  |  |
| [`no-unreachable-loop`](/lint/rules/eslint/no-unreachable-loop) | Disallow loops with a body that can only run once |  |  |  |
| [`no-unsafe-finally`](/lint/rules/eslint/no-unsafe-finally) | Disallow `return`, `throw`, `break`, and `continue` in `finally` blocks | error |  |  |
| [`no-unsafe-negation`](/lint/rules/eslint/no-unsafe-negation) | Disallow negating the left operand of `in` and `instanceof` | error | suggestion |  |
| [`no-unsafe-optional-chaining`](/lint/rules/eslint/no-unsafe-optional-chaining) | Disallow optional chaining where `undefined` throws an error | error |  |  |
| [`no-unused-expressions`](/lint/rules/eslint/no-unused-expressions) | Disallow statements that compute a value and throw it away |  |  |  |
| [`no-unused-labels`](/lint/rules/eslint/no-unused-labels) | Disallow labels that no `break` or `continue` refers to | warn | yes |  |
| [`no-unused-private-class-members`](/lint/rules/eslint/no-unused-private-class-members) | Disallow `#private` class members that are never used | warn | suggestion |  |
| [`no-unused-vars`](/lint/rules/eslint/no-unused-vars) | Disallow variables, functions, imports, and parameters that are never used | warn | suggestion |  |
| [`no-use-before-define`](/lint/rules/eslint/no-use-before-define) | Disallow using a variable, function, or class above the line that declares it |  |  |  |
| [`no-useless-assignment`](/lint/rules/eslint/no-useless-assignment) | Disallow assigning a value to a variable that is never read afterwards | warn |  |  |
| [`no-useless-backreference`](/lint/rules/eslint/no-useless-backreference) | Disallow regular expression backreferences that always match the empty string | warn |  |  |
| [`no-useless-call`](/lint/rules/eslint/no-useless-call) | Disallow `.call()` and `.apply()` where a normal call does the same |  |  |  |
| [`no-useless-catch`](/lint/rules/eslint/no-useless-catch) | Disallow `catch` clauses that only rethrow the error | warn |  |  |
| [`no-useless-computed-key`](/lint/rules/eslint/no-useless-computed-key) | Disallow brackets around a property key that is a plain string or number |  | yes |  |
| [`no-useless-concat`](/lint/rules/eslint/no-useless-concat) | Disallow joining two string literals with `+` on the same line |  |  |  |
| [`no-useless-constructor`](/lint/rules/eslint/no-useless-constructor) | Disallow constructors that do what the default constructor does |  | suggestion |  |
| [`no-useless-escape`](/lint/rules/eslint/no-useless-escape) | Disallow backslashes that do not change the meaning of a string or regular expression | warn | suggestion |  |
| [`no-useless-rename`](/lint/rules/eslint/no-useless-rename) | Disallow renaming an import, export, or destructured value to the same name |  | yes |  |
| [`no-useless-return`](/lint/rules/eslint/no-useless-return) | Disallow a `return` without a value where the function ends anyway |  | yes |  |
| [`no-var`](/lint/rules/eslint/no-var) | Require `let` or `const` instead of `var` | warn | yes |  |
| [`no-void`](/lint/rules/eslint/no-void) | Disallow the `void` operator |  |  |  |
| [`no-warning-comments`](/lint/rules/eslint/no-warning-comments) | Disallow comments that start with `TODO`, `FIXME`, or another term you choose |  |  |  |
| [`no-with`](/lint/rules/eslint/no-with) | Disallow `with` statements | warn |  |  |
| [`object-shorthand`](/lint/rules/eslint/object-shorthand) | Require or disallow the short forms `{ name }` and `{ save() {} }` in object literals |  | yes |  |
| [`one-var`](/lint/rules/eslint/one-var) | Require variables to be declared in one statement, or in one statement each |  | yes |  |
| [`operator-assignment`](/lint/rules/eslint/operator-assignment) | Require or disallow shorthand assignment operators such as `+=` |  | yes |  |
| [`prefer-arrow-callback`](/lint/rules/eslint/prefer-arrow-callback) | Require arrow functions for callbacks |  | yes |  |
| [`prefer-const`](/lint/rules/eslint/prefer-const) | Require `const` for variables that are never reassigned | warn | yes |  |
| [`prefer-destructuring`](/lint/rules/eslint/prefer-destructuring) | Require destructuring to read a property or an element into a variable |  | yes |  |
| [`prefer-exponentiation-operator`](/lint/rules/eslint/prefer-exponentiation-operator) | Require the `**` operator instead of `Math.pow()` |  | yes |  |
| [`prefer-named-capture-group`](/lint/rules/eslint/prefer-named-capture-group) | Require capture groups in regular expressions to have a name |  | suggestion |  |
| [`prefer-numeric-literals`](/lint/rules/eslint/prefer-numeric-literals) | Require binary, octal and hexadecimal literals instead of `parseInt()` on a fixed string |  | yes |  |
| [`prefer-object-has-own`](/lint/rules/eslint/prefer-object-has-own) | Require `Object.hasOwn()` instead of `Object.prototype.hasOwnProperty.call()` |  | yes |  |
| [`prefer-object-spread`](/lint/rules/eslint/prefer-object-spread) | Require object spread instead of `Object.assign()` into a new object |  | yes |  |
| [`prefer-promise-reject-errors`](/lint/rules/eslint/prefer-promise-reject-errors) | Require an `Error` object as the reason of a promise rejection |  |  |  |
| [`prefer-reflect`](/lint/rules/eslint/prefer-reflect) | Require `Reflect` methods instead of their older `Object` and `Function` forms |  |  |  |
| [`prefer-regex-literals`](/lint/rules/eslint/prefer-regex-literals) | Require regular expression literals instead of `RegExp()` with a fixed pattern |  | suggestion |  |
| [`prefer-rest-params`](/lint/rules/eslint/prefer-rest-params) | Require rest parameters instead of `arguments` | warn |  |  |
| [`prefer-spread`](/lint/rules/eslint/prefer-spread) | Require spread syntax instead of `.apply()` to pass an array as arguments | warn |  |  |
| [`prefer-template`](/lint/rules/eslint/prefer-template) | Require template literals instead of string concatenation |  | yes |  |
| [`preserve-caught-error`](/lint/rules/eslint/preserve-caught-error) | Require the caught error as the `cause` of a new error thrown in `catch` | warn | suggestion |  |
| [`radix`](/lint/rules/eslint/radix) | Require the radix argument of `parseInt()` |  | suggestion |  |
| [`require-atomic-updates`](/lint/rules/eslint/require-atomic-updates) | Disallow assignments that use a value read before an `await` or a `yield` |  |  |  |
| [`require-await`](/lint/rules/eslint/require-await) | Disallow async functions that never use `await` |  | suggestion |  |
| [`require-unicode-regexp`](/lint/rules/eslint/require-unicode-regexp) | Require the `u` or `v` flag on regular expressions |  | suggestion |  |
| [`require-yield`](/lint/rules/eslint/require-yield) | Require generator functions to contain `yield` | warn |  |  |
| [`sort-imports`](/lint/rules/eslint/sort-imports) | Enforce sorted `import` declarations and sorted names inside them |  | yes |  |
| [`sort-keys`](/lint/rules/eslint/sort-keys) | Require the keys of object literals to be sorted |  |  |  |
| [`sort-vars`](/lint/rules/eslint/sort-vars) | Require the variables of one declaration to be sorted |  | yes |  |
| [`strict`](/lint/rules/eslint/strict) | Require or disallow `"use strict"` directives |  | yes |  |
| [`symbol-description`](/lint/rules/eslint/symbol-description) | Require a description when creating a `Symbol` |  |  |  |
| [`unicode-bom`](/lint/rules/eslint/unicode-bom) | Require or disallow a Unicode byte order mark at the start of a file |  | yes |  |
| [`use-isnan`](/lint/rules/eslint/use-isnan) | Require `Number.isNaN()` instead of a comparison with `NaN` | error | suggestion |  |
| [`valid-typeof`](/lint/rules/eslint/valid-typeof) | Require `typeof` to be compared with a valid type name | error | suggestion |  |
| [`vars-on-top`](/lint/rules/eslint/vars-on-top) | Require `var` declarations at the top of their function or file |  |  |  |
| [`yoda`](/lint/rules/eslint/yoda) | Require or disallow comparisons with the literal on the left |  | yes |  |

## typescript-eslint

137 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`@typescript-eslint/adjacent-overload-signatures`](/lint/rules/typescript/adjacent-overload-signatures) | Require the overloads of a function to be next to each other |  |  |  |
| [`@typescript-eslint/array-type`](/lint/rules/typescript/array-type) | Require either `T[]` or `Array<T>` for array types, consistently |  | yes |  |
| [`@typescript-eslint/await-thenable`](/lint/rules/typescript/await-thenable) | Disallow `await` on a value that is not a promise |  | suggestion | yes |
| [`@typescript-eslint/ban-ts-comment`](/lint/rules/typescript/ban-ts-comment) | Disallow `@ts-ignore` and `@ts-nocheck`, and require a reason after `@ts-expect-error` | warn | suggestion |  |
| [`@typescript-eslint/ban-tslint-comment`](/lint/rules/typescript/ban-tslint-comment) | Disallow `// tslint:disable` and `// tslint:enable` comments |  | yes |  |
| [`@typescript-eslint/ban-types`](/lint/rules/typescript/ban-types) | Disallow `String`, `Number`, `Object`, `Function`, `{}` and similar types |  |  |  |
| [`@typescript-eslint/class-literal-property-style`](/lint/rules/typescript/class-literal-property-style) | Require constants on a class to be all `readonly` fields or all getters |  | suggestion |  |
| [`@typescript-eslint/class-methods-use-this`](/lint/rules/typescript/class-methods-use-this) | Require class methods to use `this` |  |  |  |
| [`@typescript-eslint/consistent-generic-constructors`](/lint/rules/typescript/consistent-generic-constructors) | Require type arguments on the constructor call or on the type annotation, consistently |  | yes |  |
| [`@typescript-eslint/consistent-indexed-object-style`](/lint/rules/typescript/consistent-indexed-object-style) | Require either `Record<K, V>` or an index signature, consistently |  | yes |  |
| [`@typescript-eslint/consistent-return`](/lint/rules/typescript/consistent-return) | Require every `return` in a function to return a value, or none of them |  |  | yes |
| [`@typescript-eslint/consistent-type-assertions`](/lint/rules/typescript/consistent-type-assertions) | Require one style of type assertion: `value as T`, `<T>value`, or none |  | yes |  |
| [`@typescript-eslint/consistent-type-definitions`](/lint/rules/typescript/consistent-type-definitions) | Require either `interface` or `type` for object types, consistently |  | yes |  |
| [`@typescript-eslint/consistent-type-exports`](/lint/rules/typescript/consistent-type-exports) | Require `export type` for exports that are only types |  | yes | yes |
| [`@typescript-eslint/consistent-type-imports`](/lint/rules/typescript/consistent-type-imports) | Require `import type` for imports that are only used as types |  | yes |  |
| [`@typescript-eslint/default-param-last`](/lint/rules/typescript/default-param-last) | Require parameters with a default value, and optional parameters, to come last |  |  |  |
| [`@typescript-eslint/dot-notation`](/lint/rules/typescript/dot-notation) | Require `user.name` instead of `user["name"]` |  | yes | yes |
| [`@typescript-eslint/explicit-function-return-type`](/lint/rules/typescript/explicit-function-return-type) | Require a return type on functions and class methods |  |  |  |
| [`@typescript-eslint/explicit-member-accessibility`](/lint/rules/typescript/explicit-member-accessibility) | Require `public`, `private` or `protected` on class members |  | yes |  |
| [`@typescript-eslint/explicit-module-boundary-types`](/lint/rules/typescript/explicit-module-boundary-types) | Require parameter and return types on exported functions and the methods of exported classes |  |  |  |
| [`@typescript-eslint/init-declarations`](/lint/rules/typescript/init-declarations) | Require or disallow a value in variable declarations |  |  |  |
| [`@typescript-eslint/max-params`](/lint/rules/typescript/max-params) | Enforce a maximum number of parameters in function definitions |  |  |  |
| [`@typescript-eslint/member-ordering`](/lint/rules/typescript/member-ordering) | Require a consistent order for the members of classes, interfaces and type literals |  |  |  |
| [`@typescript-eslint/method-signature-style`](/lint/rules/typescript/method-signature-style) | Enforce one way to write a method in an interface or type literal |  | yes |  |
| [`@typescript-eslint/naming-convention`](/lint/rules/typescript/naming-convention) | Enforce naming conventions for variables, functions, types, members and imports |  |  |  |
| [`@typescript-eslint/no-array-constructor`](/lint/rules/typescript/no-array-constructor) | Disallow `Array()` and `new Array()` in favor of array literals | warn | yes |  |
| [`@typescript-eslint/no-array-delete`](/lint/rules/typescript/no-array-delete) | Disallow `delete` on an element of an array |  | suggestion | yes |
| [`@typescript-eslint/no-base-to-string`](/lint/rules/typescript/no-base-to-string) | Disallow turning an object into a string when the result is `[object Object]` |  |  | yes |
| [`@typescript-eslint/no-confusing-non-null-assertion`](/lint/rules/typescript/no-confusing-non-null-assertion) | Disallow a non-null assertion `!` right before `=`, `==`, `===`, `in` or `instanceof` |  | suggestion |  |
| [`@typescript-eslint/no-confusing-void-expression`](/lint/rules/typescript/no-confusing-void-expression) | Require expressions of type `void` to stand alone as statements |  | yes | yes |
| [`@typescript-eslint/no-deprecated`](/lint/rules/typescript/no-deprecated) | Disallow using code marked as `@deprecated` |  |  | yes |
| [`@typescript-eslint/no-dupe-class-members`](/lint/rules/typescript/no-dupe-class-members) | Disallow two class members with the same name |  |  |  |
| [`@typescript-eslint/no-duplicate-enum-values`](/lint/rules/typescript/no-duplicate-enum-values) | Disallow two enum members with the same value | warn |  |  |
| [`@typescript-eslint/no-duplicate-type-constituents`](/lint/rules/typescript/no-duplicate-type-constituents) | Disallow the same type twice in a union or intersection |  | yes | yes |
| [`@typescript-eslint/no-dynamic-delete`](/lint/rules/typescript/no-dynamic-delete) | Disallow `delete` with a computed property key |  |  |  |
| [`@typescript-eslint/no-empty-function`](/lint/rules/typescript/no-empty-function) | Disallow functions with an empty body |  | suggestion |  |
| [`@typescript-eslint/no-empty-interface`](/lint/rules/typescript/no-empty-interface) | Disallow interfaces that declare no members |  | yes |  |
| [`@typescript-eslint/no-empty-object-type`](/lint/rules/typescript/no-empty-object-type) | Disallow the `{}` type and empty interfaces | warn | suggestion |  |
| [`@typescript-eslint/no-explicit-any`](/lint/rules/typescript/no-explicit-any) | Disallow the `any` type | warn | yes |  |
| [`@typescript-eslint/no-extra-non-null-assertion`](/lint/rules/typescript/no-extra-non-null-assertion) | Disallow a non-null assertion that has no effect | warn | yes |  |
| [`@typescript-eslint/no-extraneous-class`](/lint/rules/typescript/no-extraneous-class) | Disallow classes that are empty, only static, or only a constructor |  |  |  |
| [`@typescript-eslint/no-floating-promises`](/lint/rules/typescript/no-floating-promises) | Require promises to be awaited, returned, or handled |  | suggestion | yes |
| [`@typescript-eslint/no-for-in-array`](/lint/rules/typescript/no-for-in-array) | Disallow `for...in` over an array |  |  | yes |
| [`@typescript-eslint/no-generated-empty-object-type`](/lint/rules/typescript/no-generated-empty-object-type) | Disallow type operations that produce the `{}` type |  |  | yes |
| [`@typescript-eslint/no-implied-eval`](/lint/rules/typescript/no-implied-eval) | Disallow passing code as a string to `setTimeout`, `setInterval` and `new Function` |  |  | yes |
| [`@typescript-eslint/no-import-type-side-effects`](/lint/rules/typescript/no-import-type-side-effects) | Require `import type` when every name in an import is marked `type` |  | yes |  |
| [`@typescript-eslint/no-inferrable-types`](/lint/rules/typescript/no-inferrable-types) | Disallow type annotations that repeat what the initial value already says |  | yes |  |
| [`@typescript-eslint/no-invalid-this`](/lint/rules/typescript/no-invalid-this) | Disallow `this` where its value is `undefined` |  |  |  |
| [`@typescript-eslint/no-invalid-void-type`](/lint/rules/typescript/no-invalid-void-type) | Disallow `void` outside of return types and generic type arguments |  |  |  |
| [`@typescript-eslint/no-loop-func`](/lint/rules/typescript/no-loop-func) | Disallow functions in loops that use a variable the loop changes |  |  |  |
| [`@typescript-eslint/no-loss-of-precision`](/lint/rules/typescript/no-loss-of-precision) | Disallow number literals that cannot be stored exactly as written |  |  |  |
| [`@typescript-eslint/no-magic-numbers`](/lint/rules/typescript/no-magic-numbers) | Disallow numbers that are used without a name |  |  |  |
| [`@typescript-eslint/no-meaningless-void-operator`](/lint/rules/typescript/no-meaningless-void-operator) | Disallow `void` in front of an expression that has no value to discard |  | yes | yes |
| [`@typescript-eslint/no-misused-new`](/lint/rules/typescript/no-misused-new) | Disallow `new` in a class and `constructor` in an interface | error |  |  |
| [`@typescript-eslint/no-misused-promises`](/lint/rules/typescript/no-misused-promises) | Disallow promises where the code around them cannot handle one |  |  | yes |
| [`@typescript-eslint/no-misused-spread`](/lint/rules/typescript/no-misused-spread) | Disallow `...` on values that do not spread the way they look |  | suggestion | yes |
| [`@typescript-eslint/no-mixed-enums`](/lint/rules/typescript/no-mixed-enums) | Disallow enums that have both number and string members |  |  | yes |
| [`@typescript-eslint/no-namespace`](/lint/rules/typescript/no-namespace) | Disallow TypeScript `namespace` and `module` blocks | warn |  |  |
| [`@typescript-eslint/no-non-null-asserted-nullish-coalescing`](/lint/rules/typescript/no-non-null-asserted-nullish-coalescing) | Disallow `!` on the left side of `??` |  | suggestion |  |
| [`@typescript-eslint/no-non-null-asserted-optional-chain`](/lint/rules/typescript/no-non-null-asserted-optional-chain) | Disallow `!` after an optional chain | warn | suggestion |  |
| [`@typescript-eslint/no-non-null-assertion`](/lint/rules/typescript/no-non-null-assertion) | Disallow the non-null assertion `value!` |  | suggestion |  |
| [`@typescript-eslint/no-redeclare`](/lint/rules/typescript/no-redeclare) | Disallow declaring the same name twice in one scope |  |  |  |
| [`@typescript-eslint/no-redundant-type-constituents`](/lint/rules/typescript/no-redundant-type-constituents) | Disallow members of unions and intersections that change nothing or swallow the rest |  |  | yes |
| [`@typescript-eslint/no-require-imports`](/lint/rules/typescript/no-require-imports) | Disallow `require()` in favor of `import` |  |  |  |
| [`@typescript-eslint/no-restricted-imports`](/lint/rules/typescript/no-restricted-imports) | Disallow imports of the modules you list, with an exception for type imports |  |  |  |
| [`@typescript-eslint/no-restricted-types`](/lint/rules/typescript/no-restricted-types) | Disallow the types you list |  | yes |  |
| [`@typescript-eslint/no-shadow`](/lint/rules/typescript/no-shadow) | Disallow a declaration that hides one with the same name in an outer scope |  |  |  |
| [`@typescript-eslint/no-this-alias`](/lint/rules/typescript/no-this-alias) | Disallow storing `this` in a variable | warn |  |  |
| [`@typescript-eslint/no-type-alias`](/lint/rules/typescript/no-type-alias) | Disallow `type` aliases, or allow only some kinds of them |  |  |  |
| [`@typescript-eslint/no-unnecessary-boolean-literal-compare`](/lint/rules/typescript/no-unnecessary-boolean-literal-compare) | Disallow comparing a boolean with `true` or `false` |  | yes | yes |
| [`@typescript-eslint/no-unnecessary-condition`](/lint/rules/typescript/no-unnecessary-condition) | Disallow conditions that the types say are always true or always false |  | suggestion | yes |
| [`@typescript-eslint/no-unnecessary-parameter-property-assignment`](/lint/rules/typescript/no-unnecessary-parameter-property-assignment) | Disallow assigning a constructor parameter property to itself |  |  |  |
| [`@typescript-eslint/no-unnecessary-qualifier`](/lint/rules/typescript/no-unnecessary-qualifier) | Disallow naming the enclosing namespace or enum where the short name works |  | yes | yes |
| [`@typescript-eslint/no-unnecessary-template-expression`](/lint/rules/typescript/no-unnecessary-template-expression) | Disallow `${}` in a template literal where plain text or the value itself does the same |  | yes | yes |
| [`@typescript-eslint/no-unnecessary-type-arguments`](/lint/rules/typescript/no-unnecessary-type-arguments) | Disallow a type argument that is the same as the default of its type parameter |  | yes | yes |
| [`@typescript-eslint/no-unnecessary-type-assertion`](/lint/rules/typescript/no-unnecessary-type-assertion) | Disallow `as`, `<T>` and `!` assertions that do not change the type |  | yes | yes |
| [`@typescript-eslint/no-unnecessary-type-constraint`](/lint/rules/typescript/no-unnecessary-type-constraint) | Disallow `extends any` and `extends unknown` on a type parameter | warn | suggestion |  |
| [`@typescript-eslint/no-unnecessary-type-conversion`](/lint/rules/typescript/no-unnecessary-type-conversion) | Disallow converting a value to the type it already has |  | suggestion | yes |
| [`@typescript-eslint/no-unnecessary-type-parameters`](/lint/rules/typescript/no-unnecessary-type-parameters) | Disallow a type parameter that is used only once in a signature |  | suggestion | yes |
| [`@typescript-eslint/no-unsafe-argument`](/lint/rules/typescript/no-unsafe-argument) | Disallow passing a value of type `any` as an argument |  |  | yes |
| [`@typescript-eslint/no-unsafe-assignment`](/lint/rules/typescript/no-unsafe-assignment) | Disallow assigning a value of type `any` to a variable or a property |  |  | yes |
| [`@typescript-eslint/no-unsafe-call`](/lint/rules/typescript/no-unsafe-call) | Disallow calling a value of type `any` |  |  | yes |
| [`@typescript-eslint/no-unsafe-declaration-merging`](/lint/rules/typescript/no-unsafe-declaration-merging) | Disallow a class and an interface with the same name | warn |  |  |
| [`@typescript-eslint/no-unsafe-enum-assignment`](/lint/rules/typescript/no-unsafe-enum-assignment) | Disallow giving a plain number or string to a place typed as an enum |  |  | yes |
| [`@typescript-eslint/no-unsafe-enum-comparison`](/lint/rules/typescript/no-unsafe-enum-comparison) | Disallow comparing an enum value with a plain number or string |  | suggestion | yes |
| [`@typescript-eslint/no-unsafe-function-type`](/lint/rules/typescript/no-unsafe-function-type) | Disallow the built-in `Function` type | warn |  |  |
| [`@typescript-eslint/no-unsafe-member-access`](/lint/rules/typescript/no-unsafe-member-access) | Disallow reading a property of a value of type `any` |  |  | yes |
| [`@typescript-eslint/no-unsafe-return`](/lint/rules/typescript/no-unsafe-return) | Disallow returning a value of type `any` from a function |  |  | yes |
| [`@typescript-eslint/no-unsafe-type-assertion`](/lint/rules/typescript/no-unsafe-type-assertion) | Disallow type assertions that narrow a type |  |  | yes |
| [`@typescript-eslint/no-unsafe-unary-minus`](/lint/rules/typescript/no-unsafe-unary-minus) | Require the operand of unary `-` to be a number or a bigint |  |  | yes |
| [`@typescript-eslint/no-unused-expressions`](/lint/rules/typescript/no-unused-expressions) | Disallow statements that compute a value and do nothing with it | warn |  |  |
| [`@typescript-eslint/no-unused-private-class-members`](/lint/rules/typescript/no-unused-private-class-members) | Disallow private class members that are never used |  |  |  |
| [`@typescript-eslint/no-unused-vars`](/lint/rules/typescript/no-unused-vars) | Disallow variables, functions, parameters, imports, and types that are never used | warn | yes |  |
| [`@typescript-eslint/no-use-before-define`](/lint/rules/typescript/no-use-before-define) | Disallow using a variable, function, class, enum, or type above the line that declares it |  |  |  |
| [`@typescript-eslint/no-useless-constructor`](/lint/rules/typescript/no-useless-constructor) | Disallow constructors that do what the default constructor does |  | suggestion |  |
| [`@typescript-eslint/no-useless-default-assignment`](/lint/rules/typescript/no-useless-default-assignment) | Disallow default values that can never be used |  | suggestion | yes |
| [`@typescript-eslint/no-useless-empty-export`](/lint/rules/typescript/no-useless-empty-export) | Disallow `export {}` in a file that is already a module |  | yes |  |
| [`@typescript-eslint/no-var-requires`](/lint/rules/typescript/no-var-requires) | Disallow `const x = require()` in favor of `import` |  |  |  |
| [`@typescript-eslint/no-wrapper-object-types`](/lint/rules/typescript/no-wrapper-object-types) | Disallow `String`, `Number`, `Boolean`, `BigInt`, `Symbol`, and `Object` as types | warn | yes |  |
| [`@typescript-eslint/non-nullable-type-assertion-style`](/lint/rules/typescript/non-nullable-type-assertion-style) | Require `value!` instead of `value as T` when the assertion only removes `null` and `undefined` |  | yes | yes |
| [`@typescript-eslint/only-throw-error`](/lint/rules/typescript/only-throw-error) | Disallow throwing values that are not `Error` objects |  |  | yes |
| [`@typescript-eslint/parameter-properties`](/lint/rules/typescript/parameter-properties) | Require or disallow parameter properties in class constructors |  |  |  |
| [`@typescript-eslint/prefer-as-const`](/lint/rules/typescript/prefer-as-const) | Require `as const` instead of repeating a literal as its own type | warn | yes |  |
| [`@typescript-eslint/prefer-destructuring`](/lint/rules/typescript/prefer-destructuring) | Require destructuring to read a property or an element into a variable |  | yes | yes |
| [`@typescript-eslint/prefer-enum-initializers`](/lint/rules/typescript/prefer-enum-initializers) | Require every enum member to have an explicit value |  | suggestion |  |
| [`@typescript-eslint/prefer-find`](/lint/rules/typescript/prefer-find) | Require `.find()` instead of `.filter()[0]` to get the first match |  | suggestion | yes |
| [`@typescript-eslint/prefer-for-of`](/lint/rules/typescript/prefer-for-of) | Require `for...of` instead of a `for` loop that only uses its index to read the array |  |  |  |
| [`@typescript-eslint/prefer-function-type`](/lint/rules/typescript/prefer-function-type) | Require a function type instead of an interface or object type with only a call signature |  | yes |  |
| [`@typescript-eslint/prefer-includes`](/lint/rules/typescript/prefer-includes) | Require `.includes()` instead of comparing `.indexOf()` with `-1` |  | yes | yes |
| [`@typescript-eslint/prefer-literal-enum-member`](/lint/rules/typescript/prefer-literal-enum-member) | Require enum values to be literals, not computed expressions |  |  |  |
| [`@typescript-eslint/prefer-namespace-keyword`](/lint/rules/typescript/prefer-namespace-keyword) | Require `namespace` instead of `module` to declare a namespace | warn | yes |  |
| [`@typescript-eslint/prefer-nullish-coalescing`](/lint/rules/typescript/prefer-nullish-coalescing) | Require `??` instead of `\|\|` or a ternary to give a default for `null` or `undefined` |  | suggestion | yes |
| [`@typescript-eslint/prefer-optional-chain`](/lint/rules/typescript/prefer-optional-chain) | Require `a?.b` instead of `a && a.b`, `!a \|\| !a.b`, or `(a \|\| {}).b` |  | yes | yes |
| [`@typescript-eslint/prefer-promise-reject-errors`](/lint/rules/typescript/prefer-promise-reject-errors) | Require an `Error` as the reason when a promise is rejected |  |  | yes |
| [`@typescript-eslint/prefer-readonly`](/lint/rules/typescript/prefer-readonly) | Require `readonly` on private members that are only assigned in the constructor |  | yes | yes |
| [`@typescript-eslint/prefer-readonly-parameter-types`](/lint/rules/typescript/prefer-readonly-parameter-types) | Require the types of function parameters to be read-only |  |  | yes |
| [`@typescript-eslint/prefer-reduce-type-parameter`](/lint/rules/typescript/prefer-reduce-type-parameter) | Require a type argument on `reduce` instead of a type assertion on the initial value |  | yes | yes |
| [`@typescript-eslint/prefer-regexp-exec`](/lint/rules/typescript/prefer-regexp-exec) | Require `pattern.exec(text)` instead of `text.match(pattern)` when there is no `g` flag |  | yes | yes |
| [`@typescript-eslint/prefer-return-this-type`](/lint/rules/typescript/prefer-return-this-type) | Require the return type `this` for a method that returns `this` |  | yes | yes |
| [`@typescript-eslint/prefer-string-starts-ends-with`](/lint/rules/typescript/prefer-string-starts-ends-with) | Require `startsWith` and `endsWith` instead of other ways to test the start or end of a string |  | yes | yes |
| [`@typescript-eslint/prefer-ts-expect-error`](/lint/rules/typescript/prefer-ts-expect-error) | Require `@ts-expect-error` instead of `@ts-ignore` |  | yes |  |
| [`@typescript-eslint/promise-function-async`](/lint/rules/typescript/promise-function-async) | Require functions that return a promise to be `async` |  | yes | yes |
| [`@typescript-eslint/related-getter-setter-pairs`](/lint/rules/typescript/related-getter-setter-pairs) | Require the type of a getter to be assignable to the type of its setter |  |  | yes |
| [`@typescript-eslint/require-array-sort-compare`](/lint/rules/typescript/require-array-sort-compare) | Require a compare function in calls to `sort` and `toSorted` on arrays |  |  | yes |
| [`@typescript-eslint/require-await`](/lint/rules/typescript/require-await) | Disallow `async` functions that never `await` and do not return a promise |  | suggestion | yes |
| [`@typescript-eslint/restrict-plus-operands`](/lint/rules/typescript/restrict-plus-operands) | Require both operands of `+` to be numbers, bigints, or strings |  |  | yes |
| [`@typescript-eslint/restrict-template-expressions`](/lint/rules/typescript/restrict-template-expressions) | Disallow values in template literals that do not turn into a useful string |  |  | yes |
| [`@typescript-eslint/return-await`](/lint/rules/typescript/return-await) | Enforce consistent use of `await` when an `async` function returns a promise |  | yes | yes |
| [`@typescript-eslint/sort-type-constituents`](/lint/rules/typescript/sort-type-constituents) | Require the members of union and intersection types to be sorted |  | yes |  |
| [`@typescript-eslint/strict-boolean-expressions`](/lint/rules/typescript/strict-boolean-expressions) | Disallow nullable numbers, strings, and booleans, `any`, and always-true values in conditions |  | suggestion | yes |
| [`@typescript-eslint/strict-void-return`](/lint/rules/typescript/strict-void-return) | Disallow passing a function that returns a value where a `void` function is expected |  | suggestion | yes |
| [`@typescript-eslint/switch-exhaustiveness-check`](/lint/rules/typescript/switch-exhaustiveness-check) | Require a `switch` on a union or an enum to have a `case` for every member |  | suggestion | yes |
| [`@typescript-eslint/triple-slash-reference`](/lint/rules/typescript/triple-slash-reference) | Disallow `/// <reference />` comments where an `import` does the job | warn |  |  |
| [`@typescript-eslint/typedef`](/lint/rules/typescript/typedef) | Require type annotations in the places you choose |  |  |  |
| [`@typescript-eslint/unbound-method`](/lint/rules/typescript/unbound-method) | Disallow taking a method off its object without binding it |  |  | yes |
| [`@typescript-eslint/unified-signatures`](/lint/rules/typescript/unified-signatures) | Disallow overloads that can be written as one signature |  |  |  |
| [`@typescript-eslint/use-unknown-in-catch-callback-variable`](/lint/rules/typescript/use-unknown-in-catch-callback-variable) | Require the parameter of a promise rejection callback to be typed `unknown` |  | suggestion | yes |

## React

135 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`react-hooks/capitalized-calls`](/lint/rules/react/capitalized-calls) | Disallow calling a function with a capitalized name from a component or a hook |  |  |  |
| [`react-hooks/component-hook-factories`](/lint/rules/react/component-hook-factories) | Deprecated: reports nothing, and is kept so that older configs still load |  |  |  |
| [`react-hooks/config`](/lint/rules/react/config) | Report an invalid configuration of the React Compiler |  |  |  |
| [`react-hooks/error-boundaries`](/lint/rules/react/error-boundaries) | Disallow JSX inside a `try` block, where `catch` cannot see rendering errors |  |  |  |
| [`react-hooks/exhaustive-deps`](/lint/rules/react/exhaustive-deps) | Require the dependency array of a hook to list every value its callback reads | warn | yes |  |
| [`react-hooks/exhaustive-effect-dependencies`](/lint/rules/react/exhaustive-effect-dependencies) | Require the dependency array of an effect to match what the effect reads |  | suggestion |  |
| [`react-hooks/fbt`](/lint/rules/react/fbt) | Reserved for problems with `fbt` translations in the React Compiler: reports nothing |  |  |  |
| [`react-hooks/gating`](/lint/rules/react/gating) | Validate the directive that puts a compiled component behind a feature flag |  |  |  |
| [`react-hooks/globals`](/lint/rules/react/globals) | Disallow reassigning variables declared outside a component or hook during render |  |  |  |
| [`react-hooks/hooks`](/lint/rules/react/hooks) | Require hooks to be called at the top level of a component or hook, never conditionally |  |  |  |
| [`react-hooks/immutability`](/lint/rules/react/immutability) | Disallow modifying props, state, and other values that React expects to stay unchanged |  |  |  |
| [`react-hooks/incompatible-library`](/lint/rules/react/incompatible-library) | Report calls to library APIs that the React Compiler cannot memoize safely |  |  |  |
| [`react-hooks/invariant`](/lint/rules/react/invariant) | Report code that makes the React Compiler fail one of its internal checks |  |  |  |
| [`react-hooks/memo-dependencies`](/lint/rules/react/memo-dependencies) | Require the dependency list of `useMemo` and `useCallback` to match what the callback reads |  | suggestion |  |
| [`react-hooks/memoized-effect-dependencies`](/lint/rules/react/memoized-effect-dependencies) | Require the dependencies of an effect to be memoized |  |  |  |
| [`react-hooks/no-deriving-state-in-effects`](/lint/rules/react/no-deriving-state-in-effects) | Disallow effects that only compute state from props or other state |  |  |  |
| [`react-hooks/preserve-manual-memoization`](/lint/rules/react/preserve-manual-memoization) | Disallow `useMemo` and `useCallback` calls that React Compiler cannot keep memoized |  |  |  |
| [`react-hooks/purity`](/lint/rules/react/purity) | Disallow calls such as `Math.random()` and `Date.now()` while a component renders |  |  |  |
| [`react-hooks/refs`](/lint/rules/react/refs) | Disallow reading or writing `ref.current` while a component renders |  |  |  |
| [`react-hooks/rule-suppression`](/lint/rules/react/rule-suppression) | Disallow comments that turn off `rules-of-hooks` or `exhaustive-deps` |  |  |  |
| [`react-hooks/rules-of-hooks`](/lint/rules/react/rules-of-hooks) | Require hooks to be called at the top level of a component or a custom hook | error |  |  |
| [`react-hooks/set-state-in-effect`](/lint/rules/react/set-state-in-effect) | Disallow calling a state setter directly in the body of an effect |  |  |  |
| [`react-hooks/set-state-in-render`](/lint/rules/react/set-state-in-render) | Disallow calling a state setter unconditionally while a component renders |  |  |  |
| [`react-hooks/static-components`](/lint/rules/react/static-components) | Disallow components that are created while another component renders |  |  |  |
| [`react-hooks/syntax`](/lint/rules/react/syntax) | Disallow invalid JavaScript in components and hooks, such as assigning to a `const` |  | suggestion |  |
| [`react-hooks/todo`](/lint/rules/react/todo) | Report valid syntax that the React Compiler does not support yet |  |  |  |
| [`react-hooks/unsupported-syntax`](/lint/rules/react/unsupported-syntax) | Disallow syntax that the React Compiler cannot compile, such as `eval()` |  |  |  |
| [`react-hooks/use-memo`](/lint/rules/react/use-memo) | Require `useMemo()` callbacks to take no parameters, be synchronous, and not reassign outer variables |  |  |  |
| [`react-hooks/void-use-memo`](/lint/rules/react/void-use-memo) | Require `useMemo()` callbacks to return a value, and the value to be used |  |  |  |
| [`react/boolean-prop-naming`](/lint/rules/react/boolean-prop-naming) | Enforce a naming pattern such as `isOpen` or `hasIcon` for boolean props |  |  |  |
| [`react/button-has-type`](/lint/rules/react/button-has-type) | Require an explicit, valid `type` on every `button` element |  |  |  |
| [`react/checked-requires-onchange-or-readonly`](/lint/rules/react/checked-requires-onchange-or-readonly) | Require `onChange` or `readOnly` on an `input` that has `checked` |  |  |  |
| [`react/default-props-match-prop-types`](/lint/rules/react/default-props-match-prop-types) | Require every entry of `defaultProps` to have a prop type that is not required |  |  |  |
| [`react/destructuring-assignment`](/lint/rules/react/destructuring-assignment) | Enforce one style for reading `props`, `state`, and `context`: destructured or not |  | yes |  |
| [`react/display-name`](/lint/rules/react/display-name) | Require every component to have a name that React can show |  |  |  |
| [`react/forbid-component-props`](/lint/rules/react/forbid-component-props) | Disallow chosen props, by default `className` and `style`, on components |  |  |  |
| [`react/forbid-dom-props`](/lint/rules/react/forbid-dom-props) | Disallow the props you choose on DOM elements such as `div` |  |  |  |
| [`react/forbid-elements`](/lint/rules/react/forbid-elements) | Disallow the elements and components you choose |  |  |  |
| [`react/forbid-foreign-prop-types`](/lint/rules/react/forbid-foreign-prop-types) | Disallow reading the `propTypes` of another component |  |  |  |
| [`react/forbid-prop-types`](/lint/rules/react/forbid-prop-types) | Disallow vague prop types such as `any`, `array`, and `object` |  |  |  |
| [`react/forward-ref-uses-ref`](/lint/rules/react/forward-ref-uses-ref) | Require a component wrapped in `forwardRef` to take a `ref` parameter |  | suggestion |  |
| [`react/function-component-definition`](/lint/rules/react/function-component-definition) | Enforce one way to write function components: declaration, expression, or arrow function |  | yes |  |
| [`react/hook-use-state`](/lint/rules/react/hook-use-state) | Require `useState` to be destructured into a `[value, setValue]` pair |  | suggestion |  |
| [`react/iframe-missing-sandbox`](/lint/rules/react/iframe-missing-sandbox) | Require a valid `sandbox` attribute on `iframe` elements |  |  |  |
| [`react/jsx-boolean-value`](/lint/rules/react/jsx-boolean-value) | Enforce one way to write boolean attributes in JSX: `disabled` or `disabled={true}` |  | yes |  |
| [`react/jsx-child-element-spacing`](/lint/rules/react/jsx-child-element-spacing) | Disallow a line break between text and an inline element in JSX, where a space may be lost |  |  |  |
| [`react/jsx-closing-bracket-location`](/lint/rules/react/jsx-closing-bracket-location) | Enforce where the closing bracket of a multiline JSX tag goes |  | yes |  |
| [`react/jsx-closing-tag-location`](/lint/rules/react/jsx-closing-tag-location) | Enforce that the closing tag of a multiline JSX element lines up with its opening tag |  | yes |  |
| [`react/jsx-curly-brace-presence`](/lint/rules/react/jsx-curly-brace-presence) | Disallow curly braces around plain strings in JSX, or require them |  | yes |  |
| [`react/jsx-curly-newline`](/lint/rules/react/jsx-curly-newline) | Enforce consistent line breaks inside the curly braces of JSX expressions |  | yes |  |
| [`react/jsx-curly-spacing`](/lint/rules/react/jsx-curly-spacing) | Enforce or disallow spaces inside the curly braces of JSX attributes and children |  | yes |  |
| [`react/jsx-equals-spacing`](/lint/rules/react/jsx-equals-spacing) | Enforce or disallow spaces around the `=` of JSX attributes |  | yes |  |
| [`react/jsx-filename-extension`](/lint/rules/react/jsx-filename-extension) | Restrict the file extensions that may contain JSX |  |  |  |
| [`react/jsx-first-prop-new-line`](/lint/rules/react/jsx-first-prop-new-line) | Enforce the position of the first prop of a JSX element |  | yes |  |
| [`react/jsx-fragments`](/lint/rules/react/jsx-fragments) | Enforce `<>` or `<React.Fragment>` for React fragments |  | yes |  |
| [`react/jsx-handler-names`](/lint/rules/react/jsx-handler-names) | Enforce naming conventions for event handlers and the props they are passed to |  |  |  |
| [`react/jsx-indent`](/lint/rules/react/jsx-indent) | Enforce consistent indentation of JSX elements and their children |  | yes |  |
| [`react/jsx-indent-props`](/lint/rules/react/jsx-indent-props) | Enforce consistent indentation of JSX props |  | yes |  |
| [`react/jsx-key`](/lint/rules/react/jsx-key) | Require a `key` prop on elements in arrays and iterators | error |  |  |
| [`react/jsx-max-depth`](/lint/rules/react/jsx-max-depth) | Enforce a maximum depth of nested JSX elements |  |  |  |
| [`react/jsx-max-props-per-line`](/lint/rules/react/jsx-max-props-per-line) | Enforce a maximum number of props on one line of a JSX tag |  | yes |  |
| [`react/jsx-newline`](/lint/rules/react/jsx-newline) | Require or disallow an empty line between JSX elements and expressions |  | yes |  |
| [`react/jsx-no-bind`](/lint/rules/react/jsx-no-bind) | Disallow `.bind()` and functions created during render as JSX props |  |  |  |
| [`react/jsx-no-comment-textnodes`](/lint/rules/react/jsx-no-comment-textnodes) | Disallow `//` and `/* */` comments written as text between JSX tags |  |  |  |
| [`react/jsx-no-constructed-context-values`](/lint/rules/react/jsx-no-constructed-context-values) | Disallow context provider values that are created anew on every render |  |  |  |
| [`react/jsx-no-duplicate-props`](/lint/rules/react/jsx-no-duplicate-props) | Disallow the same prop twice on one JSX element |  |  |  |
| [`react/jsx-no-leaked-render`](/lint/rules/react/jsx-no-leaked-render) | Disallow `&&` conditions in JSX that can render `0` or `NaN` |  | yes |  |
| [`react/jsx-no-literals`](/lint/rules/react/jsx-no-literals) | Disallow text written directly in JSX |  |  |  |
| [`react/jsx-no-script-url`](/lint/rules/react/jsx-no-script-url) | Disallow `javascript:` URLs in links |  |  |  |
| [`react/jsx-no-target-blank`](/lint/rules/react/jsx-no-target-blank) | Require `rel="noreferrer"` on links that open in a new tab |  | yes |  |
| [`react/jsx-no-undef`](/lint/rules/react/jsx-no-undef) | Disallow components in JSX that are not declared or imported |  |  |  |
| [`react/jsx-no-useless-fragment`](/lint/rules/react/jsx-no-useless-fragment) | Disallow fragments that wrap a single child or sit directly in an HTML element |  | yes |  |
| [`react/jsx-one-expression-per-line`](/lint/rules/react/jsx-one-expression-per-line) | Require each child of a JSX element to be on its own line |  | yes |  |
| [`react/jsx-pascal-case`](/lint/rules/react/jsx-pascal-case) | Require component names in JSX to be in PascalCase |  |  |  |
| [`react/jsx-props-no-multi-spaces`](/lint/rules/react/jsx-props-no-multi-spaces) | Disallow more than one space, or an empty line, between JSX props |  | yes |  |
| [`react/jsx-props-no-spread-multi`](/lint/rules/react/jsx-props-no-spread-multi) | Disallow spreading the same variable twice in one JSX element |  | yes |  |
| [`react/jsx-props-no-spreading`](/lint/rules/react/jsx-props-no-spreading) | Disallow `{...props}` in JSX |  |  |  |
| [`react/jsx-sort-default-props`](/lint/rules/react/jsx-sort-default-props) | Require the keys of `defaultProps` to be sorted alphabetically |  |  |  |
| [`react/jsx-sort-props`](/lint/rules/react/jsx-sort-props) | Require JSX props to be sorted alphabetically |  | yes |  |
| [`react/jsx-tag-spacing`](/lint/rules/react/jsx-tag-spacing) | Enforce spacing around the `<`, `/` and `>` of JSX tags |  | yes |  |
| [`react/jsx-uses-react`](/lint/rules/react/jsx-uses-react) | Count `React` as used in files that contain JSX | error |  |  |
| [`react/jsx-uses-vars`](/lint/rules/react/jsx-uses-vars) | Count a variable as used when it is the name of a JSX tag |  |  |  |
| [`react/jsx-wrap-multilines`](/lint/rules/react/jsx-wrap-multilines) | Require parentheses around JSX that spans several lines |  | yes |  |
| [`react/no-access-state-in-setstate`](/lint/rules/react/no-access-state-in-setstate) | Disallow reading `this.state` in the argument of `this.setState()` |  |  |  |
| [`react/no-adjacent-inline-elements`](/lint/rules/react/no-adjacent-inline-elements) | Disallow inline elements that touch each other without whitespace between them |  |  |  |
| [`react/no-array-index-key`](/lint/rules/react/no-array-index-key) | Disallow the index of an array item as its `key` |  |  |  |
| [`react/no-arrow-function-lifecycle`](/lint/rules/react/no-arrow-function-lifecycle) | Disallow arrow functions in class fields as React lifecycle methods |  | yes |  |
| [`react/no-children-prop`](/lint/rules/react/no-children-prop) | Disallow passing `children` as a prop |  |  |  |
| [`react/no-clone-element`](/lint/rules/react/no-clone-element) | Disallow `React.cloneElement` |  |  |  |
| [`react/no-danger`](/lint/rules/react/no-danger) | Disallow the `dangerouslySetInnerHTML` prop |  |  |  |
| [`react/no-danger-with-children`](/lint/rules/react/no-danger-with-children) | Disallow `dangerouslySetInnerHTML` on an element that also has children |  |  |  |
| [`react/no-deprecated`](/lint/rules/react/no-deprecated) | Disallow React APIs that are deprecated |  |  |  |
| [`react/no-did-mount-set-state`](/lint/rules/react/no-did-mount-set-state) | Disallow `this.setState()` in `componentDidMount` |  |  |  |
| [`react/no-did-update-set-state`](/lint/rules/react/no-did-update-set-state) | Disallow `this.setState()` in `componentDidUpdate` |  |  |  |
| [`react/no-direct-mutation-state`](/lint/rules/react/no-direct-mutation-state) | Disallow assigning to `this.state` outside of the constructor |  |  |  |
| [`react/no-find-dom-node`](/lint/rules/react/no-find-dom-node) | Disallow `findDOMNode` |  |  |  |
| [`react/no-invalid-html-attribute`](/lint/rules/react/no-invalid-html-attribute) | Disallow values of the `rel` attribute that HTML does not define |  | suggestion |  |
| [`react/no-is-mounted`](/lint/rules/react/no-is-mounted) | Disallow `this.isMounted()` |  |  |  |
| [`react/no-multi-comp`](/lint/rules/react/no-multi-comp) | Disallow more than one React component in a file |  |  |  |
| [`react/no-namespace`](/lint/rules/react/no-namespace) | Disallow namespaced element names such as `<svg:circle>` |  |  |  |
| [`react/no-object-type-as-default-prop`](/lint/rules/react/no-object-type-as-default-prop) | Disallow objects, arrays, and functions as default values of destructured props |  |  |  |
| [`react/no-react-children`](/lint/rules/react/no-react-children) | Disallow the `React.Children` methods |  |  |  |
| [`react/no-redundant-should-component-update`](/lint/rules/react/no-redundant-should-component-update) | Disallow `shouldComponentUpdate` in a class that extends `React.PureComponent` |  |  |  |
| [`react/no-render-return-value`](/lint/rules/react/no-render-return-value) | Disallow using the return value of `ReactDOM.render` |  |  |  |
| [`react/no-set-state`](/lint/rules/react/no-set-state) | Disallow `this.setState` in class components |  |  |  |
| [`react/no-string-refs`](/lint/rules/react/no-string-refs) | Disallow strings as the value of the `ref` attribute |  |  |  |
| [`react/no-this-in-sfc`](/lint/rules/react/no-this-in-sfc) | Disallow `this` in function components |  |  |  |
| [`react/no-typos`](/lint/rules/react/no-typos) | Disallow misspelled lifecycle methods, static properties, and prop types |  |  |  |
| [`react/no-unescaped-entities`](/lint/rules/react/no-unescaped-entities) | Disallow `"` and `'` as plain characters in JSX text |  | suggestion |  |
| [`react/no-unknown-property`](/lint/rules/react/no-unknown-property) | Disallow attributes on DOM elements that React does not know |  | yes |  |
| [`react/no-unsafe`](/lint/rules/react/no-unsafe) | Disallow the `UNSAFE_` lifecycle methods of class components |  |  |  |
| [`react/no-unstable-nested-components`](/lint/rules/react/no-unstable-nested-components) | Disallow defining a component inside another component |  |  |  |
| [`react/no-unused-class-component-methods`](/lint/rules/react/no-unused-class-component-methods) | Disallow methods and properties of a class component that the class never uses |  |  |  |
| [`react/no-unused-prop-types`](/lint/rules/react/no-unused-prop-types) | Disallow props that are declared but never used in the component |  |  |  |
| [`react/no-unused-state`](/lint/rules/react/no-unused-state) | Disallow fields of a class component's state that are never read |  |  |  |
| [`react/no-will-update-set-state`](/lint/rules/react/no-will-update-set-state) | Disallow `this.setState` in `componentWillUpdate` |  |  |  |
| [`react/only-export-components`](/lint/rules/react/only-export-components) | Require files with components to export only components, so Fast Refresh works |  |  |  |
| [`react/prefer-es6-class`](/lint/rules/react/prefer-es6-class) | Enforce one way to write class components: `class` or `createReactClass` |  |  |  |
| [`react/prefer-exact-props`](/lint/rules/react/prefer-exact-props) | Require `propTypes` to be wrapped in a function that rejects unknown props |  |  |  |
| [`react/prefer-function-component`](/lint/rules/react/prefer-function-component) | Require function components instead of class components |  |  |  |
| [`react/prefer-read-only-props`](/lint/rules/react/prefer-read-only-props) | Require the props in a component's type to be `readonly` |  | yes |  |
| [`react/prefer-stateless-function`](/lint/rules/react/prefer-stateless-function) | Require class components that only render from props to be functions |  |  |  |
| [`react/prop-types`](/lint/rules/react/prop-types) | Require every prop that a component uses to be declared |  |  |  |
| [`react/react-in-jsx-scope`](/lint/rules/react/react-in-jsx-scope) | Require `React` to be in scope in files that use JSX |  |  |  |
| [`react/require-default-props`](/lint/rules/react/require-default-props) | Require a default value for every prop that is not required |  |  |  |
| [`react/require-optimization`](/lint/rules/react/require-optimization) | Require class components to define `shouldComponentUpdate` or extend `PureComponent` |  |  |  |
| [`react/require-render-return`](/lint/rules/react/require-render-return) | Require the `render` method of a class component to return something |  |  |  |
| [`react/self-closing-comp`](/lint/rules/react/self-closing-comp) | Require elements without children to be self-closing |  | yes |  |
| [`react/sort-comp`](/lint/rules/react/sort-comp) | Enforce the order of methods and properties in a class component |  |  |  |
| [`react/sort-default-props`](/lint/rules/react/sort-default-props) | Require the keys of `defaultProps` to be sorted alphabetically |  |  |  |
| [`react/sort-prop-types`](/lint/rules/react/sort-prop-types) | Require the keys of `propTypes` to be sorted alphabetically |  | yes |  |
| [`react/state-in-constructor`](/lint/rules/react/state-in-constructor) | Enforce where a class component sets its initial state: in the constructor or in a class field |  |  |  |
| [`react/static-property-placement`](/lint/rules/react/static-property-placement) | Enforce where a class component declares `propTypes`, `defaultProps` and other static properties |  |  |  |
| [`react/style-prop-object`](/lint/rules/react/style-prop-object) | Require the value of the `style` prop to be an object |  |  |  |
| [`react/void-dom-elements-no-children`](/lint/rules/react/void-dom-elements-no-children) | Disallow children on void DOM elements such as `<img />` and `<br />` |  |  |  |

## React performance

4 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`react-perf/jsx-no-jsx-as-prop`](/lint/rules/react-perf/jsx-no-jsx-as-prop) | Disallow JSX elements created during render as the value of a JSX prop |  |  |  |
| [`react-perf/jsx-no-new-array-as-prop`](/lint/rules/react-perf/jsx-no-new-array-as-prop) | Disallow arrays created during render as the value of a JSX prop |  |  |  |
| [`react-perf/jsx-no-new-function-as-prop`](/lint/rules/react-perf/jsx-no-new-function-as-prop) | Disallow functions created during render as the value of a JSX prop |  |  |  |
| [`react-perf/jsx-no-new-object-as-prop`](/lint/rules/react-perf/jsx-no-new-object-as-prop) | Disallow objects created during render as the value of a JSX prop |  |  |  |

## Accessibility (jsx-a11y)

36 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`jsx-a11y/alt-text`](/lint/rules/jsx-a11y/alt-text) | Require alternative text on `img`, `area`, `object` and `input type="image"` |  |  |  |
| [`jsx-a11y/anchor-ambiguous-text`](/lint/rules/jsx-a11y/anchor-ambiguous-text) | Disallow link text such as "click here" that says nothing about the target |  |  |  |
| [`jsx-a11y/anchor-has-content`](/lint/rules/jsx-a11y/anchor-has-content) | Require links to have content that a screen reader can read |  | yes |  |
| [`jsx-a11y/anchor-is-valid`](/lint/rules/jsx-a11y/anchor-is-valid) | Require links to have a real `href`, and buttons to be `button` elements |  |  |  |
| [`jsx-a11y/aria-activedescendant-has-tabindex`](/lint/rules/jsx-a11y/aria-activedescendant-has-tabindex) | Require elements with `aria-activedescendant` to be focusable |  |  |  |
| [`jsx-a11y/aria-props`](/lint/rules/jsx-a11y/aria-props) | Disallow `aria-*` attributes that do not exist |  | yes |  |
| [`jsx-a11y/aria-proptypes`](/lint/rules/jsx-a11y/aria-proptypes) | Require `aria-*` attributes to have a value of the right kind |  |  |  |
| [`jsx-a11y/aria-role`](/lint/rules/jsx-a11y/aria-role) | Require `role` to be a real ARIA role that is not abstract |  |  |  |
| [`jsx-a11y/aria-unsupported-elements`](/lint/rules/jsx-a11y/aria-unsupported-elements) | Disallow `role` and `aria-*` attributes on elements that do not support them |  | yes |  |
| [`jsx-a11y/autocomplete-valid`](/lint/rules/jsx-a11y/autocomplete-valid) | Require `autoComplete` on an `input` to be a value that browsers know |  |  |  |
| [`jsx-a11y/click-events-have-key-events`](/lint/rules/jsx-a11y/click-events-have-key-events) | Require a keyboard handler next to `onClick` on elements that are not controls |  |  |  |
| [`jsx-a11y/control-has-associated-label`](/lint/rules/jsx-a11y/control-has-associated-label) | Require buttons, links and other controls to have a text label |  |  |  |
| [`jsx-a11y/heading-has-content`](/lint/rules/jsx-a11y/heading-has-content) | Require headings to have content that a screen reader can read |  |  |  |
| [`jsx-a11y/html-has-lang`](/lint/rules/jsx-a11y/html-has-lang) | Require a `lang` attribute on the `html` element |  |  |  |
| [`jsx-a11y/iframe-has-title`](/lint/rules/jsx-a11y/iframe-has-title) | Require a `title` on `iframe` elements |  |  |  |
| [`jsx-a11y/img-redundant-alt`](/lint/rules/jsx-a11y/img-redundant-alt) | Disallow the words "image", "photo" and "picture" in `alt` text |  |  |  |
| [`jsx-a11y/interactive-supports-focus`](/lint/rules/jsx-a11y/interactive-supports-focus) | Require elements with an interactive role and an event handler to be focusable |  | suggestion |  |
| [`jsx-a11y/label-has-associated-control`](/lint/rules/jsx-a11y/label-has-associated-control) | Require every `<label>` to have text and a form control it belongs to |  |  |  |
| [`jsx-a11y/lang`](/lint/rules/jsx-a11y/lang) | Require the `lang` attribute of `<html>` to be a valid language tag |  |  |  |
| [`jsx-a11y/media-has-caption`](/lint/rules/jsx-a11y/media-has-caption) | Require `<audio>` and `<video>` to have a `<track>` with captions |  |  |  |
| [`jsx-a11y/mouse-events-have-key-events`](/lint/rules/jsx-a11y/mouse-events-have-key-events) | Require `onFocus` with `onMouseOver` and `onBlur` with `onMouseOut` |  |  |  |
| [`jsx-a11y/no-access-key`](/lint/rules/jsx-a11y/no-access-key) | Disallow the `accessKey` attribute |  | suggestion |  |
| [`jsx-a11y/no-aria-hidden-on-focusable`](/lint/rules/jsx-a11y/no-aria-hidden-on-focusable) | Disallow `aria-hidden="true"` on elements that can receive focus |  | yes |  |
| [`jsx-a11y/no-autofocus`](/lint/rules/jsx-a11y/no-autofocus) | Disallow the `autoFocus` attribute |  | suggestion |  |
| [`jsx-a11y/no-distracting-elements`](/lint/rules/jsx-a11y/no-distracting-elements) | Disallow `<marquee>` and `<blink>` |  |  |  |
| [`jsx-a11y/no-interactive-element-to-noninteractive-role`](/lint/rules/jsx-a11y/no-interactive-element-to-noninteractive-role) | Disallow non-interactive ARIA roles on interactive elements |  |  |  |
| [`jsx-a11y/no-noninteractive-element-interactions`](/lint/rules/jsx-a11y/no-noninteractive-element-interactions) | Disallow mouse and keyboard handlers on non-interactive elements |  |  |  |
| [`jsx-a11y/no-noninteractive-element-to-interactive-role`](/lint/rules/jsx-a11y/no-noninteractive-element-to-interactive-role) | Disallow interactive ARIA roles on non-interactive elements |  |  |  |
| [`jsx-a11y/no-noninteractive-tabindex`](/lint/rules/jsx-a11y/no-noninteractive-tabindex) | Disallow `tabIndex` of 0 or more on non-interactive elements |  |  |  |
| [`jsx-a11y/no-redundant-roles`](/lint/rules/jsx-a11y/no-redundant-roles) | Disallow a `role` that the element already has |  | yes |  |
| [`jsx-a11y/no-static-element-interactions`](/lint/rules/jsx-a11y/no-static-element-interactions) | Require a `role` on `<div>`, `<span>` and similar elements that have event handlers |  |  |  |
| [`jsx-a11y/prefer-tag-over-role`](/lint/rules/jsx-a11y/prefer-tag-over-role) | Require the HTML element instead of a `role` that imitates it |  |  |  |
| [`jsx-a11y/role-has-required-aria-props`](/lint/rules/jsx-a11y/role-has-required-aria-props) | Require the `aria-*` attributes that an element's `role` needs |  |  |  |
| [`jsx-a11y/role-supports-aria-props`](/lint/rules/jsx-a11y/role-supports-aria-props) | Disallow `aria-*` attributes that the element's role does not support |  |  |  |
| [`jsx-a11y/scope`](/lint/rules/jsx-a11y/scope) | Disallow the `scope` attribute on elements other than `<th>` |  | yes |  |
| [`jsx-a11y/tabindex-no-positive`](/lint/rules/jsx-a11y/tabindex-no-positive) | Disallow `tabIndex` values greater than 0 |  | suggestion |  |

## Next.js

21 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`@next/next/google-font-display`](/lint/rules/nextjs/google-font-display) | Require a `display` parameter other than `auto`, `block` or `fallback` on Google Fonts URLs |  |  |  |
| [`@next/next/google-font-preconnect`](/lint/rules/nextjs/google-font-preconnect) | Require `rel="preconnect"` on `<link>` elements that point to `fonts.gstatic.com` |  |  |  |
| [`@next/next/inline-script-id`](/lint/rules/nextjs/inline-script-id) | Require an `id` on `next/script` components that have inline content |  |  |  |
| [`@next/next/next-script-for-ga`](/lint/rules/nextjs/next-script-for-ga) | Require `next/script` instead of `<script>` to load Google Analytics |  |  |  |
| [`@next/next/no-assign-module-variable`](/lint/rules/nextjs/no-assign-module-variable) | Disallow declaring a variable named `module` |  |  |  |
| [`@next/next/no-async-client-component`](/lint/rules/nextjs/no-async-client-component) | Disallow `async` components in files that start with `"use client"` |  |  |  |
| [`@next/next/no-before-interactive-script-outside-document`](/lint/rules/nextjs/no-before-interactive-script-outside-document) | Disallow the `beforeInteractive` strategy of `next/script` outside `pages/_document.js` |  |  |  |
| [`@next/next/no-css-tags`](/lint/rules/nextjs/no-css-tags) | Disallow `<link rel="stylesheet">` for your own CSS files |  |  |  |
| [`@next/next/no-document-import-in-page`](/lint/rules/nextjs/no-document-import-in-page) | Disallow importing `next/document` outside `pages/_document.js` |  |  |  |
| [`@next/next/no-duplicate-head`](/lint/rules/nextjs/no-duplicate-head) | Disallow more than one `<Head>` element in a file |  |  |  |
| [`@next/next/no-head-element`](/lint/rules/nextjs/no-head-element) | Disallow the `<head>` element in favor of `Head` from `next/head` |  |  |  |
| [`@next/next/no-head-import-in-document`](/lint/rules/nextjs/no-head-import-in-document) | Disallow importing `next/head` in `pages/_document.js` |  |  |  |
| [`@next/next/no-html-link-for-pages`](/lint/rules/nextjs/no-html-link-for-pages) | Disallow `<a>` elements that link to another page of the app |  |  |  |
| [`@next/next/no-img-element`](/lint/rules/nextjs/no-img-element) | Disallow the `<img>` element in favor of `Image` from `next/image` |  |  |  |
| [`@next/next/no-page-custom-font`](/lint/rules/nextjs/no-page-custom-font) | Disallow Google Fonts `<link>` elements outside `pages/_document.js` |  |  |  |
| [`@next/next/no-script-component-in-head`](/lint/rules/nextjs/no-script-component-in-head) | Disallow `<Script>` as a child of `Head` from `next/head` |  |  |  |
| [`@next/next/no-styled-jsx-in-document`](/lint/rules/nextjs/no-styled-jsx-in-document) | Disallow `<style jsx>` in `pages/_document.js` |  |  |  |
| [`@next/next/no-sync-scripts`](/lint/rules/nextjs/no-sync-scripts) | Disallow `<script src>` without `async` or `defer` |  |  |  |
| [`@next/next/no-title-in-document-head`](/lint/rules/nextjs/no-title-in-document-head) | Disallow `<title>` in the `Head` of `next/document` |  |  |  |
| [`@next/next/no-typos`](/lint/rules/nextjs/no-typos) | Disallow misspellings of `getStaticProps`, `getStaticPaths` and `getServerSideProps` |  | suggestion |  |
| [`@next/next/no-unwanted-polyfillio`](/lint/rules/nextjs/no-unwanted-polyfillio) | Disallow scripts from polyfill.io, and polyfills that Next.js already ships |  |  |  |

## import

46 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`import/consistent-type-specifier-style`](/lint/rules/import/consistent-type-specifier-style) | Enforce one way to mark type-only imports: `import type { A }` or `import { type A }` |  | yes |  |
| [`import/default`](/lint/rules/import/default) | Require a default import to match a default export in the imported file |  |  |  |
| [`import/dynamic-import-chunkname`](/lint/rules/import/dynamic-import-chunkname) | Require a `webpackChunkName` comment in every dynamic `import()` |  | suggestion |  |
| [`import/enforce-node-protocol-usage`](/lint/rules/import/enforce-node-protocol-usage) | Enforce either `node:fs` or `fs` when importing Node.js built-in modules |  | yes |  |
| [`import/export`](/lint/rules/import/export) | Disallow exporting the same name twice, and `export *` from a file with no named exports |  |  |  |
| [`import/exports-last`](/lint/rules/import/exports-last) | Require all exports to come after every other statement in the file |  |  |  |
| [`import/extensions`](/lint/rules/import/extensions) | Enforce that import paths always include the file extension, or never do |  |  |  |
| [`import/first`](/lint/rules/import/first) | Require all imports to come before every other statement in the file |  | yes |  |
| [`import/group-exports`](/lint/rules/import/group-exports) | Require all named exports to be in a single `export` declaration |  |  |  |
| [`import/imports-first`](/lint/rules/import/imports-first) | Require all imports to come before every other statement (old name of `import/first`) |  | yes |  |
| [`import/max-dependencies`](/lint/rules/import/max-dependencies) | Enforce a maximum number of modules that a file can import |  |  |  |
| [`import/named`](/lint/rules/import/named) | Require each named import to match a named export in the imported file |  |  |  |
| [`import/namespace`](/lint/rules/import/namespace) | Require each property read from an `import * as` namespace to be exported by that file |  |  |  |
| [`import/newline-after-import`](/lint/rules/import/newline-after-import) | Require an empty line between the last import and the code that follows |  | yes |  |
| [`import/no-absolute-path`](/lint/rules/import/no-absolute-path) | Disallow importing a module by an absolute file system path |  | yes |  |
| [`import/no-amd`](/lint/rules/import/no-amd) | Disallow AMD `define()` and `require()` calls |  |  |  |
| [`import/no-anonymous-default-export`](/lint/rules/import/no-anonymous-default-export) | Disallow default exports that have no name |  |  |  |
| [`import/no-commonjs`](/lint/rules/import/no-commonjs) | Disallow `require()`, `module.exports` and `exports.*` in favor of `import` and `export` |  |  |  |
| [`import/no-cycle`](/lint/rules/import/no-cycle) | Disallow importing a module that imports this file back, directly or through other modules |  |  |  |
| [`import/no-default-export`](/lint/rules/import/no-default-export) | Disallow default exports |  |  |  |
| [`import/no-deprecated`](/lint/rules/import/no-deprecated) | Disallow importing and using names that are marked `@deprecated` |  |  |  |
| [`import/no-duplicates`](/lint/rules/import/no-duplicates) | Disallow importing the same module more than once in a file |  | yes |  |
| [`import/no-dynamic-require`](/lint/rules/import/no-dynamic-require) | Disallow `require()` with an argument that is not a string literal |  |  |  |
| [`import/no-empty-named-blocks`](/lint/rules/import/no-empty-named-blocks) | Disallow `import {} from` with nothing between the braces |  | yes |  |
| [`import/no-extraneous-dependencies`](/lint/rules/import/no-extraneous-dependencies) | Disallow importing a package that `package.json` does not list |  |  |  |
| [`import/no-import-module-exports`](/lint/rules/import/no-import-module-exports) | Disallow `import` declarations in a file that exports with `module.exports` or `exports.*` |  | yes |  |
| [`import/no-internal-modules`](/lint/rules/import/no-internal-modules) | Disallow importing a file from inside another directory or package |  |  |  |
| [`import/no-mutable-exports`](/lint/rules/import/no-mutable-exports) | Disallow exporting a variable declared with `let` or `var` |  |  |  |
| [`import/no-named-as-default`](/lint/rules/import/no-named-as-default) | Disallow naming a default import after a named export of the same module |  |  |  |
| [`import/no-named-as-default-member`](/lint/rules/import/no-named-as-default-member) | Disallow reading a property of a default import that is also a named export of the module |  |  |  |
| [`import/no-named-default`](/lint/rules/import/no-named-default) | Disallow `import { default as name }` in favor of `import name` |  |  |  |
| [`import/no-named-export`](/lint/rules/import/no-named-export) | Disallow named exports, so that a module only has a default export |  |  |  |
| [`import/no-namespace`](/lint/rules/import/no-namespace) | Disallow `import * as name` in favor of named imports |  | yes |  |
| [`import/no-nodejs-modules`](/lint/rules/import/no-nodejs-modules) | Disallow importing Node.js builtin modules such as `fs` and `path` |  |  |  |
| [`import/no-relative-packages`](/lint/rules/import/no-relative-packages) | Disallow relative imports that reach into another package |  | yes |  |
| [`import/no-relative-parent-imports`](/lint/rules/import/no-relative-parent-imports) | Disallow relative imports from parent directories |  |  |  |
| [`import/no-restricted-paths`](/lint/rules/import/no-restricted-paths) | Disallow files in one folder from importing files in another |  |  |  |
| [`import/no-self-import`](/lint/rules/import/no-self-import) | Disallow a module from importing itself |  |  |  |
| [`import/no-unassigned-import`](/lint/rules/import/no-unassigned-import) | Disallow imports that bind no name |  |  |  |
| [`import/no-unresolved`](/lint/rules/import/no-unresolved) | Require every import to point to a file or package that exists |  |  |  |
| [`import/no-unused-modules`](/lint/rules/import/no-unused-modules) | Disallow exports that no other file imports, and files that export nothing |  |  |  |
| [`import/no-useless-path-segments`](/lint/rules/import/no-useless-path-segments) | Disallow path segments in imports that can be removed |  | yes |  |
| [`import/no-webpack-loader-syntax`](/lint/rules/import/no-webpack-loader-syntax) | Disallow webpack loader syntax such as `style-loader!./app.css` in imports |  |  |  |
| [`import/order`](/lint/rules/import/order) | Enforce a consistent order of imports, by group and optionally by name |  | yes |  |
| [`import/prefer-default-export`](/lint/rules/import/prefer-default-export) | Require a default export in a file that exports a single name |  |  |  |
| [`import/unambiguous`](/lint/rules/import/unambiguous) | Require a module to have an `import` or `export` so it cannot be read as a script |  |  |  |

## unicorn

138 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`unicorn/catch-error-name`](/lint/rules/unicorn/catch-error-name) | Enforce one name for the error in `catch` clauses and promise handlers |  | yes |  |
| [`unicorn/consistent-assert`](/lint/rules/unicorn/consistent-assert) | Require `assert.ok(value)` instead of `assert(value)` with `node:assert` |  | yes |  |
| [`unicorn/consistent-date-clone`](/lint/rules/unicorn/consistent-date-clone) | Require `new Date(date)` instead of `new Date(date.getTime())` to copy a date |  | yes |  |
| [`unicorn/consistent-empty-array-spread`](/lint/rules/unicorn/consistent-empty-array-spread) | Require both branches of a spread ternary in an array to have the same type |  | suggestion |  |
| [`unicorn/consistent-existence-index-check`](/lint/rules/unicorn/consistent-existence-index-check) | Require `=== -1` and `!== -1` to test the result of `indexOf()` and `findIndex()` |  | yes |  |
| [`unicorn/consistent-function-scoping`](/lint/rules/unicorn/consistent-function-scoping) | Require functions that use nothing from the enclosing function to be moved out of it |  |  |  |
| [`unicorn/consistent-template-literal-escape`](/lint/rules/unicorn/consistent-template-literal-escape) | Enforce one way to escape `${` in template literals |  | yes |  |
| [`unicorn/custom-error-definition`](/lint/rules/unicorn/custom-error-definition) | Enforce that subclasses of `Error` set `name` and pass the message to `super()` |  |  |  |
| [`unicorn/empty-brace-spaces`](/lint/rules/unicorn/empty-brace-spaces) | Disallow spaces and line breaks inside empty braces |  | yes |  |
| [`unicorn/error-message`](/lint/rules/unicorn/error-message) | Require a message when creating a built-in error |  |  |  |
| [`unicorn/escape-case`](/lint/rules/unicorn/escape-case) | Require uppercase hexadecimal digits in escape sequences |  | yes |  |
| [`unicorn/explicit-length-check`](/lint/rules/unicorn/explicit-length-check) | Require `length` and `size` to be compared with a number |  | yes |  |
| [`unicorn/explicit-timer-delay`](/lint/rules/unicorn/explicit-timer-delay) | Require or disallow an explicit delay for `setTimeout()` and `setInterval()` |  | yes |  |
| [`unicorn/filename-case`](/lint/rules/unicorn/filename-case) | Enforce one case style for file names |  |  |  |
| [`unicorn/import-style`](/lint/rules/unicorn/import-style) | Enforce how each module is imported: named, default, namespace, or for side effects |  |  |  |
| [`unicorn/max-nested-calls`](/lint/rules/unicorn/max-nested-calls) | Enforce a maximum depth of calls nested in the arguments of other calls |  |  |  |
| [`unicorn/new-for-builtins`](/lint/rules/unicorn/new-for-builtins) | Require `new` for built-in classes and disallow it for `String`, `Number`, `Boolean`, `Symbol`, `BigInt` |  |  |  |
| [`unicorn/no-abusive-eslint-disable`](/lint/rules/unicorn/no-abusive-eslint-disable) | Require `eslint-disable` comments to name the rules they turn off |  |  |  |
| [`unicorn/no-accessor-recursion`](/lint/rules/unicorn/no-accessor-recursion) | Disallow a getter or setter that uses its own property on `this` |  |  |  |
| [`unicorn/no-anonymous-default-export`](/lint/rules/unicorn/no-anonymous-default-export) | Require a name for a function or class that is the default export |  |  |  |
| [`unicorn/no-array-callback-reference`](/lint/rules/unicorn/no-array-callback-reference) | Disallow passing a function by name to array methods such as `map` and `filter` |  |  |  |
| [`unicorn/no-array-fill-with-reference-type`](/lint/rules/unicorn/no-array-fill-with-reference-type) | Disallow filling an array with one object, array, or class instance |  |  |  |
| [`unicorn/no-array-for-each`](/lint/rules/unicorn/no-array-for-each) | Require a `for...of` loop instead of `.forEach()` |  |  |  |
| [`unicorn/no-array-method-this-argument`](/lint/rules/unicorn/no-array-method-this-argument) | Disallow the `thisArg` argument of array methods such as `map` and `filter` |  |  |  |
| [`unicorn/no-array-reduce`](/lint/rules/unicorn/no-array-reduce) | Disallow `reduce()` and `reduceRight()` in favor of a loop |  |  |  |
| [`unicorn/no-array-reverse`](/lint/rules/unicorn/no-array-reverse) | Require `toReversed()` instead of `reverse()`, which changes the array |  | suggestion |  |
| [`unicorn/no-array-sort`](/lint/rules/unicorn/no-array-sort) | Require `toSorted()` instead of `sort()`, which changes the array |  | suggestion |  |
| [`unicorn/no-await-expression-member`](/lint/rules/unicorn/no-await-expression-member) | Disallow reading a property directly from an `await` expression |  | yes |  |
| [`unicorn/no-await-in-promise-methods`](/lint/rules/unicorn/no-await-in-promise-methods) | Disallow `await` on the elements of the array passed to `Promise.all()` and similar methods |  | suggestion |  |
| [`unicorn/no-confusing-array-with`](/lint/rules/unicorn/no-confusing-array-with) | Disallow a negative index and `.length` as the index of `Array#with()` |  |  |  |
| [`unicorn/no-console-spaces`](/lint/rules/unicorn/no-console-spaces) | Disallow spaces at the edges of strings where `console.log()` already adds one |  | yes |  |
| [`unicorn/no-document-cookie`](/lint/rules/unicorn/no-document-cookie) | Disallow assigning to `document.cookie` |  |  |  |
| [`unicorn/no-empty-file`](/lint/rules/unicorn/no-empty-file) | Disallow files that contain no code |  |  |  |
| [`unicorn/no-hex-escape`](/lint/rules/unicorn/no-hex-escape) | Require Unicode escapes such as `\u001B` instead of hexadecimal escapes such as `\x1B` |  | yes |  |
| [`unicorn/no-immediate-mutation`](/lint/rules/unicorn/no-immediate-mutation) | Disallow changing an array, object, `Set`, or `Map` in the statement right after creating it |  |  |  |
| [`unicorn/no-instanceof-array`](/lint/rules/unicorn/no-instanceof-array) | Require `Array.isArray()` instead of `instanceof Array` |  | yes |  |
| [`unicorn/no-instanceof-builtins`](/lint/rules/unicorn/no-instanceof-builtins) | Disallow `instanceof` with built-in constructors such as `Array`, `String`, and `Function` |  | suggestion |  |
| [`unicorn/no-invalid-fetch-options`](/lint/rules/unicorn/no-invalid-fetch-options) | Disallow a `body` in `fetch()` and `new Request()` when the method is `GET` or `HEAD` |  |  |  |
| [`unicorn/no-invalid-remove-event-listener`](/lint/rules/unicorn/no-invalid-remove-event-listener) | Disallow passing a new function to `removeEventListener()` |  |  |  |
| [`unicorn/no-length-as-slice-end`](/lint/rules/unicorn/no-length-as-slice-end) | Disallow passing `.length` as the end argument of `.slice()` |  | yes |  |
| [`unicorn/no-lonely-if`](/lint/rules/unicorn/no-lonely-if) | Disallow an `if` as the only statement in another `if` when neither has an `else` |  |  |  |
| [`unicorn/no-magic-array-flat-depth`](/lint/rules/unicorn/no-magic-array-flat-depth) | Disallow an unexplained number as the depth of `.flat()` |  |  |  |
| [`unicorn/no-negated-condition`](/lint/rules/unicorn/no-negated-condition) | Disallow a negated condition in an `if` with an `else` and in a ternary |  | yes |  |
| [`unicorn/no-negation-in-equality-check`](/lint/rules/unicorn/no-negation-in-equality-check) | Disallow `!` on the left side of `===`, `!==`, `==`, and `!=` |  | suggestion |  |
| [`unicorn/no-nested-ternary`](/lint/rules/unicorn/no-nested-ternary) | Disallow deeply nested ternaries, and require parentheses around a ternary in a ternary |  | yes |  |
| [`unicorn/no-new-array`](/lint/rules/unicorn/no-new-array) | Disallow `new Array()` with a single argument |  | suggestion |  |
| [`unicorn/no-new-buffer`](/lint/rules/unicorn/no-new-buffer) | Require `Buffer.from()` or `Buffer.alloc()` instead of the deprecated `new Buffer()` |  | suggestion |  |
| [`unicorn/no-null`](/lint/rules/unicorn/no-null) | Disallow the `null` literal in favor of `undefined` |  | yes |  |
| [`unicorn/no-object-as-default-parameter`](/lint/rules/unicorn/no-object-as-default-parameter) | Disallow an object literal with properties as the default value of a parameter |  |  |  |
| [`unicorn/no-process-exit`](/lint/rules/unicorn/no-process-exit) | Disallow `process.exit()` |  |  |  |
| [`unicorn/no-single-promise-in-promise-methods`](/lint/rules/unicorn/no-single-promise-in-promise-methods) | Disallow an array with one item in `Promise.all()`, `Promise.any()`, and `Promise.race()` |  | yes |  |
| [`unicorn/no-static-only-class`](/lint/rules/unicorn/no-static-only-class) | Disallow classes that have only `static` members |  | yes |  |
| [`unicorn/no-thenable`](/lint/rules/unicorn/no-thenable) | Disallow a `then` property on objects, classes, and module exports |  |  |  |
| [`unicorn/no-this-assignment`](/lint/rules/unicorn/no-this-assignment) | Disallow assigning `this` to a variable |  |  |  |
| [`unicorn/no-typeof-undefined`](/lint/rules/unicorn/no-typeof-undefined) | Require comparing with `undefined` directly instead of `typeof x === "undefined"` |  | yes |  |
| [`unicorn/no-unnecessary-array-flat-depth`](/lint/rules/unicorn/no-unnecessary-array-flat-depth) | Disallow passing `1` as the depth to `Array#flat()` |  | suggestion |  |
| [`unicorn/no-unnecessary-array-splice-count`](/lint/rules/unicorn/no-unnecessary-array-splice-count) | Disallow `.length` or `Infinity` as the count of `splice()` and `toSpliced()` |  | yes |  |
| [`unicorn/no-unnecessary-await`](/lint/rules/unicorn/no-unnecessary-await) | Disallow `await` on a value that cannot be a promise |  | yes |  |
| [`unicorn/no-unnecessary-slice-end`](/lint/rules/unicorn/no-unnecessary-slice-end) | Disallow `.length` or `Infinity` as the end of `slice()` |  | yes |  |
| [`unicorn/no-unreadable-array-destructuring`](/lint/rules/unicorn/no-unreadable-array-destructuring) | Disallow array destructuring that skips two or more values in a row |  |  |  |
| [`unicorn/no-unreadable-iife`](/lint/rules/unicorn/no-unreadable-iife) | Disallow calling an arrow function in place when its body is in parentheses |  | suggestion |  |
| [`unicorn/no-useless-collection-argument`](/lint/rules/unicorn/no-useless-collection-argument) | Disallow empty arguments and fallbacks in `new Set()`, `Map`, `WeakSet`, and `WeakMap` |  | suggestion |  |
| [`unicorn/no-useless-error-capture-stack-trace`](/lint/rules/unicorn/no-useless-error-capture-stack-trace) | Disallow `Error.captureStackTrace()` in the constructor of an `Error` subclass |  | suggestion |  |
| [`unicorn/no-useless-fallback-in-spread`](/lint/rules/unicorn/no-useless-fallback-in-spread) | Disallow an empty object as the fallback when spreading into an object literal |  | yes |  |
| [`unicorn/no-useless-iterator-to-array`](/lint/rules/unicorn/no-useless-iterator-to-array) | Disallow `.toArray()` on an iterator where the iterator itself works |  | yes |  |
| [`unicorn/no-useless-length-check`](/lint/rules/unicorn/no-useless-length-check) | Disallow checking an array's length next to `.some()` or `.every()` where it changes nothing |  |  |  |
| [`unicorn/no-useless-promise-resolve-reject`](/lint/rules/unicorn/no-useless-promise-resolve-reject) | Disallow returning `Promise.resolve()` or `Promise.reject()` from an async function or promise callback |  | yes |  |
| [`unicorn/no-useless-spread`](/lint/rules/unicorn/no-useless-spread) | Disallow spreads that only build an array or object to take it apart or copy it again |  | yes |  |
| [`unicorn/no-useless-switch-case`](/lint/rules/unicorn/no-useless-switch-case) | Disallow empty `case` clauses that fall through to the last `default` |  | suggestion |  |
| [`unicorn/no-useless-undefined`](/lint/rules/unicorn/no-useless-undefined) | Disallow `undefined` where leaving it out means the same |  | yes |  |
| [`unicorn/no-zero-fractions`](/lint/rules/unicorn/no-zero-fractions) | Disallow numbers with a zero fraction or a dangling dot |  | yes |  |
| [`unicorn/number-literal-case`](/lint/rules/unicorn/number-literal-case) | Require lowercase prefixes and exponents, and uppercase hexadecimal digits, in numbers |  | yes |  |
| [`unicorn/numeric-separators-style`](/lint/rules/unicorn/numeric-separators-style) | Enforce how digits are grouped with `_` in numbers |  | yes |  |
| [`unicorn/prefer-add-event-listener`](/lint/rules/unicorn/prefer-add-event-listener) | Require `addEventListener()` instead of assigning to `on` properties such as `onclick` |  |  |  |
| [`unicorn/prefer-array-find`](/lint/rules/unicorn/prefer-array-find) | Require `.find()` or `.findLast()` instead of taking one element from `.filter()` |  |  |  |
| [`unicorn/prefer-array-flat`](/lint/rules/unicorn/prefer-array-flat) | Require `.flat()` instead of flattening an array with `concat`, `reduce` or `flatMap` |  | yes |  |
| [`unicorn/prefer-array-flat-map`](/lint/rules/unicorn/prefer-array-flat-map) | Require one `.flatMap()` instead of `.map().flat()` or `.filter().flatMap()` |  | yes |  |
| [`unicorn/prefer-array-index-of`](/lint/rules/unicorn/prefer-array-index-of) | Require `.indexOf()` instead of `.findIndex()` when looking for a value |  |  |  |
| [`unicorn/prefer-array-some`](/lint/rules/unicorn/prefer-array-some) | Require `.some()` to test whether an array has a matching element |  | suggestion |  |
| [`unicorn/prefer-at`](/lint/rules/unicorn/prefer-at) | Require `.at()` to read an element counted from the end of an array or string |  | yes |  |
| [`unicorn/prefer-bigint-literals`](/lint/rules/unicorn/prefer-bigint-literals) | Require `BigInt` literals such as `123n` instead of `BigInt(123)` |  | yes |  |
| [`unicorn/prefer-blob-reading-methods`](/lint/rules/unicorn/prefer-blob-reading-methods) | Require `blob.text()` and `blob.arrayBuffer()` instead of a `FileReader` |  |  |  |
| [`unicorn/prefer-class-fields`](/lint/rules/unicorn/prefer-class-fields) | Require class fields instead of `this` assignments of fixed values in the constructor |  | yes |  |
| [`unicorn/prefer-classlist-toggle`](/lint/rules/unicorn/prefer-classlist-toggle) | Require `classList.toggle()` instead of choosing between `add()` and `remove()` |  | yes |  |
| [`unicorn/prefer-code-point`](/lint/rules/unicorn/prefer-code-point) | Require `codePointAt()` and `String.fromCodePoint()` over `charCodeAt()` and `String.fromCharCode()` |  | yes |  |
| [`unicorn/prefer-date-now`](/lint/rules/unicorn/prefer-date-now) | Require `Date.now()` to get the current time in milliseconds |  | yes |  |
| [`unicorn/prefer-default-parameters`](/lint/rules/unicorn/prefer-default-parameters) | Require default parameters instead of reassigning a parameter in the function body |  | suggestion |  |
| [`unicorn/prefer-dom-node-append`](/lint/rules/unicorn/prefer-dom-node-append) | Require `.append()` instead of `.appendChild()` on DOM nodes |  | yes |  |
| [`unicorn/prefer-dom-node-dataset`](/lint/rules/unicorn/prefer-dom-node-dataset) | Require `.dataset` instead of the attribute methods for `data-*` attributes |  | yes |  |
| [`unicorn/prefer-dom-node-remove`](/lint/rules/unicorn/prefer-dom-node-remove) | Require `child.remove()` instead of `parent.removeChild(child)` |  |  |  |
| [`unicorn/prefer-dom-node-text-content`](/lint/rules/unicorn/prefer-dom-node-text-content) | Require `.textContent` instead of `.innerText` |  | yes |  |
| [`unicorn/prefer-event-target`](/lint/rules/unicorn/prefer-event-target) | Require `EventTarget` instead of `EventEmitter` |  |  |  |
| [`unicorn/prefer-export-from`](/lint/rules/unicorn/prefer-export-from) | Require `export ... from` to re-export instead of an import and a separate export |  | suggestion |  |
| [`unicorn/prefer-global-this`](/lint/rules/unicorn/prefer-global-this) | Require `globalThis` instead of `window`, `self` and `global` |  | suggestion |  |
| [`unicorn/prefer-import-meta-properties`](/lint/rules/unicorn/prefer-import-meta-properties) | Require `import.meta.dirname` and `import.meta.filename` instead of building them from the URL |  | yes |  |
| [`unicorn/prefer-includes`](/lint/rules/unicorn/prefer-includes) | Require `.includes()` instead of comparing `.indexOf()` with `-1` or `0` |  | suggestion |  |
| [`unicorn/prefer-keyboard-event-key`](/lint/rules/unicorn/prefer-keyboard-event-key) | Require `event.key` instead of `keyCode`, `charCode` and `which` |  | yes |  |
| [`unicorn/prefer-logical-operator-over-ternary`](/lint/rules/unicorn/prefer-logical-operator-over-ternary) | Require `\|\|` or `??` instead of a ternary that repeats its condition |  | suggestion |  |
| [`unicorn/prefer-math-min-max`](/lint/rules/unicorn/prefer-math-min-max) | Require `Math.min()` and `Math.max()` instead of a ternary that picks the smaller or larger value |  | suggestion |  |
| [`unicorn/prefer-math-trunc`](/lint/rules/unicorn/prefer-math-trunc) | Require `Math.trunc()` instead of bitwise tricks to drop the fraction of a number |  | suggestion |  |
| [`unicorn/prefer-modern-dom-apis`](/lint/rules/unicorn/prefer-modern-dom-apis) | Require `.before()`, `.after()`, `.append()`, `.prepend()` and `.replaceWith()` over older DOM methods |  | suggestion |  |
| [`unicorn/prefer-modern-math-apis`](/lint/rules/unicorn/prefer-modern-math-apis) | Require `Math.log10()`, `Math.log2()`, `Math.hypot()` and `Math.abs()` over hand-written formulas |  |  |  |
| [`unicorn/prefer-module`](/lint/rules/unicorn/prefer-module) | Require ES modules instead of CommonJS |  |  |  |
| [`unicorn/prefer-native-coercion-functions`](/lint/rules/unicorn/prefer-native-coercion-functions) | Require passing `String`, `Number`, `BigInt`, `Boolean` and `Symbol` directly instead of wrapping them |  |  |  |
| [`unicorn/prefer-negative-index`](/lint/rules/unicorn/prefer-negative-index) | Require a negative index instead of `.length - index` |  | yes |  |
| [`unicorn/prefer-node-protocol`](/lint/rules/unicorn/prefer-node-protocol) | Require the `node:` prefix when importing Node.js built-in modules |  | yes |  |
| [`unicorn/prefer-number-coercion`](/lint/rules/unicorn/prefer-number-coercion) | Require `Number()` instead of `parseFloat()` and base-10 `parseInt()` |  | suggestion |  |
| [`unicorn/prefer-number-properties`](/lint/rules/unicorn/prefer-number-properties) | Require `Number.isNaN`, `Number.parseInt` and the like instead of the globals |  | yes |  |
| [`unicorn/prefer-object-from-entries`](/lint/rules/unicorn/prefer-object-from-entries) | Require `Object.fromEntries()` to turn key-value pairs into an object |  |  |  |
| [`unicorn/prefer-optional-catch-binding`](/lint/rules/unicorn/prefer-optional-catch-binding) | Require `catch {}` without a parameter when the error is not used |  | yes |  |
| [`unicorn/prefer-prototype-methods`](/lint/rules/unicorn/prefer-prototype-methods) | Require borrowing a method from the prototype instead of from an empty `[]` or `{}` |  | yes |  |
| [`unicorn/prefer-query-selector`](/lint/rules/unicorn/prefer-query-selector) | Require `querySelector()` and `querySelectorAll()` instead of the `getElement...` methods |  | yes |  |
| [`unicorn/prefer-reflect-apply`](/lint/rules/unicorn/prefer-reflect-apply) | Require `Reflect.apply()` instead of `Function.prototype.apply()` |  | suggestion |  |
| [`unicorn/prefer-regexp-test`](/lint/rules/unicorn/prefer-regexp-test) | Require `RegExp#test()` instead of `String#match()` and `RegExp#exec()` for a yes or no answer |  | yes |  |
| [`unicorn/prefer-response-static-json`](/lint/rules/unicorn/prefer-response-static-json) | Require `Response.json()` instead of `new Response(JSON.stringify())` |  | suggestion |  |
| [`unicorn/prefer-set-has`](/lint/rules/unicorn/prefer-set-has) | Require `Set#has()` instead of `Array#includes()` for an array that is only searched |  | yes |  |
| [`unicorn/prefer-set-size`](/lint/rules/unicorn/prefer-set-size) | Require `Set#size` instead of converting the `Set` to an array to read `length` |  | yes |  |
| [`unicorn/prefer-single-call`](/lint/rules/unicorn/prefer-single-call) | Require one call instead of several in a row to `push()`, `unshift()`, `classList.add()` and the like |  | yes |  |
| [`unicorn/prefer-spread`](/lint/rules/unicorn/prefer-spread) | Require the spread operator instead of `Array.from()`, `concat()`, `slice()` and `toSpliced()` |  | yes |  |
| [`unicorn/prefer-string-raw`](/lint/rules/unicorn/prefer-string-raw) | Require `String.raw` for strings that escape backslashes |  | yes |  |
| [`unicorn/prefer-string-replace-all`](/lint/rules/unicorn/prefer-string-replace-all) | Require `replaceAll()` instead of `replace()` with a global regex |  | yes |  |
| [`unicorn/prefer-string-slice`](/lint/rules/unicorn/prefer-string-slice) | Require `slice()` instead of `substr()` and `substring()` |  | yes |  |
| [`unicorn/prefer-string-starts-ends-with`](/lint/rules/unicorn/prefer-string-starts-ends-with) | Require `startsWith()` and `endsWith()` instead of a regex with `^` or `$` |  | yes |  |
| [`unicorn/prefer-string-trim-start-end`](/lint/rules/unicorn/prefer-string-trim-start-end) | Require `trimStart()` and `trimEnd()` instead of `trimLeft()` and `trimRight()` |  | yes |  |
| [`unicorn/prefer-structured-clone`](/lint/rules/unicorn/prefer-structured-clone) | Require `structuredClone()` for deep clones |  | suggestion |  |
| [`unicorn/prefer-ternary`](/lint/rules/unicorn/prefer-ternary) | Require a ternary instead of an `if`/`else` where both branches do the same kind of thing |  |  |  |
| [`unicorn/prefer-top-level-await`](/lint/rules/unicorn/prefer-top-level-await) | Require top-level `await` instead of promise chains and async wrappers at the top of a module |  |  |  |
| [`unicorn/prefer-type-error`](/lint/rules/unicorn/prefer-type-error) | Require `TypeError` when the `throw` follows a type check |  | yes |  |
| [`unicorn/relative-url-style`](/lint/rules/unicorn/relative-url-style) | Enforce one style for relative URLs in `new URL()`: with or without `./` |  | yes |  |
| [`unicorn/require-array-join-separator`](/lint/rules/unicorn/require-array-join-separator) | Require the separator argument of `Array#join()` |  | yes |  |
| [`unicorn/require-module-attributes`](/lint/rules/unicorn/require-module-attributes) | Disallow an empty attribute list in `import`, `export` and `import()` |  | suggestion |  |
| [`unicorn/require-module-specifiers`](/lint/rules/unicorn/require-module-specifiers) | Disallow empty braces in `import` and `export` statements |  | yes |  |
| [`unicorn/require-number-to-fixed-digits-argument`](/lint/rules/unicorn/require-number-to-fixed-digits-argument) | Require the digits argument of `Number#toFixed()` |  | yes |  |
| [`unicorn/require-post-message-target-origin`](/lint/rules/unicorn/require-post-message-target-origin) | Require the `targetOrigin` argument of `window.postMessage()` |  | suggestion |  |
| [`unicorn/switch-case-braces`](/lint/rules/unicorn/switch-case-braces) | Enforce braces, or no braces, around the body of each `case` |  | yes |  |
| [`unicorn/switch-case-break-position`](/lint/rules/unicorn/switch-case-break-position) | Require `break`, `return`, `continue` and `throw` inside the braces of a `case` |  |  |  |
| [`unicorn/text-encoding-identifier-case`](/lint/rules/unicorn/text-encoding-identifier-case) | Enforce one spelling for the encoding names `utf8` and `ascii` |  | yes |  |
| [`unicorn/throw-new-error`](/lint/rules/unicorn/throw-new-error) | Require `new` when creating an error |  | yes |  |

## promise

16 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`promise/always-return`](/lint/rules/promise/always-return) | Require every `then()` callback to return a value or throw |  |  |  |
| [`promise/avoid-new`](/lint/rules/promise/avoid-new) | Disallow creating promises with `new Promise()` |  |  |  |
| [`promise/catch-or-return`](/lint/rules/promise/catch-or-return) | Require a promise chain to end with `catch()` or to be returned |  |  |  |
| [`promise/no-callback-in-promise`](/lint/rules/promise/no-callback-in-promise) | Disallow calling a callback inside `then()` or `catch()` |  |  |  |
| [`promise/no-multiple-resolved`](/lint/rules/promise/no-multiple-resolved) | Disallow paths that call `resolve` or `reject` more than once in a `new Promise()` executor |  |  |  |
| [`promise/no-nesting`](/lint/rules/promise/no-nesting) | Disallow `then()` and `catch()` nested inside another `then()` or `catch()` |  |  |  |
| [`promise/no-new-statics`](/lint/rules/promise/no-new-statics) | Disallow `new` on static `Promise` methods such as `Promise.all` |  | yes |  |
| [`promise/no-promise-in-callback`](/lint/rules/promise/no-promise-in-callback) | Disallow promises inside error-first callbacks |  |  |  |
| [`promise/no-return-in-finally`](/lint/rules/promise/no-return-in-finally) | Disallow `return` in a `finally()` callback |  |  |  |
| [`promise/no-return-wrap`](/lint/rules/promise/no-return-wrap) | Disallow returning `Promise.resolve()` or `Promise.reject()` from a promise callback |  |  |  |
| [`promise/param-names`](/lint/rules/promise/param-names) | Require the parameters of a `new Promise()` executor to be named `resolve` and `reject` |  |  |  |
| [`promise/prefer-await-to-callbacks`](/lint/rules/promise/prefer-await-to-callbacks) | Require `async`/`await` instead of error-first callbacks |  |  |  |
| [`promise/prefer-await-to-then`](/lint/rules/promise/prefer-await-to-then) | Require `await` instead of `then()`, `catch()` and `finally()` |  |  |  |
| [`promise/prefer-catch`](/lint/rules/promise/prefer-catch) | Require `catch()` instead of a second argument to `then()` |  |  |  |
| [`promise/spec-only`](/lint/rules/promise/spec-only) | Disallow `Promise` static methods that are not part of the language |  |  |  |
| [`promise/valid-params`](/lint/rules/promise/valid-params) | Require the right number of arguments for `Promise` methods |  |  |  |

## Node.js (n)

15 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`n/callback-return`](/lint/rules/node/callback-return) | Require a `return` with every call to a callback |  |  |  |
| [`n/exports-style`](/lint/rules/node/exports-style) | Enforce either `module.exports` or `exports` in CommonJS files |  |  |  |
| [`n/global-require`](/lint/rules/node/global-require) | Require `require()` calls to be at the top level of the file |  |  |  |
| [`n/handle-callback-err`](/lint/rules/node/handle-callback-err) | Require callbacks to use their error parameter |  |  |  |
| [`n/no-exports-assign`](/lint/rules/node/no-exports-assign) | Disallow assigning to `exports` |  | yes |  |
| [`n/no-mixed-requires`](/lint/rules/node/no-mixed-requires) | Disallow `require()` calls mixed with other variables in one declaration |  |  |  |
| [`n/no-new-require`](/lint/rules/node/no-new-require) | Disallow `new require()` |  |  |  |
| [`n/no-path-concat`](/lint/rules/node/no-path-concat) | Disallow joining `__dirname` and `__filename` to a path with `+` or a template |  |  |  |
| [`n/no-process-env`](/lint/rules/node/no-process-env) | Disallow `process.env` |  |  |  |
| [`n/no-process-exit`](/lint/rules/node/no-process-exit) | Disallow `process.exit()` |  |  |  |
| [`n/no-sync`](/lint/rules/node/no-sync) | Disallow calls to functions with names that end in `Sync` |  |  |  |
| [`n/no-top-level-await`](/lint/rules/node/no-top-level-await) | Disallow `await` at the top level of a module |  |  |  |
| [`n/no-unsupported-features/es-builtins`](/lint/rules/node/no-unsupported-features/es-builtins) | Disallow JavaScript built-ins that the Node.js versions you support do not have |  |  |  |
| [`n/no-unsupported-features/es-syntax`](/lint/rules/node/no-unsupported-features/es-syntax) | Disallow JavaScript syntax that the Node.js versions you support do not have |  |  |  |
| [`n/no-unsupported-features/node-builtins`](/lint/rules/node/no-unsupported-features/node-builtins) | Disallow Node.js APIs that the Node.js versions you support do not have |  |  |  |

## oxc

27 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`oxc/approx-constant`](/lint/rules/oxc/approx-constant) | Disallow numbers that approximate a constant of the `Math` object |  | suggestion |  |
| [`oxc/bad-array-method-on-arguments`](/lint/rules/oxc/bad-array-method-on-arguments) | Disallow calling array methods on the `arguments` object |  |  |  |
| [`oxc/bad-bitwise-operator`](/lint/rules/oxc/bad-bitwise-operator) | Disallow `&` and `\|` where `&&` and `\|\|` were probably meant |  | suggestion |  |
| [`oxc/bad-char-at-comparison`](/lint/rules/oxc/bad-char-at-comparison) | Disallow comparing a single character with a longer string |  |  |  |
| [`oxc/bad-comparison-sequence`](/lint/rules/oxc/bad-comparison-sequence) | Disallow chained comparisons such as `a < b < c` |  |  |  |
| [`oxc/bad-match-all-arg`](/lint/rules/oxc/bad-match-all-arg) | Require the `g` flag on a regular expression passed to `matchAll()` |  |  |  |
| [`oxc/bad-min-max-func`](/lint/rules/oxc/bad-min-max-func) | Disallow `Math.min` and `Math.max` combinations that always give the same result |  |  |  |
| [`oxc/bad-object-literal-comparison`](/lint/rules/oxc/bad-object-literal-comparison) | Disallow comparing a value with `{}` or `[]` |  |  |  |
| [`oxc/bad-replace-all-arg`](/lint/rules/oxc/bad-replace-all-arg) | Require the `g` flag on a regular expression passed to `replaceAll()` |  |  |  |
| [`oxc/branches-sharing-code`](/lint/rules/oxc/branches-sharing-code) | Disallow the same statements at the start or end of every branch of an `if` |  | suggestion |  |
| [`oxc/const-comparisons`](/lint/rules/oxc/const-comparisons) | Disallow comparisons that are always true, always false, or repeated |  |  |  |
| [`oxc/double-comparisons`](/lint/rules/oxc/double-comparisons) | Disallow two comparisons of the same values that one operator can express |  | suggestion |  |
| [`oxc/erasing-op`](/lint/rules/oxc/erasing-op) | Disallow operations with `0` that erase the other operand |  | yes |  |
| [`oxc/misrefactored-assign-op`](/lint/rules/oxc/misrefactored-assign-op) | Disallow `a += a + b`, where the target is repeated on the right |  | suggestion |  |
| [`oxc/missing-throw`](/lint/rules/oxc/missing-throw) | Require `throw` before a `new Error()` that is not used |  | suggestion |  |
| [`oxc/no-accumulating-spread`](/lint/rules/oxc/no-accumulating-spread) | Disallow spreading the accumulator in `reduce()` and in loops |  |  |  |
| [`oxc/no-async-await`](/lint/rules/oxc/no-async-await) | Disallow `async` functions |  |  |  |
| [`oxc/no-async-endpoint-handlers`](/lint/rules/oxc/no-async-endpoint-handlers) | Disallow `async` functions as Express route handlers and middleware |  |  |  |
| [`oxc/no-barrel-file`](/lint/rules/oxc/no-barrel-file) | Disallow files that load too many modules through `export *` |  |  |  |
| [`oxc/no-const-enum`](/lint/rules/oxc/no-const-enum) | Disallow TypeScript `const enum` |  | yes |  |
| [`oxc/no-map-spread`](/lint/rules/oxc/no-map-spread) | Disallow object and array spreads in the return value of `map` and `flatMap` callbacks |  | suggestion |  |
| [`oxc/no-optional-chaining`](/lint/rules/oxc/no-optional-chaining) | Disallow optional chaining (`?.`) |  |  |  |
| [`oxc/no-rest-spread-properties`](/lint/rules/oxc/no-rest-spread-properties) | Disallow `...` in object literals and object destructuring |  |  |  |
| [`oxc/no-this-in-exported-function`](/lint/rules/oxc/no-this-in-exported-function) | Disallow `this` in exported functions |  |  |  |
| [`oxc/number-arg-out-of-range`](/lint/rules/oxc/number-arg-out-of-range) | Disallow out-of-range arguments to `toString`, `toFixed`, `toExponential`, and `toPrecision` |  |  |  |
| [`oxc/only-used-in-recursion`](/lint/rules/oxc/only-used-in-recursion) | Disallow parameters that are only passed on to the function's own recursive calls |  | yes |  |
| [`oxc/uninvoked-array-callback`](/lint/rules/oxc/uninvoked-array-callback) | Disallow array methods with a callback directly on `new Array(n)` |  |  |  |

## Bun

29 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`bun/consistent-directive-prefix`](/lint/rules/bun/consistent-directive-prefix) | Require comments that turn rules off to start with the same word, `eslint` or `oxlint` |  | yes |  |
| [`bun/format`](/lint/rules/bun/format) | Require code to be formatted the way `bun fmt` prints it |  | yes |  |
| [`bun/jsx-no-forbidden-nesting`](/lint/rules/bun/jsx-no-forbidden-nesting) | Disallow a JSX element inside another element that cannot contain it |  |  |  |
| [`bun/no-array-just-to-count`](/lint/rules/bun/no-array-just-to-count) | Disallow `.split(separator).length` with a one-character separator |  | yes |  |
| [`bun/no-cast-to-brand`](/lint/rules/bun/no-cast-to-brand) | Disallow casts to a branded type outside the module that declares it |  |  |  |
| [`bun/no-console-window-flash`](/lint/rules/bun/no-console-window-flash) | Require `windowsHide` for a child process that does not share a stream with its parent |  |  |  |
| [`bun/no-cwd-dependent-path`](/lint/rules/bun/no-cwd-dependent-path) | Disallow relative paths that depend on the directory the process was started in |  |  |  |
| [`bun/no-eager-dynamic-import`](/lint/rules/bun/no-eager-dynamic-import) | Disallow `import()` that runs as soon as the module is loaded |  |  |  |
| [`bun/no-eager-native-addon`](/lint/rules/bun/no-eager-native-addon) | Disallow loading a `.node` native addon as soon as the module is loaded |  |  |  |
| [`bun/no-env-at-module-scope`](/lint/rules/bun/no-env-at-module-scope) | Disallow reading environment variables as soon as the module is loaded |  |  |  |
| [`bun/no-literal-temp-dir`](/lint/rules/bun/no-literal-temp-dir) | Disallow hard-coded temporary directories such as `/tmp` in favor of `os.tmpdir()` |  |  |  |
| [`bun/no-negative-repeat-count`](/lint/rules/bun/no-negative-repeat-count) | Disallow a `repeat()` count that comes from a subtraction and can be negative |  | suggestion |  |
| [`bun/no-redundant-catch-type`](/lint/rules/bun/no-redundant-catch-type) | Disallow `: unknown` on the variable of a `catch` clause |  | yes |  |
| [`bun/no-restricted-text`](/lint/rules/bun/no-restricted-text) | Disallow text that matches a pattern in strings, templates, JSX text, comments, and regular expressions |  |  |  |
| [`bun/no-side-effects-on-import`](/lint/rules/bun/no-side-effects-on-import) | Disallow top-level statements that call something or assign to a property |  |  |  |
| [`bun/no-unbounded-requests`](/lint/rules/bun/no-unbounded-requests) | Require an axios request to have a `timeout` or a `signal` |  |  |  |
| [`bun/no-unhandled-emitter-errors`](/lint/rules/bun/no-unhandled-emitter-errors) | Require an `error` listener on event emitters that Node.js functions return |  |  |  |
| [`bun/no-unportable-commands`](/lint/rules/bun/no-unportable-commands) | Disallow starting a process with a command that does not work the same on every system |  |  |  |
| [`bun/no-unseeded-random-in-property-test`](/lint/rules/bun/no-unseeded-random-in-property-test) | Disallow `Math.random()` and `fc.sample()` inside a fast-check property |  |  |  |
| [`bun/no-useless-spread-fallback`](/lint/rules/bun/no-useless-spread-fallback) | Disallow an empty object as the fallback in `...(condition ? value : {})` |  | suggestion |  |
| [`bun/prefer-builtin-sleep`](/lint/rules/bun/prefer-builtin-sleep) | Prefer `Bun.sleep()` to a promise that only waits for `setTimeout` |  | suggestion |  |
| [`bun/prefer-lazy-schema`](/lint/rules/bun/prefer-lazy-schema) | Disallow building a validation schema while the module loads |  |  |  |
| [`bun/prefer-local-module`](/lint/rules/bun/prefer-local-module) | Require importing a package through the module in your project that wraps it |  | yes |  |
| [`bun/prefer-timeout-signal`](/lint/rules/bun/prefer-timeout-signal) | Prefer `AbortSignal.timeout()` to an `AbortController` that only a timer aborts |  |  |  |
| [`bun/prefer-url-for-sibling-files`](/lint/rules/bun/prefer-url-for-sibling-files) | Prefer `new URL("./file", import.meta.url)` to a path joined onto the module's directory |  |  |  |
| [`bun/react-no-latest-value-ref`](/lint/rules/bun/react-no-latest-value-ref) | Disallow a ref that is set to the latest value on every render |  |  |  |
| [`bun/react-no-local-render-helpers`](/lint/rules/bun/react-no-local-render-helpers) | Disallow `renderItem()` functions that are defined inside a component and used in its JSX |  |  |  |
| [`bun/react-no-namespace-hooks`](/lint/rules/bun/react-no-namespace-hooks) | Require React hooks to be imported by name: `useState()`, not `React.useState()` |  | yes |  |
| [`bun/react-prefer-updater-function`](/lint/rules/bun/react-prefer-updater-function) | Prefer `setItems(previous => ..)` to a new array or object made from the state of the last render |  |  |  |

## bun:test

65 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`bun:test/consistent-test-filename`](/lint/rules/bun-test/consistent-test-filename) | Require test files to follow one naming pattern |  |  |  |
| [`bun:test/consistent-test-it`](/lint/rules/bun-test/consistent-test-it) | Enforce one of `test` or `it` for defining tests |  | yes |  |
| [`bun:test/expect-expect`](/lint/rules/bun-test/expect-expect) | Require every test to make at least one assertion |  |  |  |
| [`bun:test/max-expects`](/lint/rules/bun-test/max-expects) | Enforce a maximum number of `expect()` calls in a test |  |  |  |
| [`bun:test/max-nested-describe`](/lint/rules/bun-test/max-nested-describe) | Enforce a maximum depth of nested `describe()` calls |  |  |  |
| [`bun:test/no-alias-methods`](/lint/rules/bun-test/no-alias-methods) | Disallow matcher aliases such as `toBeCalled` in favor of `toHaveBeenCalled` |  | yes |  |
| [`bun:test/no-commented-out-tests`](/lint/rules/bun-test/no-commented-out-tests) | Disallow tests that are inside a comment |  |  |  |
| [`bun:test/no-conditional-expect`](/lint/rules/bun-test/no-conditional-expect) | Disallow `expect` inside `if`, `catch` and other code that only runs sometimes |  |  |  |
| [`bun:test/no-conditional-in-test`](/lint/rules/bun-test/no-conditional-in-test) | Disallow `if`, `switch`, `? :`, `&&`, `\|\|` and `??` inside a test |  |  |  |
| [`bun:test/no-conditional-tests`](/lint/rules/bun-test/no-conditional-tests) | Disallow `test` and `describe` inside an `if` statement |  |  |  |
| [`bun:test/no-disabled-tests`](/lint/rules/bun-test/no-disabled-tests) | Disallow skipped tests such as `test.skip`, `xtest` and `xdescribe` | warn |  |  |
| [`bun:test/no-done-callback`](/lint/rules/bun-test/no-done-callback) | Disallow the `done` callback in tests and hooks in favor of promises |  |  |  |
| [`bun:test/no-duplicate-hooks`](/lint/rules/bun-test/no-duplicate-hooks) | Disallow using the same hook twice in one `describe` block |  |  |  |
| [`bun:test/no-export`](/lint/rules/bun-test/no-export) | Disallow exports from a file that has tests | warn |  |  |
| [`bun:test/no-focused-tests`](/lint/rules/bun-test/no-focused-tests) | Disallow `test.only` and `describe.only` | error | suggestion |  |
| [`bun:test/no-hooks`](/lint/rules/bun-test/no-hooks) | Disallow `beforeAll`, `beforeEach`, `afterEach` and `afterAll` |  |  |  |
| [`bun:test/no-identical-title`](/lint/rules/bun-test/no-identical-title) | Disallow two tests or two `describe` blocks with the same title in one block |  |  |  |
| [`bun:test/no-interpolation-in-snapshots`](/lint/rules/bun-test/no-interpolation-in-snapshots) | Disallow `${}` in inline snapshots |  |  |  |
| [`bun:test/no-large-snapshots`](/lint/rules/bun-test/no-large-snapshots) | Disallow snapshots that are longer than a set number of lines |  |  |  |
| [`bun:test/no-restricted-jest-methods`](/lint/rules/bun-test/no-restricted-jest-methods) | Disallow the `jest` and `vi` methods that you list |  |  |  |
| [`bun:test/no-restricted-matchers`](/lint/rules/bun-test/no-restricted-matchers) | Disallow the matchers and modifiers you list |  |  |  |
| [`bun:test/no-standalone-expect`](/lint/rules/bun-test/no-standalone-expect) | Disallow `expect` outside of a `test` or `it` block |  |  |  |
| [`bun:test/no-test-prefixes`](/lint/rules/bun-test/no-test-prefixes) | Require `.skip` instead of the `x` prefix |  | yes |  |
| [`bun:test/no-test-return-statement`](/lint/rules/bun-test/no-test-return-statement) | Disallow `return expect(..)` in a test |  |  |  |
| [`bun:test/no-unneeded-async-expect-function`](/lint/rules/bun-test/no-unneeded-async-expect-function) | Disallow an async function around a single awaited call in `expect` |  | yes |  |
| [`bun:test/padding-around-after-all-blocks`](/lint/rules/bun-test/padding-around-after-all-blocks) | Require a blank line before each `afterAll` call |  | yes |  |
| [`bun:test/padding-around-test-blocks`](/lint/rules/bun-test/padding-around-test-blocks) | Require a blank line before each `test` and `it` call |  | yes |  |
| [`bun:test/prefer-called-once`](/lint/rules/bun-test/prefer-called-once) | Require `toHaveBeenCalledOnce()` instead of `toHaveBeenCalledTimes(1)` |  | yes |  |
| [`bun:test/prefer-called-times`](/lint/rules/bun-test/prefer-called-times) | Require `toHaveBeenCalledTimes(1)` instead of `toHaveBeenCalledOnce()` |  | yes |  |
| [`bun:test/prefer-called-with`](/lint/rules/bun-test/prefer-called-with) | Require `toHaveBeenCalledWith()` instead of `toHaveBeenCalled()` |  | suggestion |  |
| [`bun:test/prefer-comparison-matcher`](/lint/rules/bun-test/prefer-comparison-matcher) | Require matchers such as `toBeGreaterThan()` instead of comparing inside `expect()` |  | suggestion |  |
| [`bun:test/prefer-describe-function-title`](/lint/rules/bun-test/prefer-describe-function-title) | Require `describe(fn, ...)` instead of a string with the name of an imported function |  | suggestion |  |
| [`bun:test/prefer-each`](/lint/rules/bun-test/prefer-each) | Require `test.each` and `describe.each` instead of a loop around tests |  |  |  |
| [`bun:test/prefer-ending-with-an-expect`](/lint/rules/bun-test/prefer-ending-with-an-expect) | Require the last statement of a test to be an assertion |  |  |  |
| [`bun:test/prefer-equality-matcher`](/lint/rules/bun-test/prefer-equality-matcher) | Require `toBe` or `toEqual` instead of comparing with `===` inside `expect` |  | suggestion |  |
| [`bun:test/prefer-expect-assertions`](/lint/rules/bun-test/prefer-expect-assertions) | Require `expect.assertions()` or `expect.hasAssertions()` at the start of every test |  | suggestion |  |
| [`bun:test/prefer-expect-resolves`](/lint/rules/bun-test/prefer-expect-resolves) | Require `await expect(promise).resolves` instead of `expect(await promise)` |  | suggestion |  |
| [`bun:test/prefer-expect-type-of`](/lint/rules/bun-test/prefer-expect-type-of) | Require `toBeTypeOf` instead of `expect(typeof value).toBe(...)` |  | yes |  |
| [`bun:test/prefer-hooks-in-order`](/lint/rules/bun-test/prefer-hooks-in-order) | Require hooks to be written in the order they run |  |  |  |
| [`bun:test/prefer-hooks-on-top`](/lint/rules/bun-test/prefer-hooks-on-top) | Require hooks to come before the tests in their block |  |  |  |
| [`bun:test/prefer-lowercase-title`](/lint/rules/bun-test/prefer-lowercase-title) | Require the titles of tests and `describe` blocks to start with a lowercase letter |  | yes |  |
| [`bun:test/prefer-mock-promise-shorthand`](/lint/rules/bun-test/prefer-mock-promise-shorthand) | Require `mockResolvedValue()` and `mockRejectedValue()` for mocks that return a promise |  | yes |  |
| [`bun:test/prefer-mock-return-shorthand`](/lint/rules/bun-test/prefer-mock-return-shorthand) | Require `mockReturnValue()` for a mock that only returns a value |  | yes |  |
| [`bun:test/prefer-snapshot-hint`](/lint/rules/bun-test/prefer-snapshot-hint) | Require a hint on `toMatchSnapshot()` and `toThrowErrorMatchingSnapshot()` |  |  |  |
| [`bun:test/prefer-spy-on`](/lint/rules/bun-test/prefer-spy-on) | Require `spyOn()` instead of assigning `jest.fn()` to a property |  | suggestion |  |
| [`bun:test/prefer-strict-boolean-matchers`](/lint/rules/bun-test/prefer-strict-boolean-matchers) | Require `toBe(true)` and `toBe(false)` instead of `toBeTruthy()` and `toBeFalsy()` |  | suggestion |  |
| [`bun:test/prefer-strict-equal`](/lint/rules/bun-test/prefer-strict-equal) | Require `toStrictEqual()` instead of `toEqual()` |  | suggestion |  |
| [`bun:test/prefer-to-be`](/lint/rules/bun-test/prefer-to-be) | Require `toBe()` for primitive literals, and `toBeNull()`, `toBeUndefined()`, `toBeNaN()` |  | yes |  |
| [`bun:test/prefer-to-be-falsy`](/lint/rules/bun-test/prefer-to-be-falsy) | Require `toBeFalsy()` instead of `toBe(false)` |  | suggestion |  |
| [`bun:test/prefer-to-be-truthy`](/lint/rules/bun-test/prefer-to-be-truthy) | Require `toBeTruthy()` instead of `toBe(true)` |  | suggestion |  |
| [`bun:test/prefer-to-contain`](/lint/rules/bun-test/prefer-to-contain) | Require `toContain()` instead of comparing the result of `includes()` with a boolean |  | suggestion |  |
| [`bun:test/prefer-to-have-been-called`](/lint/rules/bun-test/prefer-to-have-been-called) | Require `not.toHaveBeenCalled()` instead of `toHaveBeenCalledTimes(0)` |  | yes |  |
| [`bun:test/prefer-to-have-been-called-times`](/lint/rules/bun-test/prefer-to-have-been-called-times) | Require `toHaveBeenCalledTimes()` instead of checking the length of `mock.calls` |  | yes |  |
| [`bun:test/prefer-to-have-length`](/lint/rules/bun-test/prefer-to-have-length) | Require `toHaveLength()` instead of comparing the `length` property |  | yes |  |
| [`bun:test/prefer-todo`](/lint/rules/bun-test/prefer-todo) | Require `test.todo` for tests that have no body yet |  | yes |  |
| [`bun:test/require-hook`](/lint/rules/bun-test/require-hook) | Require setup and teardown code to be inside a hook |  |  |  |
| [`bun:test/require-mock-type-parameters`](/lint/rules/bun-test/require-mock-type-parameters) | Require a type parameter on `jest.fn()` and `vi.fn()` |  |  |  |
| [`bun:test/require-test-timeout`](/lint/rules/bun-test/require-test-timeout) | Require every test to set a timeout |  |  |  |
| [`bun:test/require-to-throw-message`](/lint/rules/bun-test/require-to-throw-message) | Require `toThrow()` to say which error it expects |  |  |  |
| [`bun:test/require-top-level-describe`](/lint/rules/bun-test/require-top-level-describe) | Require tests and hooks to be inside a `describe` block |  |  |  |
| [`bun:test/valid-describe-callback`](/lint/rules/bun-test/valid-describe-callback) | Require `describe` to get a callback that is a function with no parameters | error |  |  |
| [`bun:test/valid-expect`](/lint/rules/bun-test/valid-expect) | Require `expect` to get a value, end in a called matcher, and be awaited when it is async | error | suggestion |  |
| [`bun:test/valid-expect-in-promise`](/lint/rules/bun-test/valid-expect-in-promise) | Require a promise chain that contains `expect` to be awaited or returned from the test | error |  |  |
| [`bun:test/valid-title`](/lint/rules/bun-test/valid-title) | Require test and `describe` titles to be non-empty, with no stray spaces or repeated prefix |  | yes |  |
| [`bun:test/warn-todo`](/lint/rules/bun-test/warn-todo) | Disallow `.todo` on `test`, `it` and `describe` |  |  |  |

## Jest

60 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`jest/consistent-test-it`](/lint/rules/jest/consistent-test-it) | Enforce one of `test` or `it` for defining tests |  | yes |  |
| [`jest/expect-expect`](/lint/rules/jest/expect-expect) | Require every test to make at least one assertion |  |  |  |
| [`jest/max-expects`](/lint/rules/jest/max-expects) | Enforce a maximum number of `expect()` calls in a test |  |  |  |
| [`jest/max-nested-describe`](/lint/rules/jest/max-nested-describe) | Enforce a maximum depth of nested `describe()` calls |  |  |  |
| [`jest/no-alias-methods`](/lint/rules/jest/no-alias-methods) | Disallow matcher aliases such as `toBeCalled` in favor of `toHaveBeenCalled` |  | yes |  |
| [`jest/no-commented-out-tests`](/lint/rules/jest/no-commented-out-tests) | Disallow tests that are inside a comment |  |  |  |
| [`jest/no-conditional-expect`](/lint/rules/jest/no-conditional-expect) | Disallow `expect` inside `if`, `catch` and other code that only runs sometimes |  |  |  |
| [`jest/no-conditional-in-test`](/lint/rules/jest/no-conditional-in-test) | Disallow `if`, `switch`, `? :`, `&&`, `\|\|` and `??` inside a test |  |  |  |
| [`jest/no-confusing-set-timeout`](/lint/rules/jest/no-confusing-set-timeout) | Disallow `jest.setTimeout` inside a block, after a test, or more than once in a file |  |  |  |
| [`jest/no-deprecated-functions`](/lint/rules/jest/no-deprecated-functions) | Disallow Jest functions that have been renamed or replaced |  | yes |  |
| [`jest/no-disabled-tests`](/lint/rules/jest/no-disabled-tests) | Disallow skipped tests such as `test.skip`, `xtest` and `xdescribe` |  |  |  |
| [`jest/no-done-callback`](/lint/rules/jest/no-done-callback) | Disallow the `done` callback in tests and hooks in favor of promises |  |  |  |
| [`jest/no-duplicate-hooks`](/lint/rules/jest/no-duplicate-hooks) | Disallow using the same hook twice in one `describe` block |  |  |  |
| [`jest/no-export`](/lint/rules/jest/no-export) | Disallow exports from a file that has tests |  |  |  |
| [`jest/no-focused-tests`](/lint/rules/jest/no-focused-tests) | Disallow `test.only`, `describe.only`, `fit` and `fdescribe` |  | suggestion |  |
| [`jest/no-hooks`](/lint/rules/jest/no-hooks) | Disallow `beforeAll`, `beforeEach`, `afterEach` and `afterAll` |  |  |  |
| [`jest/no-identical-title`](/lint/rules/jest/no-identical-title) | Disallow two tests or two `describe` blocks with the same title in one block |  |  |  |
| [`jest/no-interpolation-in-snapshots`](/lint/rules/jest/no-interpolation-in-snapshots) | Disallow `${}` in inline snapshots |  |  |  |
| [`jest/no-jasmine-globals`](/lint/rules/jest/no-jasmine-globals) | Disallow Jasmine globals such as `jasmine.any`, `spyOn`, `fail` and `pending` |  | yes |  |
| [`jest/no-large-snapshots`](/lint/rules/jest/no-large-snapshots) | Disallow snapshots that are longer than a set number of lines |  |  |  |
| [`jest/no-mocks-import`](/lint/rules/jest/no-mocks-import) | Disallow importing from a `__mocks__` directory |  |  |  |
| [`jest/no-restricted-jest-methods`](/lint/rules/jest/no-restricted-jest-methods) | Disallow the `jest` methods that you list |  |  |  |
| [`jest/no-restricted-matchers`](/lint/rules/jest/no-restricted-matchers) | Disallow the matchers and modifiers you list |  |  |  |
| [`jest/no-standalone-expect`](/lint/rules/jest/no-standalone-expect) | Disallow `expect` outside of a `test` or `it` block |  |  |  |
| [`jest/no-test-prefixes`](/lint/rules/jest/no-test-prefixes) | Require `.only` and `.skip` instead of the `f` and `x` prefixes |  | yes |  |
| [`jest/no-test-return-statement`](/lint/rules/jest/no-test-return-statement) | Disallow `return expect(..)` in a test |  |  |  |
| [`jest/no-unneeded-async-expect-function`](/lint/rules/jest/no-unneeded-async-expect-function) | Disallow an async function around a single awaited call in `expect` |  | yes |  |
| [`jest/no-untyped-mock-factory`](/lint/rules/jest/no-untyped-mock-factory) | Require a type parameter on `jest.mock()` and `jest.doMock()` with a factory |  | yes |  |
| [`jest/padding-around-after-all-blocks`](/lint/rules/jest/padding-around-after-all-blocks) | Require a blank line before each `afterAll` call |  | yes |  |
| [`jest/padding-around-test-blocks`](/lint/rules/jest/padding-around-test-blocks) | Require a blank line before each `test` and `it` call |  | yes |  |
| [`jest/prefer-called-with`](/lint/rules/jest/prefer-called-with) | Require `toHaveBeenCalledWith()` instead of `toHaveBeenCalled()` |  | yes |  |
| [`jest/prefer-comparison-matcher`](/lint/rules/jest/prefer-comparison-matcher) | Require matchers such as `toBeGreaterThan()` instead of comparing inside `expect()` |  | yes |  |
| [`jest/prefer-each`](/lint/rules/jest/prefer-each) | Require `test.each` and `describe.each` instead of a loop around tests |  |  |  |
| [`jest/prefer-ending-with-an-expect`](/lint/rules/jest/prefer-ending-with-an-expect) | Require the last statement of a test to be an assertion |  |  |  |
| [`jest/prefer-equality-matcher`](/lint/rules/jest/prefer-equality-matcher) | Require `toBe` or `toEqual` instead of comparing with `===` inside `expect` |  | suggestion |  |
| [`jest/prefer-expect-assertions`](/lint/rules/jest/prefer-expect-assertions) | Require `expect.assertions()` or `expect.hasAssertions()` at the start of every test |  | suggestion |  |
| [`jest/prefer-expect-resolves`](/lint/rules/jest/prefer-expect-resolves) | Require `await expect(promise).resolves` instead of `expect(await promise)` |  | yes |  |
| [`jest/prefer-hooks-in-order`](/lint/rules/jest/prefer-hooks-in-order) | Require hooks to be written in the order they run |  |  |  |
| [`jest/prefer-hooks-on-top`](/lint/rules/jest/prefer-hooks-on-top) | Require hooks to come before the tests in their block |  |  |  |
| [`jest/prefer-importing-jest-globals`](/lint/rules/jest/prefer-importing-jest-globals) | Require `describe`, `test`, `expect` and `jest` to be imported from `@jest/globals` |  | yes |  |
| [`jest/prefer-jest-mocked`](/lint/rules/jest/prefer-jest-mocked) | Require `jest.mocked(fn)` instead of `fn as jest.Mock` |  | yes |  |
| [`jest/prefer-lowercase-title`](/lint/rules/jest/prefer-lowercase-title) | Require the titles of tests and `describe` blocks to start with a lowercase letter |  | yes |  |
| [`jest/prefer-mock-promise-shorthand`](/lint/rules/jest/prefer-mock-promise-shorthand) | Require `mockResolvedValue()` and `mockRejectedValue()` for mocks that return a promise |  | yes |  |
| [`jest/prefer-mock-return-shorthand`](/lint/rules/jest/prefer-mock-return-shorthand) | Require `mockReturnValue()` for a mock that only returns a value |  | yes |  |
| [`jest/prefer-snapshot-hint`](/lint/rules/jest/prefer-snapshot-hint) | Require a hint on `toMatchSnapshot()` and `toThrowErrorMatchingSnapshot()` |  |  |  |
| [`jest/prefer-spy-on`](/lint/rules/jest/prefer-spy-on) | Require `jest.spyOn()` instead of assigning `jest.fn()` to a property |  | suggestion |  |
| [`jest/prefer-strict-equal`](/lint/rules/jest/prefer-strict-equal) | Require `toStrictEqual()` instead of `toEqual()` |  | suggestion |  |
| [`jest/prefer-to-be`](/lint/rules/jest/prefer-to-be) | Require `toBe()` for primitive literals, and `toBeNull()`, `toBeUndefined()`, `toBeNaN()` |  | yes |  |
| [`jest/prefer-to-contain`](/lint/rules/jest/prefer-to-contain) | Require `toContain()` instead of comparing the result of `includes()` with a boolean |  | yes |  |
| [`jest/prefer-to-have-been-called`](/lint/rules/jest/prefer-to-have-been-called) | Require `not.toHaveBeenCalled()` instead of `toHaveBeenCalledTimes(0)` |  | yes |  |
| [`jest/prefer-to-have-been-called-times`](/lint/rules/jest/prefer-to-have-been-called-times) | Require `toHaveBeenCalledTimes()` instead of checking the length of `mock.calls` |  | yes |  |
| [`jest/prefer-to-have-length`](/lint/rules/jest/prefer-to-have-length) | Require `toHaveLength()` instead of comparing the `length` property |  | yes |  |
| [`jest/prefer-todo`](/lint/rules/jest/prefer-todo) | Require `test.todo` for tests that have no body yet |  | yes |  |
| [`jest/require-hook`](/lint/rules/jest/require-hook) | Require setup and teardown code to be inside a hook |  |  |  |
| [`jest/require-to-throw-message`](/lint/rules/jest/require-to-throw-message) | Require `toThrow()` to say which error it expects |  |  |  |
| [`jest/require-top-level-describe`](/lint/rules/jest/require-top-level-describe) | Require tests and hooks to be inside a `describe` block |  |  |  |
| [`jest/valid-describe-callback`](/lint/rules/jest/valid-describe-callback) | Require `describe` to get a title and a plain synchronous callback |  |  |  |
| [`jest/valid-expect`](/lint/rules/jest/valid-expect) | Require `expect` to get a value, end in a called matcher, and be awaited when it is async |  | suggestion |  |
| [`jest/valid-expect-in-promise`](/lint/rules/jest/valid-expect-in-promise) | Require a promise chain that contains `expect` to be awaited or returned from the test |  |  |  |
| [`jest/valid-title`](/lint/rules/jest/valid-title) | Require test and `describe` titles to be non-empty strings with no stray spaces or repeated prefix |  | yes |  |

## Vitest

73 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`vitest/consistent-each-for`](/lint/rules/vitest/consistent-each-for) | Enforce either `.each` or `.for` for parameterized tests |  |  |  |
| [`vitest/consistent-test-filename`](/lint/rules/vitest/consistent-test-filename) | Require test files to follow one naming pattern |  |  |  |
| [`vitest/consistent-test-it`](/lint/rules/vitest/consistent-test-it) | Enforce one of `test` or `it` for defining tests |  | yes |  |
| [`vitest/consistent-vitest-vi`](/lint/rules/vitest/consistent-vitest-vi) | Enforce one of `vi` or `vitest` for Vitest's helper object |  | yes |  |
| [`vitest/expect-expect`](/lint/rules/vitest/expect-expect) | Require every test to make at least one assertion |  |  |  |
| [`vitest/hoisted-apis-on-top`](/lint/rules/vitest/hoisted-apis-on-top) | Require `vi.mock`, `vi.unmock` and `vi.hoisted` at the top level of the file |  | suggestion |  |
| [`vitest/max-expects`](/lint/rules/vitest/max-expects) | Enforce a maximum number of `expect()` calls in a test |  |  |  |
| [`vitest/max-nested-describe`](/lint/rules/vitest/max-nested-describe) | Enforce a maximum depth of nested `describe()` calls |  |  |  |
| [`vitest/no-alias-methods`](/lint/rules/vitest/no-alias-methods) | Disallow matcher aliases such as `toBeCalled` in favor of `toHaveBeenCalled` |  | yes |  |
| [`vitest/no-commented-out-tests`](/lint/rules/vitest/no-commented-out-tests) | Disallow tests that are inside a comment |  |  |  |
| [`vitest/no-conditional-expect`](/lint/rules/vitest/no-conditional-expect) | Disallow `expect` inside `if`, `catch` and other code that only runs sometimes |  |  |  |
| [`vitest/no-conditional-in-test`](/lint/rules/vitest/no-conditional-in-test) | Disallow `if`, `switch`, `? :`, `&&`, `\|\|` and `??` inside a test |  |  |  |
| [`vitest/no-conditional-tests`](/lint/rules/vitest/no-conditional-tests) | Disallow `test` and `describe` inside an `if` statement |  |  |  |
| [`vitest/no-disabled-tests`](/lint/rules/vitest/no-disabled-tests) | Disallow skipped tests such as `test.skip` and `describe.skip` |  |  |  |
| [`vitest/no-duplicate-hooks`](/lint/rules/vitest/no-duplicate-hooks) | Disallow using the same hook twice in one `describe` block |  |  |  |
| [`vitest/no-focused-tests`](/lint/rules/vitest/no-focused-tests) | Disallow `test.only` and `describe.only` |  | suggestion |  |
| [`vitest/no-hooks`](/lint/rules/vitest/no-hooks) | Disallow `beforeAll`, `beforeEach`, `afterEach` and `afterAll` |  |  |  |
| [`vitest/no-identical-title`](/lint/rules/vitest/no-identical-title) | Disallow two tests or two `describe` blocks with the same title in one block |  |  |  |
| [`vitest/no-import-node-test`](/lint/rules/vitest/no-import-node-test) | Disallow importing from `node:test` in a project that uses Vitest |  | suggestion |  |
| [`vitest/no-importing-vitest-globals`](/lint/rules/vitest/no-importing-vitest-globals) | Disallow importing `test`, `expect`, `vi` and the other Vitest globals |  | yes |  |
| [`vitest/no-interpolation-in-snapshots`](/lint/rules/vitest/no-interpolation-in-snapshots) | Disallow `${}` in inline snapshots |  |  |  |
| [`vitest/no-large-snapshots`](/lint/rules/vitest/no-large-snapshots) | Disallow snapshots that are longer than a set number of lines |  |  |  |
| [`vitest/no-mocks-import`](/lint/rules/vitest/no-mocks-import) | Disallow importing from a `__mocks__` directory |  |  |  |
| [`vitest/no-restricted-matchers`](/lint/rules/vitest/no-restricted-matchers) | Disallow the matchers and modifiers you list |  |  |  |
| [`vitest/no-restricted-vi-methods`](/lint/rules/vitest/no-restricted-vi-methods) | Disallow the `vi` methods you list |  |  |  |
| [`vitest/no-standalone-expect`](/lint/rules/vitest/no-standalone-expect) | Disallow `expect` outside of a `test` or `it` block |  |  |  |
| [`vitest/no-test-prefixes`](/lint/rules/vitest/no-test-prefixes) | Require `.only` and `.skip` instead of the `f` and `x` prefixes |  | yes |  |
| [`vitest/no-test-return-statement`](/lint/rules/vitest/no-test-return-statement) | Disallow `return expect(..)` in a test |  |  |  |
| [`vitest/no-unneeded-async-expect-function`](/lint/rules/vitest/no-unneeded-async-expect-function) | Disallow an async function around a single awaited call in `expect` |  | yes |  |
| [`vitest/padding-around-after-all-blocks`](/lint/rules/vitest/padding-around-after-all-blocks) | Require a blank line before each `afterAll` call |  | yes |  |
| [`vitest/padding-around-test-blocks`](/lint/rules/vitest/padding-around-test-blocks) | Require a blank line before each `test` and `it` call |  | yes |  |
| [`vitest/prefer-called-exactly-once-with`](/lint/rules/vitest/prefer-called-exactly-once-with) | Require `toHaveBeenCalledExactlyOnceWith()` over separate call count and argument checks |  | yes |  |
| [`vitest/prefer-called-once`](/lint/rules/vitest/prefer-called-once) | Require `toHaveBeenCalledOnce()` instead of `toHaveBeenCalledTimes(1)` |  | yes |  |
| [`vitest/prefer-called-times`](/lint/rules/vitest/prefer-called-times) | Require `toHaveBeenCalledTimes(1)` instead of `toHaveBeenCalledOnce()` |  | yes |  |
| [`vitest/prefer-called-with`](/lint/rules/vitest/prefer-called-with) | Require `toHaveBeenCalledWith()` instead of `toHaveBeenCalled()` |  | yes |  |
| [`vitest/prefer-comparison-matcher`](/lint/rules/vitest/prefer-comparison-matcher) | Require matchers such as `toBeGreaterThan()` instead of comparing inside `expect()` |  | yes |  |
| [`vitest/prefer-describe-function-title`](/lint/rules/vitest/prefer-describe-function-title) | Require `describe(fn, ...)` instead of a string with the name of an imported function |  | yes |  |
| [`vitest/prefer-each`](/lint/rules/vitest/prefer-each) | Require `test.each` and `describe.each` instead of a loop around tests |  |  |  |
| [`vitest/prefer-equality-matcher`](/lint/rules/vitest/prefer-equality-matcher) | Require `toBe` or `toEqual` instead of comparing with `===` inside `expect` |  | suggestion |  |
| [`vitest/prefer-expect-assertions`](/lint/rules/vitest/prefer-expect-assertions) | Require `expect.assertions()` or `expect.hasAssertions()` at the start of every test |  | suggestion |  |
| [`vitest/prefer-expect-resolves`](/lint/rules/vitest/prefer-expect-resolves) | Require `await expect(promise).resolves` instead of `expect(await promise)` |  | yes |  |
| [`vitest/prefer-expect-type-of`](/lint/rules/vitest/prefer-expect-type-of) | Require `toBeTypeOf` instead of `expect(typeof value).toBe(...)` |  | yes |  |
| [`vitest/prefer-hooks-in-order`](/lint/rules/vitest/prefer-hooks-in-order) | Require hooks to be written in the order they run |  |  |  |
| [`vitest/prefer-hooks-on-top`](/lint/rules/vitest/prefer-hooks-on-top) | Require hooks to come before the tests in their block |  |  |  |
| [`vitest/prefer-import-in-mock`](/lint/rules/vitest/prefer-import-in-mock) | Require `import()` instead of a string path in `vi.mock()` and `vi.doMock()` |  | yes |  |
| [`vitest/prefer-importing-vitest-globals`](/lint/rules/vitest/prefer-importing-vitest-globals) | Require `describe`, `test`, `expect` and `vi` to be imported from `vitest` |  | yes |  |
| [`vitest/prefer-lowercase-title`](/lint/rules/vitest/prefer-lowercase-title) | Require the titles of tests and `describe` blocks to start with a lowercase letter |  | yes |  |
| [`vitest/prefer-mock-promise-shorthand`](/lint/rules/vitest/prefer-mock-promise-shorthand) | Require `mockResolvedValue()` and `mockRejectedValue()` for mocks that return a promise |  | yes |  |
| [`vitest/prefer-mock-return-shorthand`](/lint/rules/vitest/prefer-mock-return-shorthand) | Require `mockReturnValue()` for a mock that only returns a value |  | yes |  |
| [`vitest/prefer-snapshot-hint`](/lint/rules/vitest/prefer-snapshot-hint) | Require a hint on `toMatchSnapshot()` and `toThrowErrorMatchingSnapshot()` |  |  |  |
| [`vitest/prefer-spy-on`](/lint/rules/vitest/prefer-spy-on) | Require `vi.spyOn()` instead of assigning `vi.fn()` to a property |  | suggestion |  |
| [`vitest/prefer-strict-boolean-matchers`](/lint/rules/vitest/prefer-strict-boolean-matchers) | Require `toBe(true)` and `toBe(false)` instead of `toBeTruthy()` and `toBeFalsy()` |  | yes |  |
| [`vitest/prefer-strict-equal`](/lint/rules/vitest/prefer-strict-equal) | Require `toStrictEqual()` instead of `toEqual()` |  | suggestion |  |
| [`vitest/prefer-to-be`](/lint/rules/vitest/prefer-to-be) | Require `toBe()` for primitive literals, and `toBeNull()`, `toBeUndefined()`, `toBeNaN()` |  | yes |  |
| [`vitest/prefer-to-be-falsy`](/lint/rules/vitest/prefer-to-be-falsy) | Require `toBeFalsy()` instead of `toBe(false)` |  | suggestion |  |
| [`vitest/prefer-to-be-object`](/lint/rules/vitest/prefer-to-be-object) | Require `toBeObject()` when `expectTypeOf()` checks for an object |  | yes |  |
| [`vitest/prefer-to-be-truthy`](/lint/rules/vitest/prefer-to-be-truthy) | Require `toBeTruthy()` instead of `toBe(true)` |  | suggestion |  |
| [`vitest/prefer-to-contain`](/lint/rules/vitest/prefer-to-contain) | Require `toContain()` instead of comparing the result of `includes()` with a boolean |  | yes |  |
| [`vitest/prefer-to-have-been-called-times`](/lint/rules/vitest/prefer-to-have-been-called-times) | Require `toHaveBeenCalledTimes()` instead of checking the length of `mock.calls` |  | yes |  |
| [`vitest/prefer-to-have-length`](/lint/rules/vitest/prefer-to-have-length) | Require `toHaveLength()` instead of comparing the `length` property |  | yes |  |
| [`vitest/prefer-todo`](/lint/rules/vitest/prefer-todo) | Require `test.todo` for tests that have no body yet |  | yes |  |
| [`vitest/require-awaited-expect-poll`](/lint/rules/vitest/require-awaited-expect-poll) | Require `expect.poll` and `expect.element` assertions to be awaited or returned |  |  |  |
| [`vitest/require-hook`](/lint/rules/vitest/require-hook) | Require setup and teardown code to be inside a hook |  |  |  |
| [`vitest/require-local-test-context-for-concurrent-snapshots`](/lint/rules/vitest/require-local-test-context-for-concurrent-snapshots) | Require the `expect` of the test context for snapshots in concurrent tests |  |  |  |
| [`vitest/require-mock-type-parameters`](/lint/rules/vitest/require-mock-type-parameters) | Require a type parameter on `vi.fn()` |  |  |  |
| [`vitest/require-test-timeout`](/lint/rules/vitest/require-test-timeout) | Require every test to set a timeout |  |  |  |
| [`vitest/require-to-throw-message`](/lint/rules/vitest/require-to-throw-message) | Require `toThrow()` to say which error it expects |  |  |  |
| [`vitest/require-top-level-describe`](/lint/rules/vitest/require-top-level-describe) | Require tests and hooks to be inside a `describe` block |  |  |  |
| [`vitest/valid-describe-callback`](/lint/rules/vitest/valid-describe-callback) | Require `describe` to get a title and a callback with no parameters and no `return` |  |  |  |
| [`vitest/valid-expect`](/lint/rules/vitest/valid-expect) | Require `expect` to get a value, end in a called matcher, and be awaited when it is async |  | suggestion |  |
| [`vitest/valid-expect-in-promise`](/lint/rules/vitest/valid-expect-in-promise) | Require a promise chain that contains `expect` to be awaited or returned from the test |  |  |  |
| [`vitest/valid-title`](/lint/rules/vitest/valid-title) | Require test and `describe` titles to be non-empty strings with no stray spaces or repeated prefix |  | yes |  |
| [`vitest/warn-todo`](/lint/rules/vitest/warn-todo) | Disallow `.todo` on `test`, `it` and `describe` |  |  |  |

## Prettier

1 rules.

| Rule | Description | Default | Fixable | Needs types |
| --- | --- | --- | --- | --- |
| [`prettier/prettier`](/lint/rules/prettier/prettier) | Require code to be formatted the way Prettier prints it |  | yes |  |
