# Unicorn recommended

A large, opinionated set that pushes code towards modern JavaScript APIs and consistent idioms.

- Linter: ESLint
- Package: `eslint-plugin-unicorn` (https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config)
- Author: Sindre Sorhus (community)
- Rules: 340
- Weekly downloads: 9.5M, +30.3% last quarter
- Technologies: javascript (340)

## Install

```sh
npm install -D eslint eslint-plugin-unicorn
pnpm add -D eslint eslint-plugin-unicorn
yarn add -D eslint eslint-plugin-unicorn
bun add -d eslint eslint-plugin-unicorn
```

## Config: `eslint.config.js`

```js
// eslint.config.js
import unicorn from "eslint-plugin-unicorn";

export default [
  unicorn.configs.recommended,
];
```

## Rules it enables

| Rule | Severity | Description | Reach |
| --- | --- | --- | --- |
| [unicorn/no-await-in-promise-methods](https://lintradar.dev/rules/unicorn/no-await-in-promise-methods.md) | error | Disallow using `await` in `Promise` method parameters. | 91.3M |
| [unicorn/no-invalid-fetch-options](https://lintradar.dev/rules/unicorn/no-invalid-fetch-options.md) | error | Disallow invalid options in `fetch()` and `new Request()`. | 91.3M |
| [unicorn/no-invalid-remove-event-listener](https://lintradar.dev/rules/unicorn/no-invalid-remove-event-listener.md) | error | Prevent calling `EventTarget#removeEventListener()` with the result of an expression. | 91.3M |
| [unicorn/no-single-promise-in-promise-methods](https://lintradar.dev/rules/unicorn/no-single-promise-in-promise-methods.md) | error | Disallow passing single-element arrays to `Promise` methods. | 91.3M |
| [unicorn/no-thenable](https://lintradar.dev/rules/unicorn/no-thenable.md) | error | Disallow `then` property. | 91.3M |
| [unicorn/no-useless-fallback-in-spread](https://lintradar.dev/rules/unicorn/no-useless-fallback-in-spread.md) | error | Disallow useless fallback when spreading in object literals. | 91.3M |
| [unicorn/no-useless-length-check](https://lintradar.dev/rules/unicorn/no-useless-length-check.md) | error | Disallow useless array length check. | 91.3M |
| [unicorn/no-useless-spread](https://lintradar.dev/rules/unicorn/no-useless-spread.md) | error | Disallow unnecessary spread. | 91.3M |
| [unicorn/prefer-set-size](https://lintradar.dev/rules/unicorn/prefer-set-size.md) | error | Prefer using `Set#size` instead of `Array#length`. | 91.3M |
| [unicorn/no-new-array](https://lintradar.dev/rules/unicorn/no-new-array.md) | error | Disallow `new Array()`. | 63.6M |
| [unicorn/prefer-string-starts-ends-with](https://lintradar.dev/rules/unicorn/prefer-string-starts-ends-with.md) | error | Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks. | 63.6M |
| [unicorn/no-empty-file](https://lintradar.dev/rules/unicorn/no-empty-file.md) | error | Disallow empty files. | 62.8M |
| [unicorn/no-unnecessary-await](https://lintradar.dev/rules/unicorn/no-unnecessary-await.md) | error | Disallow awaiting non-promise values. | 62.8M |
| [unicorn/new-for-builtins](https://lintradar.dev/rules/unicorn/new-for-builtins.md) | error | Enforce correct use of `new` for builtin constructors. | 41.3M |
| [unicorn/prefer-dom-node-text-content](https://lintradar.dev/rules/unicorn/prefer-dom-node-text-content.md) | error | Prefer `.textContent` over `.innerText`. | 41.3M |
| [unicorn/prefer-node-protocol](https://lintradar.dev/rules/unicorn/prefer-node-protocol.md) | error | Prefer using the `node:` protocol when importing Node.js builtin modules. | 41.3M |
| [unicorn/consistent-date-clone](https://lintradar.dev/rules/unicorn/consistent-date-clone.md) | error | Prefer passing `Date` directly to the constructor when cloning. | 40.5M |
| [unicorn/no-console-spaces](https://lintradar.dev/rules/unicorn/no-console-spaces.md) | error | Do not use leading/trailing space between `console.log` parameters. | 40.5M |
| [unicorn/no-document-cookie](https://lintradar.dev/rules/unicorn/no-document-cookie.md) | error | Do not use `document.cookie` directly. | 40.5M |
| [unicorn/no-magic-array-flat-depth](https://lintradar.dev/rules/unicorn/no-magic-array-flat-depth.md) | error | Disallow a magic number as the `depth` argument in `Array#flat(…).` | 40.5M |
| [unicorn/no-useless-switch-case](https://lintradar.dev/rules/unicorn/no-useless-switch-case.md) | error | Disallow useless case in switch statements. | 40.5M |
| [unicorn/prefer-array-flat-map](https://lintradar.dev/rules/unicorn/prefer-array-flat-map.md) | error | Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`. | 40.5M |
| [unicorn/prefer-array-index-of](https://lintradar.dev/rules/unicorn/prefer-array-index-of.md) | error | Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. | 40.5M |
| [unicorn/prefer-bigint-literals](https://lintradar.dev/rules/unicorn/prefer-bigint-literals.md) | error | Prefer `BigInt` literals over the constructor. | 40.5M |
| [unicorn/prefer-date-now](https://lintradar.dev/rules/unicorn/prefer-date-now.md) | error | Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch. | 40.5M |
| [unicorn/prefer-math-min-max](https://lintradar.dev/rules/unicorn/prefer-math-min-max.md) | error | Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons. | 40.5M |
| [unicorn/prefer-math-trunc](https://lintradar.dev/rules/unicorn/prefer-math-trunc.md) | error | Prefer `Math.trunc()` for truncating numbers. | 40.5M |
| [unicorn/prefer-modern-math-apis](https://lintradar.dev/rules/unicorn/prefer-modern-math-apis.md) | error | Prefer modern `Math` APIs over legacy patterns. | 40.5M |
| [unicorn/prefer-object-from-entries](https://lintradar.dev/rules/unicorn/prefer-object-from-entries.md) | error | Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object. | 40.5M |
| [unicorn/no-accidental-bitwise-operator](https://lintradar.dev/rules/unicorn/no-accidental-bitwise-operator.md) | error | Disallow bitwise operators where a logical operator was likely intended. | 40.5M |
| [unicorn/no-array-sort-for-min-max](https://lintradar.dev/rules/unicorn/no-array-sort-for-min-max.md) | error | Disallow sorting arrays to get the minimum or maximum value. | 40.5M |
| [unicorn/no-boolean-sort-comparator](https://lintradar.dev/rules/unicorn/no-boolean-sort-comparator.md) | error | Disallow boolean-returning sort comparators. | 40.5M |
| [unicorn/no-double-comparison](https://lintradar.dev/rules/unicorn/no-double-comparison.md) | error | Disallow two comparisons of the same operands that can be combined into one. | 40.5M |
| [unicorn/no-for-each](https://lintradar.dev/rules/unicorn/no-for-each.md) | error | Prefer `for…of` over the `forEach` method. | 40.5M |
| [unicorn/no-negated-array-predicate](https://lintradar.dev/rules/unicorn/no-negated-array-predicate.md) | error | Disallow negated array predicate calls. | 40.5M |
| [unicorn/no-subtraction-comparison](https://lintradar.dev/rules/unicorn/no-subtraction-comparison.md) | error | Prefer comparing values directly over subtracting and comparing to `0`. | 40.5M |
| [unicorn/no-unnecessary-nested-ternary](https://lintradar.dev/rules/unicorn/no-unnecessary-nested-ternary.md) | error | Disallow unnecessary nested ternary expressions. | 40.5M |
| [unicorn/no-unnecessary-string-trim](https://lintradar.dev/rules/unicorn/no-unnecessary-string-trim.md) | error | Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`. | 40.5M |
| [unicorn/no-useless-set-construction](https://lintradar.dev/rules/unicorn/no-useless-set-construction.md) | error | Disallow unnecessary `Set` construction around `Set` methods. | 40.5M |
| [unicorn/no-xor-as-exponentiation](https://lintradar.dev/rules/unicorn/no-xor-as-exponentiation.md) | error | Disallow the bitwise XOR operator where exponentiation was likely intended. | 40.5M |
| [unicorn/prefer-block-statement-over-iife](https://lintradar.dev/rules/unicorn/prefer-block-statement-over-iife.md) | error | Prefer block statements over IIFEs used only for scoping. | 40.5M |
| [unicorn/prefer-boolean-return](https://lintradar.dev/rules/unicorn/prefer-boolean-return.md) | error | Prefer directly returning boolean expressions over `if` statements. | 40.5M |
| [unicorn/prefer-flat-math-min-max](https://lintradar.dev/rules/unicorn/prefer-flat-math-min-max.md) | error | Prefer flat `Math.min()` and `Math.max()` calls over nested calls. | 40.5M |
| [unicorn/prefer-math-abs](https://lintradar.dev/rules/unicorn/prefer-math-abs.md) | error | Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks. | 40.5M |
| [unicorn/prefer-math-constants](https://lintradar.dev/rules/unicorn/prefer-math-constants.md) | error | Prefer `Math` constants over their approximate numeric values. | 40.5M |
| [unicorn/prefer-unary-minus](https://lintradar.dev/rules/unicorn/prefer-unary-minus.md) | error | Prefer the unary minus operator over multiplying or dividing by `-1`. | 40.5M |
| [unicorn/prefer-while-loop-condition](https://lintradar.dev/rules/unicorn/prefer-while-loop-condition.md) | error | Prefer putting the condition in the while statement. | 40.5M |
| [unicorn/no-confusing-array-splice](https://lintradar.dev/rules/unicorn/no-confusing-array-splice.md) | error | Disallow confusing uses of `Array#{splice,toSpliced}()`. | 40.5M |
| [unicorn/no-duplicate-loops](https://lintradar.dev/rules/unicorn/no-duplicate-loops.md) | error | Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers. | 40.5M |
| [unicorn/no-late-current-target-access](https://lintradar.dev/rules/unicorn/no-late-current-target-access.md) | error | Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished. | 40.5M |
| [unicorn/no-late-event-control](https://lintradar.dev/rules/unicorn/no-late-event-control.md) | error | Disallow event-control method calls after the synchronous event dispatch has finished. | 40.5M |
| [unicorn/no-return-array-push](https://lintradar.dev/rules/unicorn/no-return-array-push.md) | error | Disallow using the return value of `Array#push()` and `Array#unshift()`. | 40.5M |
| [unicorn/no-unnecessary-splice](https://lintradar.dev/rules/unicorn/no-unnecessary-splice.md) | error | Disallow `Array#splice()` when simpler alternatives exist. | 40.5M |
| [unicorn/error-message](https://lintradar.dev/rules/unicorn/error-message.md) | error | Enforce passing a `message` value when creating a built-in error. | 12.8M |
| [unicorn/prefer-number-properties](https://lintradar.dev/rules/unicorn/prefer-number-properties.md) | error | Prefer `Number` static methods over global functions and optionally static properties over global constants. | 12.8M |
| [unicorn/throw-new-error](https://lintradar.dev/rules/unicorn/throw-new-error.md) | error | Require `new` when creating an error. | 12.8M |
| [unicorn/prefer-includes](https://lintradar.dev/rules/unicorn/prefer-includes.md) | error | Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence. | 12.8M |
| [unicorn/escape-case](https://lintradar.dev/rules/unicorn/escape-case.md) | error | Require escape sequences to use uppercase or lowercase values. | 12.8M |
| [unicorn/no-instanceof-builtins](https://lintradar.dev/rules/unicorn/no-instanceof-builtins.md) | error | Disallow `instanceof` with built-in objects | 12.8M |
| [unicorn/no-new-buffer](https://lintradar.dev/rules/unicorn/no-new-buffer.md) | error | Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`. | 12.8M |
| [unicorn/prefer-type-error](https://lintradar.dev/rules/unicorn/prefer-type-error.md) | error | Enforce throwing `TypeError` in type checking conditions. | 12.8M |
| [unicorn/consistent-empty-array-spread](https://lintradar.dev/rules/unicorn/consistent-empty-array-spread.md) | error | Prefer consistent types when spreading a ternary in an array literal. | 12.8M |
| [unicorn/no-lonely-if](https://lintradar.dev/rules/unicorn/no-lonely-if.md) | error | Disallow `if` statements as the only statement in `if` blocks without `else`. | 12M |
| [unicorn/numeric-separators-style](https://lintradar.dev/rules/unicorn/numeric-separators-style.md) | error | Enforce the style of numeric separators by correctly grouping digits. | 12M |
| [unicorn/prefer-array-some](https://lintradar.dev/rules/unicorn/prefer-array-some.md) | error | Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`. | 12M |
| [unicorn/prefer-at](https://lintradar.dev/rules/unicorn/prefer-at.md) | error | Prefer `.at()` method for index access and `String#charAt()`. | 12M |
| [unicorn/prefer-module](https://lintradar.dev/rules/unicorn/prefer-module.md) | error | Prefer JavaScript modules (ESM) over CommonJS. | 12M |
| [unicorn/prefer-regexp-test](https://lintradar.dev/rules/unicorn/prefer-regexp-test.md) | error | Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`. | 12M |
| [unicorn/prefer-string-slice](https://lintradar.dev/rules/unicorn/prefer-string-slice.md) | error | Prefer `String#slice()` over `String#substr()` and `String#substring()`. | 12M |
| [unicorn/prefer-string-trim-start-end](https://lintradar.dev/rules/unicorn/prefer-string-trim-start-end.md) | error | Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`. | 12M |
| [unicorn/require-number-to-fixed-digits-argument](https://lintradar.dev/rules/unicorn/require-number-to-fixed-digits-argument.md) | error | Enforce using the digits argument with `Number#toFixed()`. | 12M |
| [unicorn/consistent-existence-index-check](https://lintradar.dev/rules/unicorn/consistent-existence-index-check.md) | error | Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`. | 12M |
| [unicorn/filename-case](https://lintradar.dev/rules/unicorn/filename-case.md) | error | Enforce a case style for filenames and directory names. | 12M |
| [unicorn/no-negated-condition](https://lintradar.dev/rules/unicorn/no-negated-condition.md) | error | Disallow negated conditions. | 12M |
| [unicorn/no-negation-in-equality-check](https://lintradar.dev/rules/unicorn/no-negation-in-equality-check.md) | error | Disallow negated expression in equality check. | 12M |
| [unicorn/no-static-only-class](https://lintradar.dev/rules/unicorn/no-static-only-class.md) | error | Disallow classes that only have static members. | 12M |
| [unicorn/no-unreadable-iife](https://lintradar.dev/rules/unicorn/no-unreadable-iife.md) | error | Disallow unreadable IIFEs. | 12M |
| [unicorn/no-zero-fractions](https://lintradar.dev/rules/unicorn/no-zero-fractions.md) | error | Require consistent decimal numbers without redundant zeros. | 12M |
| [unicorn/prefer-negative-index](https://lintradar.dev/rules/unicorn/prefer-negative-index.md) | error | Prefer negative index over `.length - index` when possible. | 12M |
| [unicorn/prefer-query-selector](https://lintradar.dev/rules/unicorn/prefer-query-selector.md) | error | Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods. | 12M |
| [unicorn/explicit-timer-delay](https://lintradar.dev/rules/unicorn/explicit-timer-delay.md) | error | Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`. | 12M |
| [unicorn/no-abusive-eslint-disable](https://lintradar.dev/rules/unicorn/no-abusive-eslint-disable.md) | error | Enforce specifying rules to disable in `eslint-disable` comments. | 12M |
| [unicorn/no-accessor-recursion](https://lintradar.dev/rules/unicorn/no-accessor-recursion.md) | error | Disallow recursive access to `this` within getters and setters. | 12M |
| [unicorn/no-anonymous-default-export](https://lintradar.dev/rules/unicorn/no-anonymous-default-export.md) | error | Disallow anonymous functions and classes as the default export. | 12M |
| [unicorn/no-array-fill-with-reference-type](https://lintradar.dev/rules/unicorn/no-array-fill-with-reference-type.md) | error | Disallow using reference values as `Array#fill()` values. | 12M |
| [unicorn/no-array-method-this-argument](https://lintradar.dev/rules/unicorn/no-array-method-this-argument.md) | error | Disallow using the `this` argument in array methods. | 12M |
| [unicorn/no-array-reverse](https://lintradar.dev/rules/unicorn/no-array-reverse.md) | error | Prefer `Array#toReversed()` over `Array#reverse()`. | 12M |
| [unicorn/no-array-sort](https://lintradar.dev/rules/unicorn/no-array-sort.md) | error | Prefer `Array#toSorted()` over `Array#sort()`. | 12M |
| [unicorn/no-object-as-default-parameter](https://lintradar.dev/rules/unicorn/no-object-as-default-parameter.md) | error | Disallow the use of objects as default parameters. | 12M |
| [unicorn/no-this-assignment](https://lintradar.dev/rules/unicorn/no-this-assignment.md) | error | Disallow assigning `this` to a variable. | 12M |
| [unicorn/no-typeof-undefined](https://lintradar.dev/rules/unicorn/no-typeof-undefined.md) | error | Disallow comparing `undefined` using `typeof`. | 12M |
| [unicorn/no-unnecessary-array-flat-depth](https://lintradar.dev/rules/unicorn/no-unnecessary-array-flat-depth.md) | error | Disallow using `1` as the `depth` argument of `Array#flat()`. | 12M |
| [unicorn/no-unnecessary-array-splice-count](https://lintradar.dev/rules/unicorn/no-unnecessary-array-splice-count.md) | error | Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`. | 12M |
| [unicorn/no-unnecessary-slice-end](https://lintradar.dev/rules/unicorn/no-unnecessary-slice-end.md) | error | Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`. | 12M |
| [unicorn/no-unreadable-array-destructuring](https://lintradar.dev/rules/unicorn/no-unreadable-array-destructuring.md) | error | Disallow unreadable array destructuring. | 12M |
| [unicorn/no-useless-collection-argument](https://lintradar.dev/rules/unicorn/no-useless-collection-argument.md) | error | Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`. | 12M |
| [unicorn/no-useless-error-capture-stack-trace](https://lintradar.dev/rules/unicorn/no-useless-error-capture-stack-trace.md) | error | Disallow unnecessary `Error.captureStackTrace(…)`. | 12M |
| [unicorn/no-useless-promise-resolve-reject](https://lintradar.dev/rules/unicorn/no-useless-promise-resolve-reject.md) | error | Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks | 12M |
| [unicorn/prefer-add-event-listener](https://lintradar.dev/rules/unicorn/prefer-add-event-listener.md) | error | Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions. | 12M |
| [unicorn/prefer-array-find](https://lintradar.dev/rules/unicorn/prefer-array-find.md) | error | Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`. | 12M |
| [unicorn/prefer-array-flat](https://lintradar.dev/rules/unicorn/prefer-array-flat.md) | error | Prefer `Array#flat()` over legacy techniques to flatten arrays. | 12M |
| [unicorn/prefer-blob-reading-methods](https://lintradar.dev/rules/unicorn/prefer-blob-reading-methods.md) | error | Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`. | 12M |
| [unicorn/prefer-class-fields](https://lintradar.dev/rules/unicorn/prefer-class-fields.md) | error | Prefer class field declarations over `this` assignments in constructors. | 12M |
| [unicorn/prefer-classlist-toggle](https://lintradar.dev/rules/unicorn/prefer-classlist-toggle.md) | error | Prefer using `Element#classList.toggle()` to toggle class names. | 12M |
| [unicorn/prefer-code-point](https://lintradar.dev/rules/unicorn/prefer-code-point.md) | error | Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`. | 12M |
| [unicorn/prefer-default-parameters](https://lintradar.dev/rules/unicorn/prefer-default-parameters.md) | error | Prefer default parameters and destructuring defaults over reassignment and fallback expressions. | 12M |
| [unicorn/prefer-dom-node-append](https://lintradar.dev/rules/unicorn/prefer-dom-node-append.md) | error | Prefer `Element#append()` over `Node#appendChild()`. | 12M |
| [unicorn/prefer-dom-node-remove](https://lintradar.dev/rules/unicorn/prefer-dom-node-remove.md) | error | Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`. | 12M |
| [unicorn/prefer-event-target](https://lintradar.dev/rules/unicorn/prefer-event-target.md) | error | Prefer `EventTarget` over `EventEmitter`. | 12M |
| [unicorn/prefer-keyboard-event-key](https://lintradar.dev/rules/unicorn/prefer-keyboard-event-key.md) | error | Prefer `KeyboardEvent#key` over deprecated keyboard event properties. | 12M |
| [unicorn/prefer-logical-operator-over-ternary](https://lintradar.dev/rules/unicorn/prefer-logical-operator-over-ternary.md) | error | Prefer using a logical operator over a ternary. | 12M |
| [unicorn/prefer-modern-dom-apis](https://lintradar.dev/rules/unicorn/prefer-modern-dom-apis.md) | error | Prefer modern DOM APIs. | 12M |
| [unicorn/prefer-native-coercion-functions](https://lintradar.dev/rules/unicorn/prefer-native-coercion-functions.md) | error | Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly. | 12M |
| [unicorn/prefer-number-coercion](https://lintradar.dev/rules/unicorn/prefer-number-coercion.md) | error | Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`. | 12M |
| [unicorn/prefer-optional-catch-binding](https://lintradar.dev/rules/unicorn/prefer-optional-catch-binding.md) | error | Prefer omitting the `catch` binding parameter. | 12M |
| [unicorn/prefer-prototype-methods](https://lintradar.dev/rules/unicorn/prefer-prototype-methods.md) | error | Prefer borrowing methods from the prototype instead of the instance. | 12M |
| [unicorn/prefer-reflect-apply](https://lintradar.dev/rules/unicorn/prefer-reflect-apply.md) | error | Prefer `Reflect.apply()` over `Function#apply()`. | 12M |
| [unicorn/prefer-response-static-json](https://lintradar.dev/rules/unicorn/prefer-response-static-json.md) | error | Prefer `Response.json()` over `new Response(JSON.stringify())`. | 12M |
| [unicorn/prefer-set-has](https://lintradar.dev/rules/unicorn/prefer-set-has.md) | error | Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. | 12M |
| [unicorn/prefer-single-call](https://lintradar.dev/rules/unicorn/prefer-single-call.md) | error | Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call. | 12M |
| [unicorn/prefer-string-replace-all](https://lintradar.dev/rules/unicorn/prefer-string-replace-all.md) | error | Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`. | 12M |
| [unicorn/prefer-structured-clone](https://lintradar.dev/rules/unicorn/prefer-structured-clone.md) | error | Prefer using `structuredClone` to create a deep clone. | 12M |
| [unicorn/prefer-ternary](https://lintradar.dev/rules/unicorn/prefer-ternary.md) | error | Prefer ternary expressions over simple `if` statements. | 12M |
| [unicorn/relative-url-style](https://lintradar.dev/rules/unicorn/relative-url-style.md) | error | Enforce consistent relative URL style. | 12M |
| [unicorn/require-array-join-separator](https://lintradar.dev/rules/unicorn/require-array-join-separator.md) | error | Enforce using the separator argument with `Array#join()`. | 12M |
| [unicorn/require-module-attributes](https://lintradar.dev/rules/unicorn/require-module-attributes.md) | error | Require non-empty module attributes for imports and exports | 12M |
| [unicorn/require-module-specifiers](https://lintradar.dev/rules/unicorn/require-module-specifiers.md) | error | Require non-empty specifier list in import and export statements. | 12M |
| [unicorn/text-encoding-identifier-case](https://lintradar.dev/rules/unicorn/text-encoding-identifier-case.md) | error | Enforce consistent case for text encoding identifiers. | 12M |
| [unicorn/catch-error-name](https://lintradar.dev/rules/unicorn/catch-error-name.md) | error | Enforce a specific parameter name in catch clauses. | 12M |
| [unicorn/no-array-reduce](https://lintradar.dev/rules/unicorn/no-array-reduce.md) | error | Disallow `Array#reduce()` and `Array#reduceRight()`. | 12M |
| [unicorn/no-immediate-mutation](https://lintradar.dev/rules/unicorn/no-immediate-mutation.md) | error | Disallow immediate mutation after assignment and initialization immediately after declaration. | 12M |
| [unicorn/consistent-assert](https://lintradar.dev/rules/unicorn/consistent-assert.md) | error | Enforce consistent assertion style with `node:assert`. | 12M |
| [unicorn/consistent-template-literal-escape](https://lintradar.dev/rules/unicorn/consistent-template-literal-escape.md) | error | Enforce consistent style for escaping `${` in template literals. | 12M |
| [unicorn/empty-brace-spaces](https://lintradar.dev/rules/unicorn/empty-brace-spaces.md) | error | Enforce no spaces between braces. | 12M |
| [unicorn/no-await-expression-member](https://lintradar.dev/rules/unicorn/no-await-expression-member.md) | error | Disallow member access from await expression. | 12M |
| [unicorn/no-confusing-array-with](https://lintradar.dev/rules/unicorn/no-confusing-array-with.md) | error | Disallow confusing uses of `Array#with()`. | 12M |
| [unicorn/prefer-export-from](https://lintradar.dev/rules/unicorn/prefer-export-from.md) | error | Prefer `export…from` when re-exporting. | 12M |
| [unicorn/prefer-spread](https://lintradar.dev/rules/unicorn/prefer-spread.md) | error | Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies. | 12M |
| [unicorn/switch-case-braces](https://lintradar.dev/rules/unicorn/switch-case-braces.md) | error | Enforce consistent brace style for `case` clauses. | 12M |
| [unicorn/switch-case-break-position](https://lintradar.dev/rules/unicorn/switch-case-break-position.md) | error | Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses. | 12M |
| [unicorn/no-useless-undefined](https://lintradar.dev/rules/unicorn/no-useless-undefined.md) | error | Disallow useless `undefined`. | 11.6M |
| [unicorn/import-style](https://lintradar.dev/rules/unicorn/import-style.md) | error | Enforce specific import styles per module. | 11.6M |
| [unicorn/consistent-function-scoping](https://lintradar.dev/rules/unicorn/consistent-function-scoping.md) | error | Move function definitions to the highest possible scope. | 11.6M |
| [unicorn/number-literal-case](https://lintradar.dev/rules/unicorn/number-literal-case.md) | error | Enforce proper case for numeric literals. | 10.7M |
| [unicorn/no-process-exit](https://lintradar.dev/rules/unicorn/no-process-exit.md) | error | Disallow `process.exit()`. | 9.9M |
| [unicorn/prefer-global-this](https://lintradar.dev/rules/unicorn/prefer-global-this.md) | error | Prefer `globalThis` over `window`, `self`, and `global`. | 9.9M |
| [unicorn/no-useless-iterator-to-array](https://lintradar.dev/rules/unicorn/no-useless-iterator-to-array.md) | error | Disallow unnecessary `.toArray()` on iterators. | 9.9M |
| [unicorn/prefer-string-raw](https://lintradar.dev/rules/unicorn/prefer-string-raw.md) | error | Prefer using the `String.raw` tag to avoid escaping `\`. | 9.9M |
| [unicorn/prefer-top-level-await](https://lintradar.dev/rules/unicorn/prefer-top-level-await.md) | error | Prefer top-level await over top-level promises and async function calls. | 9.9M |
| [unicorn/better-dom-traversing](https://lintradar.dev/rules/unicorn/better-dom-traversing.md) | error | Prefer better DOM traversal APIs. | 9.9M |
| [unicorn/no-canvas-to-image](https://lintradar.dev/rules/unicorn/no-canvas-to-image.md) | error | Prefer drawing canvases directly instead of converting them to images. | 9.9M |
| [unicorn/no-collection-bracket-access](https://lintradar.dev/rules/unicorn/no-collection-bracket-access.md) | error | Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation. | 9.9M |
| [unicorn/no-constant-zero-expression](https://lintradar.dev/rules/unicorn/no-constant-zero-expression.md) | error | Disallow arithmetic and bitwise operations that always evaluate to `0`. | 9.9M |
| [unicorn/no-negated-comparison](https://lintradar.dev/rules/unicorn/no-negated-comparison.md) | error | Disallow negated comparisons. | 9.9M |
| [unicorn/no-unsafe-sqlite-interpolation](https://lintradar.dev/rules/unicorn/no-unsafe-sqlite-interpolation.md) | error | Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs. | 9.9M |
| [unicorn/no-useless-concat](https://lintradar.dev/rules/unicorn/no-useless-concat.md) | error | Disallow useless concatenation of literals. | 9.9M |
| [unicorn/consistent-export-decorator-position](https://lintradar.dev/rules/unicorn/consistent-export-decorator-position.md) | error | Enforce consistent decorator position on exported classes. | 9.9M |
| [unicorn/consistent-optional-chaining](https://lintradar.dev/rules/unicorn/consistent-optional-chaining.md) | error | Enforce consistent optional chaining for same-base member access. | 9.9M |
| [unicorn/dom-node-dataset](https://lintradar.dev/rules/unicorn/dom-node-dataset.md) | error | Enforce consistent style for DOM element dataset access. | 9.9M |
| [unicorn/expiring-todo-comments](https://lintradar.dev/rules/unicorn/expiring-todo-comments.md) | error | Add expiration conditions to TODO comments. | 9.9M |
| [unicorn/no-array-from-fill](https://lintradar.dev/rules/unicorn/no-array-from-fill.md) | error | Disallow `.fill()` after `Array.from({length: …})`. | 9.9M |
| [unicorn/no-async-iterator-callback](https://lintradar.dev/rules/unicorn/no-async-iterator-callback.md) | error | Disallow asynchronous callbacks in synchronous iterator helpers. | 9.9M |
| [unicorn/no-blob-to-file](https://lintradar.dev/rules/unicorn/no-blob-to-file.md) | error | Disallow unnecessary `Blob` to `File` conversion. | 9.9M |
| [unicorn/no-chained-comparison](https://lintradar.dev/rules/unicorn/no-chained-comparison.md) | error | Disallow chained comparisons such as `a < b < c`. | 9.9M |
| [unicorn/no-conflicting-constraints](https://lintradar.dev/rules/unicorn/no-conflicting-constraints.md) | error | Disallow conflicting CSS query and HTML form constraints. | 9.9M |
| [unicorn/no-declarations-before-early-exit](https://lintradar.dev/rules/unicorn/no-declarations-before-early-exit.md) | error | Disallow declarations before conditional early exits when they are only used after the exit. | 9.9M |
| [unicorn/no-duplicate-logical-operands](https://lintradar.dev/rules/unicorn/no-duplicate-logical-operands.md) | error | Disallow adjacent duplicate operands in logical expressions. | 9.9M |
| [unicorn/no-error-property-assignment](https://lintradar.dev/rules/unicorn/no-error-property-assignment.md) | error | Disallow assigning to built-in error properties. | 9.9M |
| [unicorn/no-exports-in-scripts](https://lintradar.dev/rules/unicorn/no-exports-in-scripts.md) | error | Disallow exports in scripts. | 9.9M |
| [unicorn/no-global-object-property-assignment](https://lintradar.dev/rules/unicorn/no-global-object-property-assignment.md) | error | Disallow assigning properties on the global object. | 9.9M |
| [unicorn/no-impossible-length-comparison](https://lintradar.dev/rules/unicorn/no-impossible-length-comparison.md) | error | Disallow impossible comparisons against `.length` or `.size`. | 9.9M |
| [unicorn/no-incomplete-accessor-override](https://lintradar.dev/rules/unicorn/no-incomplete-accessor-override.md) | error | Disallow class accessors that hide an inherited getter or setter. | 9.9M |
| [unicorn/no-ineffective-csp-directives](https://lintradar.dev/rules/unicorn/no-ineffective-csp-directives.md) | error | Disallow ineffective CSP directives in `<meta>` elements. | 9.9M |
| [unicorn/no-invalid-boolean-attribute-value](https://lintradar.dev/rules/unicorn/no-invalid-boolean-attribute-value.md) | error | Disallow invalid values for HTML boolean attributes. | 9.9M |
| [unicorn/no-invalid-character-comparison](https://lintradar.dev/rules/unicorn/no-invalid-character-comparison.md) | error | Disallow comparing a single character from a string to a multi-character string. | 9.9M |
| [unicorn/no-invalid-dom-token](https://lintradar.dev/rules/unicorn/no-invalid-dom-token.md) | error | Disallow invalid DOM tokens. | 9.9M |
| [unicorn/no-invalid-integrity](https://lintradar.dev/rules/unicorn/no-invalid-integrity.md) | error | Disallow invalid subresource integrity metadata. | 9.9M |
| [unicorn/no-invalid-intl-options](https://lintradar.dev/rules/unicorn/no-invalid-intl-options.md) | error | Disallow invalid or ignored Intl options. | 9.9M |
| [unicorn/no-invalid-property-descriptor](https://lintradar.dev/rules/unicorn/no-invalid-property-descriptor.md) | error | Disallow invalid property descriptors. | 9.9M |
| [unicorn/no-invalid-response-options](https://lintradar.dev/rules/unicorn/no-invalid-response-options.md) | error | Disallow invalid options in `new Response()`, `Response.json()`, and `Response.redirect()`. | 9.9M |
| [unicorn/no-invalid-style-set-property](https://lintradar.dev/rules/unicorn/no-invalid-style-set-property.md) | error | Disallow invalid arguments to `CSSStyleDeclaration#setProperty()`. | 9.9M |
| [unicorn/no-invalid-temporal-arithmetic](https://lintradar.dev/rules/unicorn/no-invalid-temporal-arithmetic.md) | error | Disallow statically known invalid Temporal arithmetic. | 9.9M |
| [unicorn/no-invalid-url-protocol-comparison](https://lintradar.dev/rules/unicorn/no-invalid-url-protocol-comparison.md) | error | Disallow invalid protocol strings in comparisons with `URL#protocol`. | 9.9M |
| [unicorn/no-invalid-well-known-symbol-methods](https://lintradar.dev/rules/unicorn/no-invalid-well-known-symbol-methods.md) | error | Disallow invalid implementations of well-known symbol methods. | 9.9M |
| [unicorn/no-misrefactored-assignment](https://lintradar.dev/rules/unicorn/no-misrefactored-assignment.md) | error | Disallow misrefactored compound assignments where the target is duplicated in the right-hand side. | 9.9M |
| [unicorn/no-multiple-promise-resolver-calls](https://lintradar.dev/rules/unicorn/no-multiple-promise-resolver-calls.md) | error | Disallow calling Promise executor resolver functions more than once on the same execution path. | 9.9M |
| [unicorn/no-named-default](https://lintradar.dev/rules/unicorn/no-named-default.md) | error | Disallow named usage of default import and export. | 9.9M |
| [unicorn/no-nonstandard-builtin-properties](https://lintradar.dev/rules/unicorn/no-nonstandard-builtin-properties.md) | error | Disallow non-standard properties on built-in objects. | 9.9M |
| [unicorn/no-prevent-default-in-passive-listener](https://lintradar.dev/rules/unicorn/no-prevent-default-in-passive-listener.md) | error | Disallow ineffective `preventDefault()` calls in passive event listeners. | 9.9M |
| [unicorn/no-redundant-comparison](https://lintradar.dev/rules/unicorn/no-redundant-comparison.md) | error | Disallow comparisons made redundant by an equality check in the same logical AND. | 9.9M |
| [unicorn/no-shorthand-property-overrides](https://lintradar.dev/rules/unicorn/no-shorthand-property-overrides.md) | error | Disallow shorthand properties that override related longhand properties. | 9.9M |
| [unicorn/no-transition-all](https://lintradar.dev/rules/unicorn/no-transition-all.md) | error | Disallow `all` as a transition property. | 9.9M |
| [unicorn/no-unnecessary-fetch-options](https://lintradar.dev/rules/unicorn/no-unnecessary-fetch-options.md) | error | Disallow unnecessary options in `fetch()` and `new Request()`. | 9.9M |
| [unicorn/no-unnecessary-global-this](https://lintradar.dev/rules/unicorn/no-unnecessary-global-this.md) | error | Disallow unnecessary `globalThis` references. | 9.9M |
| [unicorn/no-unnecessary-polyfills](https://lintradar.dev/rules/unicorn/no-unnecessary-polyfills.md) | error | Enforce the use of built-in methods instead of unnecessary polyfills. | 9.9M |
| [unicorn/no-unreadable-object-destructuring](https://lintradar.dev/rules/unicorn/no-unreadable-object-destructuring.md) | error | Disallow unreadable object destructuring. | 9.9M |
| [unicorn/no-unsafe-buffer-conversion](https://lintradar.dev/rules/unicorn/no-unsafe-buffer-conversion.md) | error | Prevent unsafe use of ArrayBuffer view `.buffer`. | 9.9M |
| [unicorn/no-unsafe-promise-all-settled-values](https://lintradar.dev/rules/unicorn/no-unsafe-promise-all-settled-values.md) | error | Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard. | 9.9M |
| [unicorn/no-unused-builtin-method-return](https://lintradar.dev/rules/unicorn/no-unused-builtin-method-return.md) | error | Disallow ignoring the return value of selected built-in methods. | 9.9M |
| [unicorn/no-unused-iterator-helper](https://lintradar.dev/rules/unicorn/no-unused-iterator-helper.md) | error | Disallow discarding lazy iterator helpers. | 9.9M |
| [unicorn/no-url-in-search-params](https://lintradar.dev/rules/unicorn/no-url-in-search-params.md) | error | Disallow passing full URLs to `URLSearchParams`. | 9.9M |
| [unicorn/no-useless-boolean-cast](https://lintradar.dev/rules/unicorn/no-useless-boolean-cast.md) | error | Disallow unnecessary `Boolean()` casts in array predicate callbacks. | 9.9M |
| [unicorn/no-useless-coercion](https://lintradar.dev/rules/unicorn/no-useless-coercion.md) | error | Disallow useless type coercions of values that are already of the target type. | 9.9M |
| [unicorn/no-useless-compound-assignment](https://lintradar.dev/rules/unicorn/no-useless-compound-assignment.md) | error | Disallow useless compound assignments such as `x += 0`. | 9.9M |
| [unicorn/no-useless-continue](https://lintradar.dev/rules/unicorn/no-useless-continue.md) | error | Disallow useless `continue` statements. | 9.9M |
| [unicorn/no-useless-delete-check](https://lintradar.dev/rules/unicorn/no-useless-delete-check.md) | error | Disallow unnecessary existence checks before deletion. | 9.9M |
| [unicorn/no-useless-logical-operand](https://lintradar.dev/rules/unicorn/no-useless-logical-operand.md) | error | Disallow unnecessary operands in logical expressions involving boolean literals. | 9.9M |
| [unicorn/no-useless-override](https://lintradar.dev/rules/unicorn/no-useless-override.md) | error | Disallow useless overrides of class methods. | 9.9M |
| [unicorn/no-useless-re-export](https://lintradar.dev/rules/unicorn/no-useless-re-export.md) | error | Disallow redundant re-exports. | 9.9M |
| [unicorn/no-using-resource-escape](https://lintradar.dev/rules/unicorn/no-using-resource-escape.md) | error | Disallow returning or exporting resources declared with `using`, including through capturing functions. | 9.9M |
| [unicorn/prefer-add-event-listener-options](https://lintradar.dev/rules/unicorn/prefer-add-event-listener-options.md) | error | Prefer an options object over a boolean in `.addEventListener()`. | 9.9M |
| [unicorn/prefer-aggregate-error](https://lintradar.dev/rules/unicorn/prefer-aggregate-error.md) | error | Prefer `AggregateError` when throwing collected errors. | 9.9M |
| [unicorn/prefer-array-from-map](https://lintradar.dev/rules/unicorn/prefer-array-from-map.md) | error | Prefer using the `Array.from()` mapping function argument. | 9.9M |
| [unicorn/prefer-array-from-range](https://lintradar.dev/rules/unicorn/prefer-array-from-range.md) | error | Prefer `Array.from({length}, …)` when creating range arrays. | 9.9M |
| [unicorn/prefer-array-last-methods](https://lintradar.dev/rules/unicorn/prefer-array-last-methods.md) | error | Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method. | 9.9M |
| [unicorn/prefer-await](https://lintradar.dev/rules/unicorn/prefer-await.md) | error | Prefer `await` over promise chaining. | 9.9M |
| [unicorn/prefer-direct-iteration](https://lintradar.dev/rules/unicorn/prefer-direct-iteration.md) | error | Prefer direct iteration over default iterator method calls. | 9.9M |
| [unicorn/prefer-dom-node-replace-children](https://lintradar.dev/rules/unicorn/prefer-dom-node-replace-children.md) | error | Prefer `.replaceChildren()` when replacing DOM children. | 9.9M |
| [unicorn/prefer-early-return](https://lintradar.dev/rules/unicorn/prefer-early-return.md) | error | Prefer early returns over conditionals wrapping the remainder of the function body. | 9.9M |
| [unicorn/prefer-escaped-irregular-whitespace](https://lintradar.dev/rules/unicorn/prefer-escaped-irregular-whitespace.md) | error | Prefer escape sequences for irregular whitespace characters. | 9.9M |
| [unicorn/prefer-global-number-constants](https://lintradar.dev/rules/unicorn/prefer-global-number-constants.md) | error | Prefer global numeric constants over `Number` static properties. | 9.9M |
| [unicorn/prefer-has-check](https://lintradar.dev/rules/unicorn/prefer-has-check.md) | error | Prefer `.has()` when checking existence. | 9.9M |
| [unicorn/prefer-identifier-import-export-specifiers](https://lintradar.dev/rules/unicorn/prefer-identifier-import-export-specifiers.md) | error | Prefer identifiers over string literals in import and export specifiers. | 9.9M |
| [unicorn/prefer-iterable-in-constructor](https://lintradar.dev/rules/unicorn/prefer-iterable-in-constructor.md) | error | Prefer passing iterables directly to constructors instead of filling empty collections. | 9.9M |
| [unicorn/prefer-iterator-helpers](https://lintradar.dev/rules/unicorn/prefer-iterator-helpers.md) | error | Prefer iterator helpers over temporary arrays from iterators. | 9.9M |
| [unicorn/prefer-iterator-to-array-at-end](https://lintradar.dev/rules/unicorn/prefer-iterator-to-array-at-end.md) | error | Prefer moving `.toArray()` to the end of iterator helper chains. | 9.9M |
| [unicorn/prefer-literal-ascii](https://lintradar.dev/rules/unicorn/prefer-literal-ascii.md) | error | Prefer literal printable ASCII characters over escape sequences. | 9.9M |
| [unicorn/prefer-map-from-entries](https://lintradar.dev/rules/unicorn/prefer-map-from-entries.md) | error | Prefer `new Map()` over `Object.fromEntries()` when using the result as a map. | 9.9M |
| [unicorn/prefer-minimal-ternary](https://lintradar.dev/rules/unicorn/prefer-minimal-ternary.md) | error | Prefer moving ternaries into the minimal varying part of an expression. | 9.9M |
| [unicorn/prefer-object-define-properties](https://lintradar.dev/rules/unicorn/prefer-object-define-properties.md) | error | Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls. | 9.9M |
| [unicorn/prefer-object-iterable-methods](https://lintradar.dev/rules/unicorn/prefer-object-iterable-methods.md) | error | Prefer the most specific `Object` iterable method. | 9.9M |
| [unicorn/prefer-path2d](https://lintradar.dev/rules/unicorn/prefer-path2d.md) | error | Prefer `Path2D` for repeatedly drawn canvas paths. | 9.9M |
| [unicorn/prefer-promise-static-methods](https://lintradar.dev/rules/unicorn/prefer-promise-static-methods.md) | error | Prefer `Promise.resolve()` and `Promise.reject()` over trivial `new Promise()` calls. | 9.9M |
| [unicorn/prefer-promise-with-resolvers](https://lintradar.dev/rules/unicorn/prefer-promise-with-resolvers.md) | error | Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`. | 9.9M |
| [unicorn/prefer-queue-microtask](https://lintradar.dev/rules/unicorn/prefer-queue-microtask.md) | error | Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`. | 9.9M |
| [unicorn/prefer-short-escape-sequences](https://lintradar.dev/rules/unicorn/prefer-short-escape-sequences.md) | error | Prefer shorter alternatives to Unicode escape sequences. | 9.9M |
| [unicorn/prefer-simple-sort-comparator](https://lintradar.dev/rules/unicorn/prefer-simple-sort-comparator.md) | error | Prefer a simple comparison function for `Array#sort()`. | 9.9M |
| [unicorn/prefer-simplified-conditions](https://lintradar.dev/rules/unicorn/prefer-simplified-conditions.md) | error | Prefer simplified conditions. | 9.9M |
| [unicorn/prefer-single-array-predicate](https://lintradar.dev/rules/unicorn/prefer-single-array-predicate.md) | error | Prefer a single `Array#some()` or `Array#every()` with a combined predicate. | 9.9M |
| [unicorn/prefer-single-replace](https://lintradar.dev/rules/unicorn/prefer-single-replace.md) | error | Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression. | 9.9M |
| [unicorn/prefer-split-limit](https://lintradar.dev/rules/unicorn/prefer-split-limit.md) | error | Prefer `String#split()` with a limit. | 9.9M |
| [unicorn/prefer-string-match-all](https://lintradar.dev/rules/unicorn/prefer-string-match-all.md) | error | Prefer `String#matchAll()` over `RegExp#exec()` loops. | 9.9M |
| [unicorn/prefer-string-pad-start-end](https://lintradar.dev/rules/unicorn/prefer-string-pad-start-end.md) | error | Prefer `String#padStart()` and `String#padEnd()` over manual string padding. | 9.9M |
| [unicorn/prefer-string-repeat](https://lintradar.dev/rules/unicorn/prefer-string-repeat.md) | error | Prefer `String#repeat()` for repeated whitespace. | 9.9M |
| [unicorn/prefer-switch](https://lintradar.dev/rules/unicorn/prefer-switch.md) | error | Prefer `switch` over multiple `else-if`. | 9.9M |
| [unicorn/prefer-temporal-conversion](https://lintradar.dev/rules/unicorn/prefer-temporal-conversion.md) | error | Prefer direct Temporal conversion methods. | 9.9M |
| [unicorn/prefer-toggle-attribute](https://lintradar.dev/rules/unicorn/prefer-toggle-attribute.md) | error | Prefer using `Element#toggleAttribute()` to toggle attributes. | 9.9M |
| [unicorn/prefer-unicode-code-point-escapes](https://lintradar.dev/rules/unicorn/prefer-unicode-code-point-escapes.md) | error | Prefer Unicode code point escapes over legacy escape sequences. | 9.9M |
| [unicorn/prefer-url-can-parse](https://lintradar.dev/rules/unicorn/prefer-url-can-parse.md) | error | Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation. | 9.9M |
| [unicorn/prefer-url-href](https://lintradar.dev/rules/unicorn/prefer-url-href.md) | error | Prefer `URL#href` over stringifying a `URL`. | 9.9M |
| [unicorn/prefer-url-search-parameters](https://lintradar.dev/rules/unicorn/prefer-url-search-parameters.md) | error | Prefer `URLSearchParams` over manually splitting query strings. | 9.9M |
| [unicorn/require-css-escape](https://lintradar.dev/rules/unicorn/require-css-escape.md) | error | Require `CSS.escape()` for interpolated values in CSS selectors. | 9.9M |
| [unicorn/require-passive-events](https://lintradar.dev/rules/unicorn/require-passive-events.md) | error | Require passive event listeners for high-frequency events. | 9.9M |
| [unicorn/require-proxy-trap-boolean-return](https://lintradar.dev/rules/unicorn/require-proxy-trap-boolean-return.md) | error | Require boolean-returning Proxy traps to return booleans. | 9.9M |
| [unicorn/require-text-decoder-streaming](https://lintradar.dev/rules/unicorn/require-text-decoder-streaming.md) | error | Require streaming decoding of fetch-body chunks with `TextDecoder`. | 9.9M |
| [unicorn/explicit-length-check](https://lintradar.dev/rules/unicorn/explicit-length-check.md) | error | Enforce explicitly comparing the `length` or `size` property of a value. | 9.9M |
| [unicorn/no-nested-ternary](https://lintradar.dev/rules/unicorn/no-nested-ternary.md) | error | Disallow nested ternary expressions. | 9.9M |
| [unicorn/no-null](https://lintradar.dev/rules/unicorn/no-null.md) | error | Disallow the use of the `null` literal. | 9.9M |
| [unicorn/max-nested-calls](https://lintradar.dev/rules/unicorn/max-nested-calls.md) | error | Limit the depth of nested calls. | 9.9M |
| [unicorn/no-array-callback-reference](https://lintradar.dev/rules/unicorn/no-array-callback-reference.md) | error | Prevent passing a function reference directly to iterator methods. | 9.9M |
| [unicorn/consistent-boolean-name](https://lintradar.dev/rules/unicorn/consistent-boolean-name.md) | error | Enforce consistent naming for boolean names. | 9.9M |
| [unicorn/consistent-json-file-read](https://lintradar.dev/rules/unicorn/consistent-json-file-read.md) | error | Enforce consistent JSON file reads before `JSON.parse()`. | 9.9M |
| [unicorn/consistent-tuple-labels](https://lintradar.dev/rules/unicorn/consistent-tuple-labels.md) | error | Enforce consistent labels on tuple type elements. | 9.9M |
| [unicorn/default-export-style](https://lintradar.dev/rules/unicorn/default-export-style.md) | error | Enforce consistent default export declarations. | 9.9M |
| [unicorn/isolated-functions](https://lintradar.dev/rules/unicorn/isolated-functions.md) | error | Prevent usage of variables from outside the scope of isolated functions. | 9.9M |
| [unicorn/no-break-in-nested-loop](https://lintradar.dev/rules/unicorn/no-break-in-nested-loop.md) | error | Disallow `break` and optionally `continue` in nested loops and switches inside loops. | 9.9M |
| [unicorn/no-duplicate-if-branches](https://lintradar.dev/rules/unicorn/no-duplicate-if-branches.md) | error | Disallow duplicate adjacent branches in if chains. | 9.9M |
| [unicorn/no-for-loop](https://lintradar.dev/rules/unicorn/no-for-loop.md) | error | Do not use a `for` loop that can be replaced with a `for-of` loop. | 9.9M |
| [unicorn/no-mismatched-map-key](https://lintradar.dev/rules/unicorn/no-mismatched-map-key.md) | error | Disallow checking a Map key before accessing a different key. | 9.9M |
| [unicorn/no-useless-recursion](https://lintradar.dev/rules/unicorn/no-useless-recursion.md) | error | Disallow simple recursive function calls that can be replaced with a loop. | 9.9M |
| [unicorn/prefer-continue](https://lintradar.dev/rules/unicorn/prefer-continue.md) | error | Prefer early continues over conditionals wrapping the remainder of the loop body. | 9.9M |
| [unicorn/prefer-else-if](https://lintradar.dev/rules/unicorn/prefer-else-if.md) | error | Prefer `else if` over adjacent `if` statements with related conditions. | 9.9M |
| [unicorn/prefer-iterator-zip](https://lintradar.dev/rules/unicorn/prefer-iterator-zip.md) | error | Prefer `Iterator.zip()` over parallel-array indexing. | 9.9M |
| [unicorn/prefer-set-methods](https://lintradar.dev/rules/unicorn/prefer-set-methods.md) | error | Prefer `Set` methods for Set operations. | 9.9M |
| [unicorn/class-reference-in-static-methods](https://lintradar.dev/rules/unicorn/class-reference-in-static-methods.md) | error | Enforce consistent class references in static methods. | 9.9M |
| [unicorn/consistent-class-member-order](https://lintradar.dev/rules/unicorn/consistent-class-member-order.md) | error | Enforce consistent class member order. | 9.9M |
| [unicorn/consistent-conditional-object-spread](https://lintradar.dev/rules/unicorn/consistent-conditional-object-spread.md) | error | Enforce consistent conditional object spread style. | 9.9M |
| [unicorn/logical-assignment-operators](https://lintradar.dev/rules/unicorn/logical-assignment-operators.md) | error | Require or disallow logical assignment operator shorthand | 9.9M |
| [unicorn/name-replacements](https://lintradar.dev/rules/unicorn/name-replacements.md) | error | Enforce replacements for variable, property, and filenames. | 9.9M |
| [unicorn/no-array-concat-in-loop](https://lintradar.dev/rules/unicorn/no-array-concat-in-loop.md) | error | Disallow array accumulation with `Array#concat()` in loops. | 9.9M |
| [unicorn/no-array-splice](https://lintradar.dev/rules/unicorn/no-array-splice.md) | error | Prefer `Array#toSpliced()` over `Array#splice()`. | 9.9M |
| [unicorn/no-asterisk-prefix-in-documentation-comments](https://lintradar.dev/rules/unicorn/no-asterisk-prefix-in-documentation-comments.md) | error | Disallow asterisk prefixes and shared indentation in multiline comments. | 9.9M |
| [unicorn/no-computed-property-existence-check](https://lintradar.dev/rules/unicorn/no-computed-property-existence-check.md) | error | Disallow dynamic object property existence checks. | 9.9M |
| [unicorn/no-duplicate-set-values](https://lintradar.dev/rules/unicorn/no-duplicate-set-values.md) | error | Disallow duplicate values in `Set` constructor array literals. | 9.9M |
| [unicorn/no-incorrect-query-selector](https://lintradar.dev/rules/unicorn/no-incorrect-query-selector.md) | error | Disallow incorrect `querySelector()` and `querySelectorAll()` usage. | 9.9M |
| [unicorn/no-incorrect-template-string-interpolation](https://lintradar.dev/rules/unicorn/no-incorrect-template-string-interpolation.md) | error | Disallow incorrect template literal interpolation syntax. | 9.9M |
| [unicorn/no-leading-empty-lines](https://lintradar.dev/rules/unicorn/no-leading-empty-lines.md) | error | Disallow empty lines at the beginning of a file. | 9.9M |
| [unicorn/no-loop-iterable-mutation](https://lintradar.dev/rules/unicorn/no-loop-iterable-mutation.md) | error | Disallow mutating a loop iterable during iteration. | 9.9M |
| [unicorn/no-non-function-verb-prefix](https://lintradar.dev/rules/unicorn/no-non-function-verb-prefix.md) | error | Disallow non-function values with function-style verb prefixes. | 9.9M |
| [unicorn/no-object-methods-with-collections](https://lintradar.dev/rules/unicorn/no-object-methods-with-collections.md) | error | Disallow `Object` methods with `Map` or `Set`. | 9.9M |
| [unicorn/no-optional-chaining-on-undeclared-variable](https://lintradar.dev/rules/unicorn/no-optional-chaining-on-undeclared-variable.md) | error | Disallow optional chaining on undeclared variables. | 9.9M |
| [unicorn/no-selector-as-dom-name](https://lintradar.dev/rules/unicorn/no-selector-as-dom-name.md) | error | Disallow selector syntax in DOM names. | 9.9M |
| [unicorn/no-top-level-side-effects](https://lintradar.dev/rules/unicorn/no-top-level-side-effects.md) | error | Disallow top-level side effects in exported modules. | 9.9M |
| [unicorn/no-uncalled-method](https://lintradar.dev/rules/unicorn/no-uncalled-method.md) | error | Disallow referencing methods without calling them. | 9.9M |
| [unicorn/no-undeclared-class-members](https://lintradar.dev/rules/unicorn/no-undeclared-class-members.md) | error | Require class members to be declared. | 9.9M |
| [unicorn/no-unnecessary-array-flat-map](https://lintradar.dev/rules/unicorn/no-unnecessary-array-flat-map.md) | error | Disallow unnecessary use of `Array#flatMap()`. | 9.9M |
| [unicorn/no-unnecessary-boolean-comparison](https://lintradar.dev/rules/unicorn/no-unnecessary-boolean-comparison.md) | error | Disallow unnecessary comparisons against boolean literals. | 9.9M |
| [unicorn/no-unnecessary-parameters](https://lintradar.dev/rules/unicorn/no-unnecessary-parameters.md) | error | Disallow parameters that receive the same value at every call. | 9.9M |
| [unicorn/no-unsafe-json-serialization](https://lintradar.dev/rules/unicorn/no-unsafe-json-serialization.md) | error | Disallow known values that JSON serialization cannot represent faithfully. | 9.9M |
| [unicorn/no-unsafe-property-key](https://lintradar.dev/rules/unicorn/no-unsafe-property-key.md) | error | Disallow unsafe values as property keys. | 9.9M |
| [unicorn/no-useless-else](https://lintradar.dev/rules/unicorn/no-useless-else.md) | error | Disallow `else` after a statement that exits. | 9.9M |
| [unicorn/operator-assignment](https://lintradar.dev/rules/unicorn/operator-assignment.md) | error | Require assignment operator shorthand where possible. | 9.9M |
| [unicorn/prefer-abort-signal-any](https://lintradar.dev/rules/unicorn/prefer-abort-signal-any.md) | error | Prefer `AbortSignal.any()` over manually forwarding abort events between signals. | 9.9M |
| [unicorn/prefer-abort-signal-timeout](https://lintradar.dev/rules/unicorn/prefer-abort-signal-timeout.md) | error | Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`. | 9.9M |
| [unicorn/prefer-array-from-async](https://lintradar.dev/rules/unicorn/prefer-array-from-async.md) | error | Prefer `Array.fromAsync()` over array accumulation loops. | 9.9M |
| [unicorn/prefer-array-iterable-methods](https://lintradar.dev/rules/unicorn/prefer-array-iterable-methods.md) | error | Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused. | 9.9M |
| [unicorn/prefer-array-slice](https://lintradar.dev/rules/unicorn/prefer-array-slice.md) | error | Prefer `Array#slice()` over `Array#splice()` when reading from the returned array. | 9.9M |
| [unicorn/prefer-combined-guards](https://lintradar.dev/rules/unicorn/prefer-combined-guards.md) | error | Prefer combining consecutive guards with identical exit statements. | 9.9M |
| [unicorn/prefer-dom-node-html-methods](https://lintradar.dev/rules/unicorn/prefer-dom-node-html-methods.md) | error | Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`. | 9.9M |
| [unicorn/prefer-get-or-insert-computed](https://lintradar.dev/rules/unicorn/prefer-get-or-insert-computed.md) | error | Prefer `.getOrInsertComputed()` when the default value has side effects. | 9.9M |
| [unicorn/prefer-group-by](https://lintradar.dev/rules/unicorn/prefer-group-by.md) | error | Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping. | 9.9M |
| [unicorn/prefer-hoisting-branch-code](https://lintradar.dev/rules/unicorn/prefer-hoisting-branch-code.md) | error | Prefer moving code shared by all branches of an `if` statement out of the branches. | 9.9M |
| [unicorn/prefer-https](https://lintradar.dev/rules/unicorn/prefer-https.md) | error | Prefer HTTPS over HTTP. | 9.9M |
| [unicorn/prefer-includes-over-repeated-comparisons](https://lintradar.dev/rules/unicorn/prefer-includes-over-repeated-comparisons.md) | error | Prefer `.includes()` over repeated equality comparisons. | 9.9M |
| [unicorn/prefer-iterator-to-array](https://lintradar.dev/rules/unicorn/prefer-iterator-to-array.md) | error | Prefer `Iterator#toArray()` over temporary arrays from iterator spreads. | 9.9M |
| [unicorn/prefer-location-assign](https://lintradar.dev/rules/unicorn/prefer-location-assign.md) | error | Prefer `location.assign()` over assigning to `location.href`. | 9.9M |
| [unicorn/prefer-number-is-safe-integer](https://lintradar.dev/rules/unicorn/prefer-number-is-safe-integer.md) | error | Prefer `Number.isSafeInteger()` over integer checks. | 9.9M |
| [unicorn/prefer-object-destructuring-defaults](https://lintradar.dev/rules/unicorn/prefer-object-destructuring-defaults.md) | error | Prefer object destructuring defaults over default object literals with spread. | 9.9M |
| [unicorn/prefer-observer-apis](https://lintradar.dev/rules/unicorn/prefer-observer-apis.md) | error | Prefer observer APIs over resize and scroll listeners with layout reads. | 9.9M |
| [unicorn/prefer-options-parameter](https://lintradar.dev/rules/unicorn/prefer-options-parameter.md) | error | Prefer an options object over optional positional parameters. | 9.9M |
| [unicorn/prefer-private-class-fields](https://lintradar.dev/rules/unicorn/prefer-private-class-fields.md) | error | Prefer private class fields over the underscore-prefix convention. | 9.9M |
| [unicorn/prefer-promise-try](https://lintradar.dev/rules/unicorn/prefer-promise-try.md) | error | Prefer `Promise.try()` over promise-wrapping boilerplate. | 9.9M |
| [unicorn/prefer-regexp-exec](https://lintradar.dev/rules/unicorn/prefer-regexp-exec.md) | error | Prefer `RegExp#exec()` over `String#match()` for non-global regular expressions. | 9.9M |
| [unicorn/prefer-scoped-selector](https://lintradar.dev/rules/unicorn/prefer-scoped-selector.md) | error | Prefer `:scope` when using element query selector methods. | 9.9M |
| [unicorn/prefer-simple-condition-first](https://lintradar.dev/rules/unicorn/prefer-simple-condition-first.md) | error | Prefer simple conditions first in logical expressions. | 9.9M |
| [unicorn/prefer-single-object-destructuring](https://lintradar.dev/rules/unicorn/prefer-single-object-destructuring.md) | error | Prefer a single object destructuring declaration per local const source. | 9.9M |
| [unicorn/prefer-smaller-scope](https://lintradar.dev/rules/unicorn/prefer-smaller-scope.md) | error | Prefer declaring variables and type aliases in the smallest possible scope. | 9.9M |
| [unicorn/prefer-then-catch](https://lintradar.dev/rules/unicorn/prefer-then-catch.md) | error | Prefer `.then().catch()` over `.then(…, …)` for error handling. | 9.9M |
| [unicorn/prefer-type-literal-last](https://lintradar.dev/rules/unicorn/prefer-type-literal-last.md) | error | Require type literals to be last in union types. | 9.9M |
| [unicorn/require-spread-parentheses](https://lintradar.dev/rules/unicorn/require-spread-parentheses.md) | error | Require parentheses around complex spread arguments. | 9.9M |
| [unicorn/single-line-block-comment-style](https://lintradar.dev/rules/unicorn/single-line-block-comment-style.md) | error | Enforce a consistent style for single-line block comments. | 9.9M |
| [unicorn/template-indent](https://lintradar.dev/rules/unicorn/template-indent.md) | error | Fix whitespace-insensitive template indentation. | 9.9M |
| [unicorn/consistent-compound-words](https://lintradar.dev/rules/unicorn/consistent-compound-words.md) | error | Enforce consistent spelling of compound words in identifiers. | 9.5M |
| [unicorn/no-invalid-argument-count](https://lintradar.dev/rules/unicorn/no-invalid-argument-count.md) | error | Disallow calling functions and constructors with an invalid number of arguments. | 9.5M |
| [unicorn/no-useless-template-literals](https://lintradar.dev/rules/unicorn/no-useless-template-literals.md) | error | Disallow useless template literal expressions. | 9.5M |
| [unicorn/require-array-sort-compare](https://lintradar.dev/rules/unicorn/require-array-sort-compare.md) | error | Require a compare function when calling `Array#sort()` or `Array#toSorted()`. | 9.5M |
| [unicorn/no-this-outside-of-class](https://lintradar.dev/rules/unicorn/no-this-outside-of-class.md) | error | Disallow `this` outside of classes. | 9.5M |
| [unicorn/no-unreadable-for-of-expression](https://lintradar.dev/rules/unicorn/no-unreadable-for-of-expression.md) | error | Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers. | 9.5M |
| [unicorn/no-top-level-assignment-in-function](https://lintradar.dev/rules/unicorn/no-top-level-assignment-in-function.md) | error | Disallow assigning to top-level variables from inside functions. | 9.5M |
| [unicorn/no-unsafe-string-replacement](https://lintradar.dev/rules/unicorn/no-unsafe-string-replacement.md) | error | Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`. | 9.5M |

---

Web page: https://lintradar.dev/presets/unicorn-recommended. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
