{"owner":"sindresorhus","repo":"eslint-plugin-unicorn","hasSkills":true,"totalSkillsCount":378,"totalTokensCount":231889,"categories":["root-instruction","claude-rule","anthropic-skill"],"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md","CLAUDE.md","docs/rules/better-dom-traversing.md","docs/rules/catch-error-name.md","docs/rules/class-reference-in-static-methods.md","docs/rules/comma-spacing.md","docs/rules/comment-content.md","docs/rules/consistent-arrow-return-style.md","docs/rules/consistent-assert.md","docs/rules/consistent-boolean-name.md","docs/rules/consistent-class-member-order.md","docs/rules/consistent-compound-words.md","docs/rules/consistent-conditional-object-spread.md","docs/rules/consistent-date-clone.md","docs/rules/consistent-destructuring.md","docs/rules/consistent-empty-array-spread.md","docs/rules/consistent-existence-index-check.md","docs/rules/consistent-export-decorator-position.md","docs/rules/consistent-function-scoping.md","docs/rules/consistent-function-style.md","docs/rules/consistent-json-file-read.md","docs/rules/consistent-optional-chaining.md","docs/rules/consistent-template-literal-escape.md","docs/rules/consistent-tuple-labels.md","docs/rules/custom-error-definition.md","docs/rules/default-export-style.md","docs/rules/dom-node-dataset.md","docs/rules/empty-brace-spaces.md","docs/rules/error-message.md","docs/rules/escape-case.md","docs/rules/expiring-todo-comments.md","docs/rules/explicit-length-check.md","docs/rules/explicit-timer-delay.md","docs/rules/filename-case.md","docs/rules/id-match.md","docs/rules/import-style.md","docs/rules/indent.md","docs/rules/isolated-functions.md","docs/rules/iteration-fallback-style.md","docs/rules/key-name-casing.md","docs/rules/logical-assignment-operators.md","docs/rules/max-nested-calls.md","docs/rules/name-replacements.md","docs/rules/new-for-builtins.md","docs/rules/no-abusive-eslint-disable.md","docs/rules/no-accessor-recursion.md","docs/rules/no-accidental-bitwise-operator.md","docs/rules/no-anonymous-default-export.md","docs/rules/no-array-callback-reference.md","docs/rules/no-array-concat-in-loop.md","docs/rules/no-array-fill-with-reference-type.md","docs/rules/no-array-from-fill.md","docs/rules/no-array-front-mutation.md","docs/rules/no-array-method-this-argument.md","docs/rules/no-array-reduce.md","docs/rules/no-array-reverse.md","docs/rules/no-array-sort-for-min-max.md","docs/rules/no-array-sort.md","docs/rules/no-array-splice.md","docs/rules/no-asterisk-prefix-in-documentation-comments.md","docs/rules/no-async-iterator-callback.md","docs/rules/no-async-promise-finally.md","docs/rules/no-await-expression-member.md","docs/rules/no-await-in-promise-methods.md","docs/rules/no-barrel-files.md","docs/rules/no-blob-to-file.md","docs/rules/no-boolean-sort-comparator.md","docs/rules/no-break-in-nested-loop.md","docs/rules/no-canvas-to-image.md","docs/rules/no-chained-comparison.md","docs/rules/no-collection-bracket-access.md","docs/rules/no-computed-property-existence-check.md","docs/rules/no-conflicting-constraints.md","docs/rules/no-confusing-array-splice.md","docs/rules/no-confusing-array-with.md","docs/rules/no-console-spaces.md","docs/rules/no-constant-zero-expression.md","docs/rules/no-declarations-before-early-exit.md","docs/rules/no-document-cookie.md","docs/rules/no-double-comparison.md","docs/rules/no-duplicate-if-branches.md","docs/rules/no-duplicate-logical-operands.md","docs/rules/no-duplicate-loops.md","docs/rules/no-duplicate-set-values.md","docs/rules/no-empty-file.md","docs/rules/no-empty-link-text.md","docs/rules/no-error-property-assignment.md","docs/rules/no-exports-in-scripts.md","docs/rules/no-for-each.md","docs/rules/no-for-loop.md","docs/rules/no-global-object-property-assignment.md","docs/rules/no-immediate-mutation.md","docs/rules/no-impossible-length-comparison.md","docs/rules/no-incomplete-accessor-override.md","docs/rules/no-incorrect-query-selector.md","docs/rules/no-incorrect-template-string-interpolation.md","docs/rules/no-ineffective-csp-directives.md","docs/rules/no-instanceof-builtins.md","docs/rules/no-invalid-argument-count.md","docs/rules/no-invalid-boolean-attribute-value.md","docs/rules/no-invalid-character-comparison.md","docs/rules/no-invalid-dom-token.md","docs/rules/no-invalid-fetch-options.md","docs/rules/no-invalid-file-input-accept.md","docs/rules/no-invalid-integrity.md","docs/rules/no-invalid-intl-options.md","docs/rules/no-invalid-property-descriptor.md","docs/rules/no-invalid-remove-event-listener.md","docs/rules/no-invalid-response-options.md","docs/rules/no-invalid-style-set-property.md","docs/rules/no-invalid-temporal-arithmetic.md","docs/rules/no-invalid-url-protocol-comparison.md","docs/rules/no-invalid-well-known-symbol-methods.md","docs/rules/no-javascript-url.md","docs/rules/no-keyword-prefix.md","docs/rules/no-late-current-target-access.md","docs/rules/no-late-event-control.md","docs/rules/no-leading-empty-lines.md","docs/rules/no-lonely-if.md","docs/rules/no-loop-iterable-mutation.md","docs/rules/no-loss-of-precision.md","docs/rules/no-magic-array-flat-depth.md","docs/rules/no-manually-wrapped-comments.md","docs/rules/no-mismatched-map-key.md","docs/rules/no-misrefactored-assignment.md","docs/rules/no-missing-local-resource.md","docs/rules/no-multiple-promise-resolver-calls.md","docs/rules/no-named-default.md","docs/rules/no-negated-array-predicate.md","docs/rules/no-negated-comparison.md","docs/rules/no-negated-condition.md","docs/rules/no-negation-in-equality-check.md","docs/rules/no-nested-ternary.md","docs/rules/no-new-array.md","docs/rules/no-new-buffer.md","docs/rules/no-non-function-verb-prefix.md","docs/rules/no-nonstandard-builtin-properties.md","docs/rules/no-null.md","docs/rules/no-object-as-default-parameter.md","docs/rules/no-object-methods-with-collections.md","docs/rules/no-optional-chaining-on-undeclared-variable.md","docs/rules/no-prevent-default-in-passive-listener.md","docs/rules/no-process-exit.md","docs/rules/no-redundant-comparison.md","docs/rules/no-repeated-call-wrappers.md","docs/rules/no-return-array-push.md","docs/rules/no-selector-as-dom-name.md","docs/rules/no-shorthand-property-overrides.md","docs/rules/no-single-promise-in-promise-methods.md","docs/rules/no-static-only-class.md","docs/rules/no-subtraction-comparison.md","docs/rules/no-thenable.md","docs/rules/no-this-assignment.md","docs/rules/no-this-outside-of-class.md","docs/rules/no-top-level-assignment-in-function.md","docs/rules/no-top-level-side-effects.md","docs/rules/no-transition-all.md","docs/rules/no-typeof-undefined.md","docs/rules/no-uncalled-method.md","docs/rules/no-undeclared-class-members.md","docs/rules/no-unnecessary-array-flat-depth.md","docs/rules/no-unnecessary-array-flat-map.md","docs/rules/no-unnecessary-array-splice-count.md","docs/rules/no-unnecessary-await.md","docs/rules/no-unnecessary-boolean-comparison.md","docs/rules/no-unnecessary-default-arguments.md","docs/rules/no-unnecessary-fetch-options.md","docs/rules/no-unnecessary-global-this.md","docs/rules/no-unnecessary-nested-ternary.md","docs/rules/no-unnecessary-parameters.md","docs/rules/no-unnecessary-polyfills.md","docs/rules/no-unnecessary-slice-end.md","docs/rules/no-unnecessary-splice.md","docs/rules/no-unnecessary-string-trim.md","docs/rules/no-unreadable-array-destructuring.md","docs/rules/no-unreadable-for-of-expression.md","docs/rules/no-unreadable-iife.md","docs/rules/no-unreadable-new-expression.md","docs/rules/no-unreadable-object-destructuring.md","docs/rules/no-unsafe-buffer-conversion.md","docs/rules/no-unsafe-dom-html.md","docs/rules/no-unsafe-json-serialization.md","docs/rules/no-unsafe-promise-all-settled-values.md","docs/rules/no-unsafe-property-key.md","docs/rules/no-unsafe-sqlite-interpolation.md","docs/rules/no-unsafe-string-replacement.md","docs/rules/no-unused-builtin-method-return.md","docs/rules/no-unused-iterator-helper.md","docs/rules/no-unused-properties.md","docs/rules/no-url-in-search-params.md","docs/rules/no-useless-boolean-cast.md","docs/rules/no-useless-coercion.md","docs/rules/no-useless-collection-argument.md","docs/rules/no-useless-compound-assignment.md","docs/rules/no-useless-concat.md","docs/rules/no-useless-continue.md","docs/rules/no-useless-delete-check.md","docs/rules/no-useless-else.md","docs/rules/no-useless-error-capture-stack-trace.md","docs/rules/no-useless-fallback-in-spread.md","docs/rules/no-useless-iterator-to-array.md","docs/rules/no-useless-length-check.md","docs/rules/no-useless-logical-operand.md","docs/rules/no-useless-override.md","docs/rules/no-useless-promise-resolve-reject.md","docs/rules/no-useless-re-export.md","docs/rules/no-useless-recursion.md","docs/rules/no-useless-set-construction.md","docs/rules/no-useless-spread.md","docs/rules/no-useless-switch-case.md","docs/rules/no-useless-template-literals.md","docs/rules/no-useless-undefined.md","docs/rules/no-using-resource-escape.md","docs/rules/no-xor-as-exponentiation.md","docs/rules/no-zero-fractions.md","docs/rules/number-literal-case.md","docs/rules/numeric-separators-style.md","docs/rules/operator-assignment.md","docs/rules/prefer-abort-signal-any.md","docs/rules/prefer-abort-signal-timeout.md","docs/rules/prefer-add-event-listener-options.md","docs/rules/prefer-add-event-listener.md","docs/rules/prefer-aggregate-error.md","docs/rules/prefer-array-find.md","docs/rules/prefer-array-flat-map.md","docs/rules/prefer-array-flat.md","docs/rules/prefer-array-from-async.md","docs/rules/prefer-array-from-map.md","docs/rules/prefer-array-from-range.md","docs/rules/prefer-array-index-of.md","docs/rules/prefer-array-iterable-methods.md","docs/rules/prefer-array-last-methods.md","docs/rules/prefer-array-slice.md","docs/rules/prefer-array-some.md","docs/rules/prefer-at.md","docs/rules/prefer-await.md","docs/rules/prefer-bigint-literals.md","docs/rules/prefer-blob-reading-methods.md","docs/rules/prefer-block-statement-over-iife.md","docs/rules/prefer-boolean-return.md","docs/rules/prefer-class-fields.md","docs/rules/prefer-classlist-toggle.md","docs/rules/prefer-code-point.md","docs/rules/prefer-combined-guards.md","docs/rules/prefer-continue.md","docs/rules/prefer-date-now.md","docs/rules/prefer-default-parameters.md","docs/rules/prefer-direct-iteration.md","docs/rules/prefer-dispose.md","docs/rules/prefer-dom-node-append.md","docs/rules/prefer-dom-node-html-methods.md","docs/rules/prefer-dom-node-remove.md","docs/rules/prefer-dom-node-replace-children.md","docs/rules/prefer-dom-node-text-content.md","docs/rules/prefer-early-return.md","docs/rules/prefer-else-if.md","docs/rules/prefer-error-is-error.md","docs/rules/prefer-escaped-irregular-whitespace.md","docs/rules/prefer-event-target.md","docs/rules/prefer-export-from.md","docs/rules/prefer-flat-math-min-max.md","docs/rules/prefer-get-or-insert-computed.md","docs/rules/prefer-global-number-constants.md","docs/rules/prefer-global-this.md","docs/rules/prefer-group-by.md","docs/rules/prefer-has-check.md","docs/rules/prefer-hoisting-branch-code.md","docs/rules/prefer-https.md","docs/rules/prefer-identifier-import-export-specifiers.md","docs/rules/prefer-import-meta-properties.md","docs/rules/prefer-includes-over-repeated-comparisons.md","docs/rules/prefer-includes.md","docs/rules/prefer-iterable-in-constructor.md","docs/rules/prefer-iterator-concat.md","docs/rules/prefer-iterator-helpers.md","docs/rules/prefer-iterator-to-array-at-end.md","docs/rules/prefer-iterator-to-array.md","docs/rules/prefer-iterator-zip.md","docs/rules/prefer-json-import.md","docs/rules/prefer-keyboard-event-key.md","docs/rules/prefer-literal-ascii.md","docs/rules/prefer-location-assign.md","docs/rules/prefer-logical-operator-over-ternary.md","docs/rules/prefer-map-from-entries.md","docs/rules/prefer-math-abs.md","docs/rules/prefer-math-constants.md","docs/rules/prefer-math-min-max.md","docs/rules/prefer-math-trunc.md","docs/rules/prefer-minimal-ternary.md","docs/rules/prefer-modern-dom-apis.md","docs/rules/prefer-modern-math-apis.md","docs/rules/prefer-module.md","docs/rules/prefer-native-coercion-functions.md","docs/rules/prefer-negative-index.md","docs/rules/prefer-node-protocol.md","docs/rules/prefer-number-coercion.md","docs/rules/prefer-number-is-safe-integer.md","docs/rules/prefer-number-properties.md","docs/rules/prefer-object-define-properties.md","docs/rules/prefer-object-destructuring-defaults.md","docs/rules/prefer-object-from-entries.md","docs/rules/prefer-object-iterable-methods.md","docs/rules/prefer-observer-apis.md","docs/rules/prefer-optional-catch-binding.md","docs/rules/prefer-path2d.md","docs/rules/prefer-private-class-fields.md","docs/rules/prefer-promise-static-methods.md","docs/rules/prefer-promise-try.md","docs/rules/prefer-promise-with-resolvers.md","docs/rules/prefer-prototype-methods.md","docs/rules/prefer-query-selector.md","docs/rules/prefer-queue-microtask.md","docs/rules/prefer-reflect-apply.md","docs/rules/prefer-regexp-escape.md","docs/rules/prefer-regexp-test.md","docs/rules/prefer-response-static-json.md","docs/rules/prefer-scoped-selector.md","docs/rules/prefer-set-has.md","docs/rules/prefer-set-methods.md","docs/rules/prefer-set-size.md","docs/rules/prefer-short-arrow-method.md","docs/rules/prefer-short-escape-sequences.md","docs/rules/prefer-simple-condition-first.md","docs/rules/prefer-simple-sort-comparator.md","docs/rules/prefer-simplified-conditions.md","docs/rules/prefer-single-array-predicate.md","docs/rules/prefer-single-call.md","docs/rules/prefer-single-object-destructuring.md","docs/rules/prefer-single-replace.md","docs/rules/prefer-smaller-scope.md","docs/rules/prefer-split-limit.md","docs/rules/prefer-spread.md","docs/rules/prefer-string-match-all.md","docs/rules/prefer-string-pad-start-end.md","docs/rules/prefer-string-raw.md","docs/rules/prefer-string-repeat.md","docs/rules/prefer-string-replace-all.md","docs/rules/prefer-string-slice.md","docs/rules/prefer-string-starts-ends-with.md","docs/rules/prefer-string-trim-start-end.md","docs/rules/prefer-structured-clone.md","docs/rules/prefer-switch.md","docs/rules/prefer-temporal-conversion.md","docs/rules/prefer-temporal.md","docs/rules/prefer-ternary.md","docs/rules/prefer-then-catch.md","docs/rules/prefer-toggle-attribute.md","docs/rules/prefer-top-level-await.md","docs/rules/prefer-type-error.md","docs/rules/prefer-type-literal-last.md","docs/rules/prefer-uint8array-base64.md","docs/rules/prefer-uint8array-hex.md","docs/rules/prefer-unary-minus.md","docs/rules/prefer-unicode-code-point-escapes.md","docs/rules/prefer-url-can-parse.md","docs/rules/prefer-url-href.md","docs/rules/prefer-url-search-parameters.md","docs/rules/prefer-while-loop-condition.md","docs/rules/relative-url-style.md","docs/rules/require-array-join-separator.md","docs/rules/require-array-sort-compare.md","docs/rules/require-css-escape.md","docs/rules/require-frontmatter-fields.md","docs/rules/require-module-attributes.md","docs/rules/require-module-specifiers.md","docs/rules/require-number-to-fixed-digits-argument.md","docs/rules/require-passive-events.md","docs/rules/require-post-message-target-origin.md","docs/rules/require-proxy-trap-boolean-return.md","docs/rules/require-text-decoder-streaming.md","docs/rules/single-line-block-comment-style.md","docs/rules/string-content.md","docs/rules/switch-case-braces.md","docs/rules/switch-case-break-position.md","docs/rules/template-indent.md","docs/rules/text-encoding-identifier-case.md","docs/rules/throw-new-error.md","docs/rules/try-complexity.md"],"skills":{"AGENTS.md":"# Agents\n\n## Philosophy\n\nKeep rules simple. Target common patterns, skip rare edge cases rather than overcomplicating the rule.\n\n### Out of scope\n\nThese constructs are intentionally unsupported. Do not add machinery to handle them:\n\n- **`Array` subclasses** — Receiver checks treat `new Foo()` as non-array, so `class Foo extends Array {}` is missed. Do not add class heritage resolution for this. (`Error` subclasses are different: `createTypeCheckers` resolves class heritage by default.)\n- **Shadowed built-ins** — Receiver checks may recognize built-ins by name without resolving scope. Do not add scope resolution for shadowed constructors.\n- **BigInt typed-array chains** — Only direct constructors, static `.from()`/`.of()`, and explicit types are recognized. Do not add flow analysis for method chains.\n\n## Rule anatomy\n\nRules export a default config object with `create` and `meta`. The `create` function uses `context.on(NodeType, listener)` to register visitors (this is the Unicorn-specific API, not standard ESLint). See the [ESLint custom rules guide](https://eslint.org/docs/latest/extend/custom-rules) for the underlying API.\n\nKey differences from standard ESLint:\n\n- Use `context.on('NodeType', listener)` and `context.onExit('NodeType', listener)` instead of returning a visitor object.\n- Listeners return or yield problem objects (`{node, messageId, fix, suggest, data}`) directly. The adapter calls `context.report()` for you.\n- Fix functions receive `(fixer, {abort})`. Call `abort()` to bail out of an unfixable case.\n\n```js\nconst MESSAGE_ID = 'rule-name';\n\nconst messages = {\n\t[MESSAGE_ID]: 'Error message with {{placeholder}}.',\n};\n\n/** @param {import('eslint').Rule.RuleContext} context */\nconst create = context => {\n\tcontext.on('CallExpression', node => {\n\t\treturn {\n\t\t\tnode,\n\t\t\tmessageId: MESSAGE_ID,\n\t\t\tdata: {placeholder: 'value'},\n\t\t\tfix: fixer => fixer.replaceText(node, 'replacement'),\n\t\t};\n\t});\n};\n\n/** @type {import('eslint').Rule.RuleModule} */\nconst config = {\n\tcreate,\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Enforce …',\n\t\t\trecommended: true, // 'unopinionated' (safest, in both presets), true (in recommended only), or false (opt-in)\n\t\t},\n\t\tfixable: 'code', // or omit; add hasSuggestions: true for suggestions\n\t\tschema: [],\n\t\tdefaultOptions: [{option: 'default'}], // merged automatically\n\t\tmessages,\n\t},\n};\nexport default config;\n```\n\nOptions are accessed via `context.options[0]`. Use `meta.defaultOptions` for defaults (no manual merging).\n\n### `recommended` config level\n\n`meta.docs.recommended` picks the preset that enables the rule. `'unopinionated'` does NOT mean \"too opinionated\" — it means the opposite:\n\n- **`'unopinionated'`** — Uncontroversial; in both `unopinionated` and `recommended` (the former is a subset). Safest bucket and the default for new rules.\n- **`true`** — A more opinionated call, still on by default. In `recommended` only.\n- **`false`** — Off by default, only in `all`. For niche or opt-in rules.\n\n| `recommended` | `unopinionated` | `recommended` config | `all` |\n|---|---|---|---|\n| `'unopinionated'` | on | on | on |\n| `true` | off | on | on |\n| `false` (or omitted) | off | off | on |\n\nSo a rule too opinionated or niche for broad use is `false`, never `'unopinionated'`. If unsure which level fits, share your recommendation and ask.\n\nName boolean options in the positive `check*` form (for example, `checkProperties`), never the negated `ignore*`/`skip*` form, so option naming stays consistent across rules. This does not apply to array/pattern options like `ignore` (a list of patterns to ignore), which follow ESLint's own conventions.\n\n### Helper naming\n\nName helpers after what they return or do:\n\n- `is*`/`has*`/`should*`/`can*`/`needs*` must return booleans. Prefer explicit `false` over `undefined` in predicate helpers.\n- `get*Problem` returns one problem object or `undefined`; `get*Problems` returns/yields multiple problem objects.\n- `report*` should call `context.report()` directly.\n- Avoid `check*` for private helpers. Reserve `check*` for public boolean options, like `checkProperties`.\n- Do not combine reporting/yielding with a predicate return. Split into a problem builder and a boolean at the call site.\n\n## Rule languages\n\nEvery new rule should declare the official [`meta.languages`](https://eslint.org/docs/latest/extend/custom-rules#rule-languages) field, in `\"plugin/language\"` form, one per line: `['js/js']` for JavaScript/TypeScript-only rules (most), or the languages it supports (for example `['js/js', 'css/css']`, or `['*']` for any file type).\n\nAvailable identifiers:\n\n- `js/js` — JavaScript and TypeScript\n- `css/css` — [`@eslint/css`](https://github.com/eslint/css)\n- `json/json`, `json/jsonc`, `json/json5` — [`@eslint/json`](https://github.com/eslint/json)\n- `markdown/commonmark`, `markdown/gfm` — [`@eslint/markdown`](https://github.com/eslint/markdown)\n- `html/html` — [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint)\n- `toml/toml`: [`eslint-plugin-toml`](https://github.com/ota-meshi/eslint-plugin-toml)\n- `yml/yaml` — [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml)\n\nMost rules visit JavaScript AST nodes, so `js/js` is all they can support. But when a rule's logic is language-agnostic (filename, raw text, comments, or disable directives), support as many languages as is feasible. Root node types differ per language (`Program` for JS/TS, HTML, TOML, and YAML, `StyleSheet` for CSS, `Document` for JSON, `root` for Markdown), so use `onRoot(context, listener)` to run on every root and `getComments(context)` for cross-language comments (both from `rules/utils/`). For reference, see `prefer-https` (`['*']`, raw-text scan) and `no-empty-file` (per-language root handlers).\n\nCSS-only rules (`['css/css']`) belong in [`eslint-cssicorn`](https://github.com/sindresorhus/eslint-cssicorn), not here.\n\n### TOML\n\n- The `Program` body always contains a `TOMLTopLevelTable`, even in empty files. Its `body` contains key/value pairs and table declarations; an empty named table counts as content.\n- `TOMLValue` nodes distinguish strings, integers, floats, and dates/times through `kind`. Read numeric source text to preserve precision and signs; skip `inf` and `nan` when grouping digits. Do not convert `1.0` to `1`, which changes the TOML type.\n- The parser exposes `#` comments as `Block` nodes. Use `getComments(context)` and preserve `#` when fixing comments. `sourceCode.parserServices?.isTOML` identifies TOML.\n- Basic strings and basic quoted keys interpret escapes; literal strings do not. `escape-case` demonstrates escape-preserving edits. `string-content` checks decoded string values only, leaves keys unchanged, and writes double-quoted basic strings. Its serializer uses `JSON.stringify()` plus DEL escaping and skips fixes for unpaired surrogates.\n- Use `languages.toml` from `test/utils/test.js` in snapshot cases. For regular rule-tester tests, use `language: languages.toml.language` and `plugins: languages.toml.plugins`. Test fixes and suggestions with the TOML parser, including literal/multiline strings and comments.\n\n## Reusable utilities\n\n`../eslint-node-test` adapts its infrastructure (rule adapter, snapshot test harness, doc generation) from this plugin. When changing shared patterns here (rule anatomy, testing conventions, autofix rules), consider whether the equivalent should be ported over there.\n\n`../eslint-cssicorn` shares CSS rule utilities with this plugin (for example, `rules/shared/css-shorthand-properties.js`). Keep them in sync: when you change a CSS utility in one plugin, make the same change in the other.\n\nBefore writing helpers, check these directories:\n\n- **`rules/ast/`** - AST node type checks: `isMethodCall`, `isCallExpression`, `isMemberExpression`, `isFunction`, `isStringLiteral`, etc.\n- **`rules/utils/`** - General utilities: `needsSemicolon`, parenthesis helpers (`shouldAddParenthesesToMemberExpressionObject`, etc.), `isNodeMatches`, `getCallExpressionTokens`, `isSameReference`, `getReferences`, etc.\n- **`rules/fix/`** - Fixer helpers: `removeArgument`, `removeMethodCall`, `replaceArgument`, `replaceReferenceIdentifier`, `removeParentheses`, `replaceTemplateElement`, `switchCallExpressionToNewExpression`, etc.\n- **`rules/shared/`** - Shared rule logic for rules that share patterns (e.g., `simple-array-search-rule.js`).\n\nImport from the barrel `index.js` in each directory (e.g., `import {isMethodCall} from './ast/index.js'`).\n\nWhen matching a string's value, use `getStaticStringValue()` so quoted strings and untagged template literals without expressions behave the same. Check against `undefined` when empty strings are supported. Keep `isStringLiteral()` and literal node checks for syntax-specific behavior, such as quotes, escapes, directives, and static import/export sources. Audit fixers separately: template nodes have no `.value` or `.raw`, and generated quoted strings must escape the decoded value.\n\nAlso check `../eslint-node-test/rules/ast/`, `../eslint-node-test/rules/utils/`, and `../eslint-node-test/rules/fix/` — some helpers there were adapted from here and may have picked up fixes or edge cases worth porting back.\n\nWhen at least two rules need the same non-trivial logic, put it in a shared utility (`rules/utils/` for general helpers, `rules/shared/` for shared rule logic) and use it from each rule instead of duplicating it. This also applies when you write logic that an existing rule already has: extract it from that rule and use it in both. Keep trivial or rule-specific helpers local.\n\nAlso use `@eslint-community/eslint-utils` for helpers like `findVariable`, `getStaticValue`, `hasSideEffect`, `getPropertyName`, and token predicates (`isCommaToken`, `isSemicolonToken`, etc.).\n\nMost commonly used utilities:\n\n- **`isMethodCall`** - The most used helper. Check if a node is a method call matching specific criteria.\n- **`isParenthesized`**, **`getParenthesizedRange`** (from `rules/utils/`) - Handle extra parentheses around nodes.\n- **`needsSemicolon`** - Check if a semicolon is needed before a replacement.\n- **`isValueNotUsable`** - Check if a call expression's return value is unused (safe to change behavior).\n- **`hasSideEffect`** (from `@eslint-community/eslint-utils`) - Check if a node has side effects, important for safe autofixes.\n- **`findVariable`** (from `@eslint-community/eslint-utils`) - Resolve a variable's scope binding.\n- **`getStaticValue`** (from `@eslint-community/eslint-utils`) - Get a node's static value at lint time.\n- **`fixSpaceAroundKeyword`**, **`removeMethodCall`**, **`removeArgument`** - Common fix helpers.\n\n## Code path analysis\n\nUse [ESLint's code path analysis API](https://eslint.org/docs/latest/extend/code-path-analysis) when a rule needs to know whether control flow always exits a branch or function body (e.g., via `return`, `throw`, `break`, `continue`, exhaustive `switch`, infinite loop). CPA is more accurate than manual AST walking because it handles complex constructs like `try`/`catch`/`finally`, labeled breaks, and unreachable code after infinite loops.\n\nWhen to use CPA instead of manual AST walking:\n\n- **Checking if an `if` branch always exits** — Use `trackBranchExits` from `rules/utils/`. It registers CPA event listeners and returns a predicate `(branch) => boolean`. Query it after the `IfStatement` has exited (use `context.onExit`). Used by `no-useless-else`, `no-declarations-before-early-exit`, `prefer-else-if`.\n- **Checking if a function body always exits** — Track segments per code path using `onCodePathStart`/`onCodePathEnd`/`onCodePathSegmentStart`/`onCodePathSegmentEnd`/`onUnreachableCodePathSegmentStart`/`onUnreachableCodePathSegmentEnd`. Snapshot segment reachability at `BlockStatement:exit` for function bodies (before code path segments end). See `require-proxy-trap-boolean-return` for the pattern.\n\nKey implementation notes:\n\n- Use a **per-code-path segment stack** (`segmentSetStack`) so nested functions don't pollute the enclosing path's state.\n- When checking CPA data from a parent node, use `context.onExit` (not `context.on`) so inner code paths have been fully analyzed.\n- At `onCodePathEnd`, all segments have already ended, so `currentSegments()` is empty. Snapshot reachability at the AST node exit (e.g., `BlockStatement:exit`) instead.\n- `trackBranchExits` uses a `prevSegments`-based check: a branch \"falls through\" if any post-if merge segment has a `prevSegment` in the branch's terminal segment set.\n\nWhen NOT to use CPA:\n\n- Simple last-statement checks (e.g., \"does the last statement return?\") — just check `node.type`.\n- Collecting return statements or associating them with functions — a simple function stack or AST walk is fine.\n- Fixer logic that only needs to know \"return or throw\" in the last position — no CPA needed.\n\n## Auto-generated files\n\n- **`rules/index.js`** is auto-generated. Never edit it by hand. Run `npm run create-rules-index-file` to regenerate after adding or removing rules.\n- **Non-JavaScript language table** in `readme.md` is generated from `meta.languages`. Run `npm run fix:non-js-languages` after changing language support; add new language columns in `scripts/create-non-js-languages-list.js`.\n- **Doc headers** in `docs/rules/<rule>.md` (everything above `<!-- end auto-generated rule header -->`) are auto-generated by `eslint-doc-generator`. Do not edit them. Run `npm run fix:eslint-docs` to update.\n\nOn rebase, `rules/index.js` and the `readme.md` rules table almost always conflict because other rules were added meanwhile. Don't hand-resolve `rules/index.js` — take either side, then run `npm run create-rules-index-file`. For `readme.md`, keep both rows and re-sort the table alphabetically.\n\n## Documentation\n\nKeep rule documentation succinct, especially sections about limitations and caveats. Focus on practical information users need to understand and use the rule.\n\nDo not use Markdown tables in rule documentation. Use prose, lists, or code examples instead.\n\nUse JavaScript syntax for configuration examples, not JSON-style quoted keys and strings, unless the example is specifically JSON.\n\nFor rule documentation examples, prefer one failing (`// ❌`) example followed by one corresponding passing (`// ✅`) example in each code block whenever possible. Use separate blocks for distinct cases instead of grouping all failing and passing examples together.\n\n## Testing\n\nTests should be comprehensive with many edge cases, but no duplicate coverage. Add lots of focused edge-case tests for matching and fixes/suggestions. Add tests for edge cases the rule intentionally ignores to document the behavior.\n\nTests use the built-in `node:test` runner. Prefer `test.snapshot()` which auto-generates snapshots for errors, fixes, and suggestions:\n\n```js\nimport {getTester} from './utils/test.js';\nconst {test} = getTester(import.meta);\n\ntest.snapshot({\n\tvalid: ['validCode'],\n\tinvalid: ['invalidCode'],\n});\n```\n\nOther test modes: `test.typescript()` and `test.vue()` set the parser for all cases in the block. For individual TypeScript cases within a normal `test.snapshot()`, use `{code, parser: parsers.typescript}` instead. Import `parsers` from `./utils/test.js`.\n\n- **Never run integration tests** (`test/integration/test.js`). They are too slow for development.\n- **While developing, only run targeted tests**: `node --test test/rule-name.js`. Do not run `npm test` or the full suite until all changes are complete.\n- **Only run the full test suite (`npm test`) once at the very end** to confirm everything passes.\n- **For new rules, run dogfooding before pushing**: `npm run run-rules-on-codebase`. Re-run it after each fix — fixes to rule logic often surface new violations elsewhere. Delete any scratch files first (e.g. in `.ai-temporary/`), or the dogfooding run lints them too.\n- Create or update snapshots: `node --test --test-update-snapshots test/rule-name.js`. A new snapshot case fails until you do this. Snapshots are saved in `test/snapshots/rule-name.js.snapshot`.\n- Focus a single case: wrap with `test.only('code')` or `test.only({code, options})`, and run with `node --test --test-only test/rule-name.js` (remove before committing). Never update snapshots while `only` is used: the update rewrites the whole snapshot file, so the snapshots of the skipped cases are deleted.\n- Use `t.assert.*` inside tests, with the strict methods (`strictEqual`, `deepStrictEqual`), because `t.assert` is loose mode. Helpers outside tests import `node:assert/strict`.\n- For non-snapshot tests, use `test()` with explicit `errors` and `output`\n\n### Edge cases to test\n\nInclude test cases for these when relevant to the rule:\n\n- **TypeScript** - Type assertions (`foo as Bar`, `<Bar>foo`), non-null assertions (`foo!`), `satisfies`, generics. Verify both matching and fixer/suggestion output, including optional chaining behavior and ASI protection when the output can start with `(` or `[`. Use `{code, parser: parsers.typescript}`. For rules that use type information (e.g. `isBoolean`, `parserServices.getTypeAtLocation`), test three tiers where it makes sense: plain JS, TS with only type annotations (syntax-only, via `parsers.typescript`), and TS with full type info (via the `typeAware` helper with `projectService: {allowDefaultProject: ['*.ts']}`). See `test/no-unsafe-property-key.js` for the `typeAware` pattern.\n- **JSX** - JSX expressions and fragments, if the rule targets patterns that can appear in JSX.\n- **Comments** - Inline and block comments inside the targeted node, to verify fixes don't drop them.\n- **Parenthesized expressions** - Extra parentheses around the target: `(foo).bar()`.\n- **Nested/chained** - The pattern appearing inside other expressions or chained calls.\n- **Computed properties** - `obj[method]()` vs `obj.method()`.\n- **Tagged templates** - `` tag`string` ``.\n- **Template literals without expressions** - Test quoted and backtick forms wherever matching depends on a string's value, including mixed forms, escaped values, and empty strings. Test interpolated and tagged templates separately; they are not static strings.\n- **Optional chaining** - `foo?.bar()`, `foo?.bar?.baz`.\n- **Spread** - `[...foo]`, `{...foo}`, `fn(...args)`.\n- **Destructuring** - The pattern inside destructuring assignments or parameters.\n- **Return value used vs unused** - `const x = foo.bar()` vs `foo.bar()` as a statement. Some fixes are only safe when the return value is unused (see `isValueNotUsable`).\n\n## Linting\n\nCI lints with **ESLint**, not `xo` — a clean `npx xo` run does not mean CI passes.\n\nRun `npm run fix` (or `npm run fix:js` for JS only) — it auto-fixes and reports whatever remains. Prefer it over hand-fixing errors one at a time.\n\nLint enforces single quotes (`avoidEscape: false`, no template literals). Don't write backtick strings in test cases unless you need interpolation — `--fix` can't convert a backtick string that contains a `'`, so you'd have to fix it by hand.\n\n## Autofix\n\nAlways try to provide an autofix if it cannot change runtime behavior. If an autofix could change runtime behavior, try to provide a suggestion instead.\n\nDo not complicate autofixes to handle shadowed built-in globals like `Number`, `Math`, `parseInt`, or `parseFloat`. Treat that as unsupported unless the rule already has a simple, local scope-safety check for another reason.\n\nDo not complicate autofixes to preserve Proxy or accessor side effects. Treat that as unsupported.\n\nDo not block reports, suggestions, or autofixes only to preserve sparse array holes. Treat array holes as unsupported.\n\nDo not turn all of a rule's autofixes into suggestions because of a rare evaluation-order case. These cases are unsupported: temporal dead zone reads, `valueOf`/`toString` coercion order, and when a side-effect-free expression is evaluated. Keep the autofix for the common pure form (for example `new Set([...x])`, `array.some(x => x === value)`, or a pure inline callback). Use a suggestion only when a real side effect can change the result, such as a call, assignment, update, `await`, `yield`, or a callback that is not proven pure. When a fix changes evaluation order, add a test that proves the most common form of the pattern is still autofixed.\n\nWhen writing fix functions:\n\n1. **Comments** - Keep reporting unless comments affect rule semantics; let ESLint handle disable directives. Withhold edits that remove or move comments using `getCommentSafeProblem()` or `abort()`. Preserve safe token edits.\n2. **Parentheses** - Replacing `foo` in `foo.bar()` with a complex expression may need wrapping: `(a + b).bar()`. Use helpers from `rules/utils/` like `shouldAddParenthesesToMemberExpressionObject`.\n3. **Semicolons** - If a fix makes a statement start with `[` or `(`, check `needsSemicolon()` and prepend `;` if needed.\n4. **Spacing** - Replacing `{foo}` with an identifier may merge tokens: `const{foo}` becomes `constfoo`. Add spaces when a symbol-boundary becomes a letter-boundary.\n5. **Generator fixes** - Use `* fix(fixer) { yield ... }` for multi-step fixes.\n6. **Suggestions** - Use `suggest` array with `messageId` and `fix` when autofix could change runtime behavior. Set `hasSuggestions: true` in meta.\n7. **Indentation and line endings** - ESLint inserts fix text verbatim and does not re-indent it. Never hardcode `\\t` or `\\n` when building new lines. Use the helpers in `rules/utils/`: `getLineIndent(node, context)` for the indentation of the line a node is on, `getIndentUnit(context)` for one level of the file's indentation, `getLinebreak(context)` for the file's line ending, and `reindentText(text, sourceIndent, targetIndent)` to move multi-line text to another indentation. Test fixes with space-indented and CRLF input, not only tabs and LF.\n\n## Rule naming\n\nUse a clear prefix that signals intent (see [ESLint built-in rules](https://eslint.org/docs/latest/rules/) for inspiration):\n\n- **`no-`** - Disallow something: `no-array-reduce`, `no-await-in-promise-methods`\n- **`prefer-`** - Suggest a better alternative: `prefer-array-flat-map`, `prefer-set-has`\n- **`require-`** - Mandate something is present: `require-array-join-separator`\n- **`consistent-`** - Enforce a single consistent style: `consistent-destructuring`\n- **No prefix** - Enforce a specific pattern: `error-message`, `filename-case`, `throw-new-error`\n\nName after the target construct, not the fix. Be specific: `no-array-method-this-argument` not `no-this-argument`.\n\n## Creating a new rule\n\n1. Run `npm run create-rule` to scaffold the rule file, test file, and doc file. This also regenerates `rules/index.js` and updates doc headers.\n2. Write tests in `test/<rule>.js` before implementing the rule.\n3. Implement the rule in `rules/<rule>.js`.\n4. Write documentation in `docs/rules/<rule>.md` (below the auto-generated header).\n5. Run `node --test --test-update-snapshots test/<rule>.js` to create the snapshots, review them, then run `node --test test/<rule>.js` to verify tests pass.\n6. Before pushing, run lint (`npm run lint:js`, which runs `eslint` — see [Linting](#linting)), dogfooding (`npm run run-rules-on-codebase`), and then `npm test`. If dogfooding finds intentional internal patterns, disable the rule in `eslint.dogfooding.config.js` instead of adding repo-specific heuristics.\n\n## Commit message format\n\nFollow these conventions:\n\n- **New rule**: `` Add `rule-name` rule ``\n- **Fix/improve existing rule**: `` `rule-name`: Short description ``\n- **General fix**: `Fix short description`\n- **Add option to rule**: `` `rule-name`: Add `optionName` option ``\n- **Drop a rule**: `` Drop `rule-name` rule ``\n\nAlways use backticks around rule names and option names in commit messages.\n","CLAUDE.md":"AGENTS.md","docs/rules/better-dom-traversing.md":"# better-dom-traversing\n\n📝 Prefer better DOM traversal APIs.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPrefer more readable and robust DOM traversal APIs.\n\nUse named first-child properties instead of positional access, selectors instead of positional child traversal, `.closest()` instead of repeated parent traversal, and merged `.querySelector()` calls when static selectors can be combined.\n\nThis rule is syntax-based and reports common DOM traversal patterns. Suggestions are intentionally manual because the replacement can change behavior in some cases, such as `undefined` versus `null` for empty child collections, exact-depth parent traversal versus selector-based ancestor lookup, or chained `querySelector()` calls that only search inside the first matching element.\n\n`props.children` access is ignored because it is component data, not DOM traversal.\n\n## Examples\n\n```js\n// ❌\nelement.childNodes[0];\n\n// ✅\nelement.firstChild;\n```\n\n```js\n// ❌\nelement.children[0];\n\n// ✅\nelement.firstElementChild;\n```\n\n```js\n// ❌\nelement.children[2];\n\n// ✅\nelement.querySelector(':scope selector');\n```\n\n```js\n// ❌\nelement.parentElement.parentElement;\n\n// ✅\nelement.closest('selector');\n```\n\n```js\n// ❌\nelement.querySelector('a').querySelector('b');\n\n// ✅\nelement.querySelector(':scope a b');\n```\n","docs/rules/catch-error-name.md":"# catch-error-name\n\n📝 Enforce a specific parameter name in catch clauses.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent name for caught errors across:\n\n- `try/catch` clauses\n- `.catch(…)` Promise handlers\n- `.then(…, rejectionHandler)` Promise handlers\n\nUsing one recognizable name makes error handlers easier to scan and avoids renaming the same concept across callback styles.\n\nThe desired parameter name is [configurable](#name), but defaults to `error`.\n\nThe following names are ignored:\n\n- `_`, but only if the error is not used.\n- Descriptive names, for example, `fsError` or `authError`.\n- Names matching [`options.ignore`](#ignore).\n\n## Examples\n\n```js\n// ❌\ntry {} catch (badName) {}\n\n// ✅\ntry {} catch (error) {}\n```\n\n```js\n// ❌\npromise.catch(badName => {});\n\n// ✅\npromise.catch(error => {});\n```\n\n```js\n// ❌\npromise.then(undefined, badName => {});\n\n// ✅\npromise.then(undefined, error => {});\n```\n\n```js\n// ❌\ntry {} catch (_) {\n\tconsole.log(_);\n}\n\n// ✅\n// Underscore is allowed when the error is not used\ntry {} catch (_) {\n\t// error is not used\n}\n```\n\n```js\n// ✅\n// Descriptive name is allowed\ntry {} catch (fsError) {}\n```\n\n```js\n// ✅\n// `error_` is allowed because of shadowed variables\ntry {} catch (error_) {\n\tconst error = new Error('🦄');\n}\n```\n\n## Options\n\n### name\n\nType: `string`\\\nDefault: `'error'`\n\nYou can set the `name` option like this:\n\n```js\n'unicorn/catch-error-name': [\n\t'error',\n\t{\n\t\tname: 'exception',\n\t},\n]\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nThis option lets you specify a regex pattern for matches to ignore.\n\nWhen a string is given, it's interpreted as a regular expression inside a string.\n\n```js\n'unicorn/catch-error-name': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'^error\\\\d*$',\n\t\t\t/^ignore/i,\n\t\t],\n\t},\n]\n```\n\nWith `^unicorn$`, this would fail:\n\n```js\ntry {} catch (pony) {}\n```\n\nAnd this would pass:\n\n```js\ntry {} catch (unicorn) {}\n```\n\n## Tip\n\nIn order to avoid shadowing in nested catch clauses, the auto-fix rule appends underscores to the identifier name.\n","docs/rules/class-reference-in-static-methods.md":"# class-reference-in-static-methods\n\n📝 Enforce consistent class references in static methods.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces either dynamic static dispatch with `this` and `super`, or direct references with class names.\n\nChoosing one style makes it clear whether a static method is intended to follow subclass dispatch or stay tied to a specific class.\n\nBy default, it prefers `this` and `super`.\n\n## Examples\n\n```js\n// ❌\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tFoo.qux();\n\t\tBar.qux();\n\t}\n}\n\n// ✅\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tthis.qux();\n\t\tsuper.qux();\n\t}\n}\n```\n\nWith `{preferThis: false, preferSuper: false}`:\n\n```js\n// ❌\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tthis.qux();\n\t\tsuper.qux();\n\t}\n}\n\n// ✅\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tFoo.qux();\n\t\tBar.qux();\n\t}\n}\n```\n\n## Options\n\nType: `object`\n\n### preferThis\n\nType: `boolean`\\\nDefault: `true`\n\nPrefer `this` over the current class name in static methods.\n\n### preferSuper\n\nType: `boolean`\\\nDefault: `true`\n\nPrefer `super` over the superclass name in static methods.\n","docs/rules/comma-spacing.md":"# comma-spacing\n\n📝 Enforce consistent spacing before and after commas in JSON and SOML.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces no whitespace before commas and exactly one ASCII space after commas on the same line in JSON, JSONC, and JSON5 using [`@eslint/json`](https://github.com/eslint/json), and in SOML using [`eslint-soml`](https://github.com/soml-lang/eslint-soml).\n\nPreserves line breaks and surrounding whitespace, including comma-first layouts. Ignores spacing after trailing commas directly before `]` or `}`, but still checks spacing before them.\n\nChecks spacing between commas and adjacent comments, preserving comment contents and whitespace beyond them. For example, `[1,/* comment */]` becomes `[1, /* comment */]`. Commas inside strings and comments are ignored.\n\nThis rule has no options and does not support `eslint-plugin-jsonc` languages.\n\nFor JavaScript and TypeScript, use [`@stylistic/comma-spacing`](https://eslint.style/rules/comma-spacing), which allows multiple spaces after commas.\n\n## Examples\n\n### Incorrect\n\n```json\n[1 ,2,  3]\n```\n\n```json\n{\"first\": 1,\"second\": 2}\n```\n\n### Correct\n\n```json\n[1, 2, 3]\n```\n\n```json\n{\"first\": 1, \"second\": 2}\n```\n\n```jsonc\n[1, /* Keep comment */2]\n```\n\n```json5\n[1, 2,]\n```\n","docs/rules/comment-content.md":"# comment-content\n\n📝 Enforce better comment content.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces curated replacements in comments. It is useful for common name, brand, and acronym casing corrections such as `nodejs` → `Node.js`, and for project-specific prose preferences.\n\nThis rule is not a spellchecker. It only checks known replacement patterns.\n\nIt only reports one replacement per comment at a time.\n\nIt focuses on prose-like comment text and skips obvious non-prose regions such as code snippets, including commented-out multi-line code, links, paths, structured data, and command examples.\n\nText inside backticks is ignored, including fenced code blocks in block comments. Use backticks for literal commands and identifiers.\n\n```js\n// ✅\n// Run `git config --list`.\n```\n\nIn JSDoc comments, it skips structured tag syntax such as parameter names, type expressions, and symbol references, while continuing to check prose in tag descriptions.\n\n## Examples\n\n```js\n// ❌\n// nodejs uses javascript.\n\n// ✅\n// Node.js uses JavaScript.\n```\n\n```js\n// ❌\n// See the github issue.\n\n// ✅\n// See the GitHub issue.\n```\n\n```js\n// ❌\n// The application stores png files.\n\n// ✅\n// The app stores PNG files.\n```\n\n## Options\n\nType: `object`\n\n### checkUniformCase\n\nType: `boolean`\\\nDefault: `true`\n\nBy default, the rule re-cases matching tokens regardless of their case, including all-lowercase (`json`) and all-uppercase (`JSON`) ones.\n\nPass `checkUniformCase: false` to only correct tokens that already mix upper- and lower-case, such as `Github` → `GitHub`. All-lowercase and all-uppercase tokens are then left alone, as their casing is often intentional. Replacements that change the actual letters (such as `application` → `app`, or your own typo fixes) still apply regardless of case.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\tcheckUniformCase: false,\n\t},\n]\n```\n\n### replacements\n\nType: `object`\n\nYou can extend the default replacements by passing the `replacements` option.\n\nThe key is treated as a regex. By default, custom replacements are case-sensitive.\n\nDefault replacement patterns treat Unicode letters, marks, numbers, and underscores as part of a word. Custom patterns are used exactly as written.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\t'\\\\bteh\\\\b': 'the',\n\t\t\t'\\\\bto do\\\\b': {\n\t\t\t\treplacement: 'TODO',\n\t\t\t\tcaseSensitive: false,\n\t\t\t},\n\t\t\t'\\\\bnode\\\\.?js\\\\b': false,\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `extendDefaultReplacements: false` to override the default replacements completely.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\textendDefaultReplacements: false,\n\t\treplacements: {\n\t\t\t'\\\\bteh\\\\b': 'the',\n\t\t},\n\t},\n]\n```\n","docs/rules/consistent-arrow-return-style.md":"# consistent-arrow-return-style\n\n📝 Enforce a consistent return style for multiline arrow function bodies.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUse concise bodies when the expression fits on one line and an explicit `return` when it spans multiple lines. A line break between `=>` and a single-line expression is ignored.\n\nOnly blocks with a single `return` and a single-line argument are converted. Blocks with other statements, bare returns, or multiline return expressions are ignored.\n\nFixes are omitted when reindenting could change string, template literal, or JSX text, or when removing the block could change how the following token is parsed.\n\nThis rule is an alternative to [`arrow-body-style`](https://eslint.org/docs/latest/rules/arrow-body-style). Do not enable both rules together.\n\n## Examples\n\n```js\n// ❌\nconst getValue = () => getValueFromServer(\n\turl,\n\toptions,\n);\n\n// ✅\nconst getValue = () => {\n\treturn getValueFromServer(\n\t\turl,\n\t\toptions,\n\t);\n};\n\n// ❌\nconst getValue = () => {\n\treturn value;\n};\n\n// ✅\nconst getValue = () => value;\n\n// ❌\nconst getObject = () => ({\n\tvalue,\n});\n\n// ✅\nconst getObject = () => {\n\treturn {\n\t\tvalue,\n\t};\n};\n\n// ❌ No fix: contains a comment.\nconst getValue = () => /* Keep this comment. */\n\tgetValueFromServer(\n\t\turl,\n\t\toptions,\n\t);\n```\n","docs/rules/consistent-assert.md":"# consistent-assert\n\n📝 Enforce consistent assertion style with `node:assert`.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPrefer `assert.ok()` over `assert()` for its explicit intent and better readability. It aligns with other assert methods, ensuring consistency and making code easier to maintain and understand.\n\n## Examples\n\n```js\nimport assert from 'node:assert/strict';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n\n```js\nimport assert from 'node:assert';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n\n```js\nimport {strict as assert} from 'node:assert';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n","docs/rules/consistent-boolean-name.md":"# consistent-boolean-name\n\n📝 Enforce consistent naming for boolean names.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nBy default, this rule checks boolean variables, parameters, and functions. Object, class, and TypeScript property and method names are ignored unless enabled with their respective options.\n\nEach `check*` option accepts one of these modes:\n\n- `always`: require prefixes for booleans and reject misleading prefixes on non-booleans.\n- `prohibit`: only reject misleading prefixes on non-booleans.\n- `never`: skip the occurrence entirely.\n\nBoolean names should start with a prefix that makes the boolean meaning clear.\n\nNames that start with a boolean prefix should also refer to booleans or boolean-returning functions. Unknown values are ignored.\n\nFunctions and callable type annotations returning `boolean`, `Promise<boolean>`, `PromiseLike<boolean>`, or unions of these are considered boolean-returning, whether or not the function is `async`.\n\nGetters returning promises are treated as non-boolean values.\n\nWhen type information is unavailable, a type annotation is needed to require prefixes for promise-returning functions.\n\nConfigured wrapper bindings may use boolean prefixes when a configured property or method provides a boolean-like value. This applies only to variables and parameters that are not reassigned.\n\nReports for property and method names, and reports for non-boolean values using boolean prefixes, do not provide rename suggestions.\n\nThe default prefixes are:\n\n- `is`\n- `are`\n- `has`\n- `have`\n- `can`\n- `should`\n- `was`\n- `were`\n- `does`\n- `did`\n- `will`\n- `requires`\n\nThe `do` prefix is excluded because it also starts action names like `doWork()`, which would then be reserved for boolean-like values. Use `doesChecksPass` instead of `doChecksPass`, or `didChecksPass` for a past result; identifiers need not follow English grammar. To allow `do`, set `prefixes: {do: true}`.\n\nThe plural prefixes (`are`, `have`, `were`) allow names for boolean collections, like `areFilesValid`.\n\nThe prefix must be a distinct word part. `isReady`, `is_ready`, and `IS_READY` are allowed, but `island` is not considered to have the `is` prefix.\n\nReact hook function bindings are checked after the required `use` prefix. For example, `useIsReady` is treated as a boolean hook name, while `useReady` is not. `ignore` patterns still match the original source name, like `useReady`.\n\nReact refs initialized with a boolean-like value may use boolean prefixes when the binding name ends in `Ref` or `Reference`, such as `isMountedRef`, `hasConsentRef`, or `hasConsentReference`. The suffix identifies the binding as a ref object. The binding must not be reassigned after initialization.\n\nDirect Vue `ref()` calls with boolean-like values and `computed()` calls with synchronous getters returning booleans may use boolean prefixes, such as `isBranch` or `hasDepartment`. The binding must not be reassigned after initialization. For refs returned by other calls, such as composables returning `ShallowRef<boolean>`, use type-aware [`wrappers`](#wrappers) with `{Ref: 'value'}`, which also covers `ComputedRef`.\n\nThis rule intentionally does not check destructuring bindings, imports, class names, or catch parameters.\n\nTypeScript type annotation checks resolve local type aliases and callable interfaces, including generic type parameters, but not qualified or namespaced type references.\n\nJSDoc `@type`, `@param`, and `@returns` annotations are supported without TypeScript configuration. Rename suggestions update matching `@param` names. Inference is best effort; advanced types, typedefs, and imports are not resolved.\n\nWithout TypeScript type information, nested generic alias resolution is best effort. Some finite nested instantiations may be treated as unknown.\n\nThis rule is only automatically fixable when a non-global, non-exported, non-ambient variable binding can be safely renamed to the first enabled prefix without adding a collision suffix. Other safe rename candidates are still provided as editor suggestions.\n\n## Examples\n\n```js\n// ❌\nconst completed = true;\n\n// ✅\nconst isCompleted = true;\n```\n\n```js\n// ❌\nconst hasName = 'Sindre';\n\n// ✅\nconst name = 'Sindre';\n```\n\n```js\n// ❌\nfunction hasTitle() {\n\treturn 'Unicorn';\n}\n\n// ✅\nfunction getTitle() {\n\treturn 'Unicorn';\n}\n```\n\n```js\n// ❌\nconst completed = progress === 100;\n\n// ✅\nconst hasCompleted = progress === 100;\n```\n\n```js\n// ❌\nconst completed = Boolean(value);\n\n// ✅\nconst isCompleted = Boolean(value);\n```\n\n```js\n// ❌\nfunction download(showProgress = false) {}\n\n// ✅\nfunction download(shouldShowProgress = false) {}\n```\n\n```js\n// ❌\n/** @param {boolean} showProgress */\nfunction download(showProgress) {}\n\n// ✅\n/** @param {boolean} shouldShowProgress */\nfunction download(shouldShowProgress) {}\n```\n\n```ts\n// ❌\nconst completed: boolean = true;\n\n// ✅\nconst isCompleted: boolean = true;\n```\n\n```js\n// ❌\nfunction completed() {\n\treturn true;\n}\n\n// ✅\nfunction isCompleted() {\n\treturn true;\n}\n```\n\n```ts\n// ❌\nfunction download(showProgress: boolean) {}\n\n// ✅\nfunction download(shouldShowProgress: boolean) {}\n```\n\n```js\n// ✅\n// Object fields are ignored unless `checkFields` is set to a mode other than `never`.\n// Methods and getters use `checkMethods`. Setter names are ignored because setters do not return values.\nconst task = {\n\tcompleted: progress === 100,\n};\n```\n\n## Options\n\n### checkVariables\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check variable names.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tcheckVariables: 'prohibit',\n\t},\n]\n```\n\nWith `checkVariables: 'prohibit'`, this would fail:\n\n```js\nconst hasName = 'Sindre';\n```\n\nAnd these would pass:\n\n```js\nconst completed = true;\nconst isCompleted = true;\n```\n\n### checkArguments\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check parameter names, including TypeScript constructor parameter properties. Setter parameters are ignored because their names are positional. For example, `checkArguments: 'never'` allows both forms:\n\n```js\nfunction download(showProgress = false) {}\nfunction download(shouldShowProgress = false) {}\n```\n\n### checkFunctions\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check function names.\n\n### checkMethods\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'never'`\n\nHow to check object and class methods, getters, and TypeScript method signatures. Setter names are ignored because setters do not return values.\n\n### checkFields\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'never'`\n\nHow to check object properties, class fields, TypeScript property signatures, and TypeScript constructor parameter properties. Constructor parameter properties are checked as both arguments and fields.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tcheckMethods: 'always',\n\t\tcheckFields: 'never',\n\t},\n]\n```\n\nWith the above config, this would fail:\n\n```js\nclass Task {\n\thasTitle() {\n\t\treturn 'Unicorn';\n\t}\n}\n```\n\nAnd this would pass:\n\n```js\nclass Task {\n\tcompleted = true;\n\tisCompleted() {\n\t\treturn true;\n\t}\n}\n```\n\n### prefixes\n\nType: `Record<string, boolean>`\\\nDefault:\n\n```js\n{\n\tis: true,\n\tare: true,\n\thas: true,\n\thave: true,\n\tcan: true,\n\tshould: true,\n\twas: true,\n\twere: true,\n\tdoes: true,\n\tdid: true,\n\twill: true,\n\trequires: true,\n}\n```\n\nThe `prefixes` option is merged with the defaults. Set a prefix to `true` to allow it for boolean names and reserve it for boolean-like values. Set a prefix to `false` to disable it in both directions.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tprefixes: {\n\t\t\tneeds: true,\n\t\t\tdid: false,\n\t\t},\n\t},\n]\n```\n\nWith the above config, this would pass:\n\n```js\nconst needsUpdate = true;\n```\n\nAnd this would fail:\n\n```js\nconst didUpdate = true;\n```\n\n### wrappers\n\nType: `Record<string, string>`\\\nDefault: `{}`\n\nMap unqualified TypeScript wrapper type names to the property or method that provides a boolean-like value. Same-named types share configuration. Derived types, intersections, and constrained type parameters are supported. Members may provide `boolean`, `Promise<boolean>`, or `PromiseLike<boolean>`; nullable results are accepted. Requires TypeScript type information.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\twrappers: {\n\t\t\tStorageItem: 'get',\n\t\t},\n\t},\n]\n```\n\nWith the above configuration, this would pass:\n\n```ts\ninterface StorageItem<Base, Return = Base | undefined> {\n\tget(): Promise<Return>;\n}\n\ndeclare const isUnicorn: StorageItem<unknown, boolean>;\n```\n\nBut this would still fail because `get()` returns a string:\n\n```ts\ninterface StorageItem<Base, Return = Base | undefined> {\n\tget(): Promise<Return>;\n}\n\ndeclare const isUnicorn: StorageItem<unknown, string>;\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nNames matching any of these patterns are not checked. Strings are treated as regular expressions, so they match anywhere in the name unless anchored with `^` and `$`.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'value',\n\t\t\t'^completed$',\n\t\t],\n\t},\n]\n```\n\nWith the above config, these would pass:\n\n```js\nconst value = true;\nconst completed = true;\n```\n","docs/rules/consistent-class-member-order.md":"# consistent-class-member-order\n\n📝 Enforce consistent class member order.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n\nA predictable member order makes classes faster to scan and keeps related static, instance, field, and method members together.\n\nThis rule enforces the following class member order:\n\n1. Static fields\n2. Static blocks\n3. Static methods\n4. Private instance fields\n5. Public instance fields\n6. Constructors\n7. Private instance methods\n8. Public instance methods\n\nStatic members are grouped by `static` before privacy, so `static #foo` belongs with other static fields or methods.\n\nTypeScript `protected` members follow the same order as public members.\n\nThis rule does not autofix because fields and static blocks run in declaration order, and method order is observable through property reflection.\n\nIt may offer a manual suggestion for simple class bodies without comments, decorators, computed keys, or unsupported members. The suggestion is not offered when it would move a static field across a static block. It can still move instance fields past each other, which changes the order their initializers run in, so check fields whose initializers have side effects or read other fields.\n\nThis rule is intentionally simple. It only enforces group order and will not add options for sorting within groups, newline handling, or more detailed member categories. Use a dedicated sorting rule if you need that.\n\n## Options\n\nType: `object`\n\n### order\n\nType: `string[]`\n\nDefault:\n\n```js\n[\n\t'static-field',\n\t'static-block',\n\t'static-method',\n\t'private-field',\n\t'public-field',\n\t'constructor',\n\t'private-method',\n\t'public-method',\n]\n```\n\nThe array must contain each group exactly once.\n\n## Examples\n\n```js\n// ❌\nclass Foo {\n\tconstructor() {}\n\t#privateField = 1;\n\tpublicField = 1;\n}\n```\n\n```js\n// ✅\nclass Foo {\n\tstatic staticField = 1;\n\t#privateField = 1;\n\tpublicField = 1;\n\n\tconstructor() {}\n}\n```\n\n```js\n// ❌\nclass Foo {\n\tpublicMethod() {}\n\t#privateMethod() {}\n}\n```\n\n```js\n// ✅\nclass Foo {\n\tstatic staticMethod() {}\n\t#privateMethod() {}\n\tpublicMethod() {}\n}\n```\n","docs/rules/consistent-compound-words.md":"# consistent-compound-words\n\n📝 Enforce consistent spelling of compound words in identifiers.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nCompound words should be treated as one word when applying identifier casing conventions.\n\nTreating the same compound word consistently prevents equivalent concepts from being cased differently across identifiers.\n\nThis rule uses a conservative curated list of common compound-word mistakes in code identifiers. It is not a spellchecker or a prose style rule.\n\n## Examples\n\n```js\n// ❌\nconst passWord = 'secret';\n\n// ✅\nconst password = 'secret';\n```\n\n```js\n// ❌\nconst isInViewPort = true;\n\n// ✅\nconst isInViewport = true;\n```\n\n```js\n// ❌\nfunction unSubscribe() {}\n\n// ✅\nfunction unsubscribe() {}\n```\n\n## Intentionally not checked\n\nIn JavaScript, this rule does not check string keys, computed properties, property reads, JSX attributes, or export aliases. These are often external API surfaces where preserving the exact spelling is more important than normalizing identifier style.\n\nIt also intentionally excludes ambiguous or common API spellings such as `fileName`, `setUp`, `lookUp`, and `newLine`. These can be natural identifiers when the words keep separate meaning, for example a newly created line instead of the newline character.\n\n## Data keys, CSS, and HTML\n\nWith `checkProperties: true`, the rule checks JSON object keys, YAML string keys, TOML key segments (including table names), and SOML keys. It skips YAML non-string, tagged, anchored, and alias keys, plus string values.\n\nWith `checkVariables` (enabled by default), it checks CSS class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media, plus HTML `id` and individual `class` names. Built-in CSS property names and value keywords, and `animation` shorthand values are skipped. CSS escapes and HTML character references are decoded; templated HTML values are skipped.\n\nFor example, `backGround`, `back-ground`, and `back_ground` are flagged in favor of `background`. Allow-list entries match the full decoded name, including `--`. Data and CSS/HTML diagnostics have no fixes or suggestions because names may be referenced elsewhere.\n\n## Options\n\nType: `object`\n\n### replacements\n\nType: `object`\n\nYou can extend default replacements by passing the `replacements` option.\n\n```js\n'unicorn/consistent-compound-words': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\tfooBar: 'foobar',\n\t\t\tpassWord: false,\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `extendDefaultReplacements: false` to override the default `replacements` completely.\n\n### allowList\n\nType: `object`\n\nUse `allowList` to skip full identifier names case-sensitively. Values must be `true`.\n\n```js\n'unicorn/consistent-compound-words': [\n\t'error',\n\t{\n\t\tallowList: {\n\t\t\tlegacyUserName: true,\n\t\t},\n\t},\n]\n```\n\n### checkVariables\n\nType: `boolean`\\\nDefault: `true`\n\nPass `checkVariables: false` to disable checking variable names.\n\n### checkProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `checkProperties: true` to check property definitions and property writes.\n\n### checkDefaultAndNamespaceImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in default or namespace imports, but only for internal modules.\n- `true` - Check variables declared in default or namespace imports.\n- `false` - Don't check variables declared in default or namespace imports.\n\n### checkShorthandImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in shorthand imports, but only for internal modules.\n- `true` - Check variables declared in shorthand imports.\n- `false` - Don't check variables declared in shorthand imports.\n\n### checkShorthandProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `checkShorthandProperties: true` to check variables declared as shorthand properties in object patterns.\n","docs/rules/consistent-conditional-object-spread.md":"# consistent-conditional-object-spread\n\n📝 Enforce consistent conditional object spread style.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen conditionally spreading properties into an object literal, pick one style consistently.\n\nBy default, this rule prefers `&&` because it avoids an unnecessary empty object branch.\n\n## Examples\n\n```js\n// ❌\nconst object = {...(condition ? {property} : {})};\n\n// ✅\nconst object = {...(condition && {property})};\n```\n\nAn `undefined` or `null` fallback branch spreads nothing, so it is treated the same as an empty object:\n\n```js\n// ❌\nconst object = {...(condition ? {property} : undefined)};\n\n// ✅\nconst object = {...(condition && {property})};\n```\n\nWith the default `'logical'` style, a boolean cast of the condition is also reported, because every falsy value spreads nothing:\n\n```js\n// ❌\nconst object = {...(!!condition && {property})};\n\n// ❌\nconst object = {...(Boolean(condition) && {property})};\n\n// ✅\nconst object = {...(condition && {property})};\n\n// ❌\nconst object = {...(!!first && !!second && {property})};\n\n// ✅\nconst object = {...(first && second && {property})};\n```\n\n> [!NOTE]\n> In TypeScript, a condition of type `unknown` needs the boolean cast, because TypeScript does not allow spreading `unknown`. Use an `// eslint-disable-next-line` comment in that case.\n\nWith the `'ternary'` option:\n\n```js\n// eslint unicorn/consistent-conditional-object-spread: [\"error\", \"ternary\"]\n\n// ❌\nconst object = {...(condition && {property})};\n\n// ✅\nconst object = {...(condition ? {property} : {})};\n```\n\n## Options\n\nType: `string`\\\nDefault: `'logical'`\n\nAvailable options:\n\n- `'logical'` - Prefer `...(condition && object)`, without a boolean cast of `condition`.\n- `'ternary'` - Prefer `...(condition ? object : {})`.\n","docs/rules/consistent-date-clone.md":"# consistent-date-clone\n\n📝 Prefer passing `Date` directly to the constructor when cloning.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThe [`Date` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date) can clone a `Date` object directly when passed as an argument. This is simpler and more efficient than extracting the timestamp with `.getTime()`.\n\n> Note: This approach requires ES2015 (ES6) or later. In older environments, `new Date(date)` converts to a string first, but modern JavaScript handles this correctly.\n\n## Examples\n\n```js\n// ❌\nnew Date(date.getTime());\n\n// ✅\nnew Date(date);\n```\n\n```js\n// ❌\nconst cloned = new Date(originalDate.getTime());\n\n// ✅\nconst cloned = new Date(originalDate);\n```\n\n```js\n// ✅\n// When you need just the timestamp value\nconst timestamp = date.getTime();\n```\n","docs/rules/consistent-destructuring.md":"# consistent-destructuring\n\n📝 Use destructured variables over properties.\n\n🚫 Disabled by default.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces the use of already destructured variables over accessing the same direct, non-computed identifier property again. Previous destructurings are easily missed which leads to an inconsistent code style.\n\nThis rule is partly fixable. It does not suggest adding new properties to existing destructuring patterns, as that could read properties earlier than before.\n\nThere is no option to ignore specific sources or properties. Properties without a corresponding destructured variable are ignored by design.\n\n## Examples\n\n```js\n// ❌\nconst {a} = foo;\nconsole.log(foo.a);\n\n// ✅\nconst {a} = foo;\nconsole.log(a);\n\n// ✅\nconsole.log(foo.a, foo.b);\n```\n\n```js\n// ✅\nconst {a} = foo;\nconsole.log(a, foo.b);\n```\n\n```js\n// ✅\nconst {\n\ta: {b},\n} = foo;\nconsole.log(foo.a.c);\n```\n\n```js\n// ❌\nconst {bar} = foo;\nconst {a} = foo.bar;\n\n// ✅\nconst {bar} = foo;\nconst {a} = bar;\n```\n\n```js\n// ✅\nconst {a} = foo;\nconsole.log(a, foo.b());\n```\n\n```js\n// ✅\nconst {a} = foo.bar;\nconsole.log(foo.bar.a);\n```\n\nA destructured value is a snapshot. A direct call such as `update(foo)` or `foo.update()` between the destructuring and the property access could have changed the object, so that access is not reported. This is best-effort: a call in a nested function, a method call on `this`, and a call later in a loop body (which runs again before the next access) are not taken into account.\n\n```js\n// ✅\nconst {a} = foo;\nupdate(foo);\nconsole.log(foo.a);\n```\n","docs/rules/consistent-empty-array-spread.md":"# consistent-empty-array-spread\n\n📝 Prefer consistent types when spreading a ternary in an array literal.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen spreading a ternary in an array, we can use both `[]` and `''` as fallbacks, but it's better to have consistent types in both branches.\n\n## Examples\n\n```js\n// ❌\nconst array = [\n\ta,\n\t...(foo ? [b, c] : ''),\n];\n\n// ❌\nconst array = [\n\ta,\n\t...(foo ? 'bc' : []),\n];\n\n// ✅\nconst array = [\n\ta,\n\t...(foo ? [b, c] : []),\n];\n\n// ✅\nconst array = [\n\ta,\n\t...(foo ? 'bc' : ''),\n];\n```\n","docs/rules/consistent-existence-index-check.md":"# consistent-existence-index-check\n\n📝 Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.\n\nPrefer using `index === -1` to check if an element does not exist and `index !== -1` to check if an element does exist.\n\nThe value `-1` is the sentinel returned by these methods when no match is found, so comparing it directly with `===` or `!==` makes the check read as a not-found sentinel check instead of a numeric range check.\n\nSimilar to the [`explicit-length-check`](explicit-length-check.md) rule.\n\n## Examples\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index >= 0) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index > -1) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = foo.lastIndexOf('bar');\n\n// ❌\nif (index >= 0) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = array.findIndex(element => element > 10);\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n\n```js\nconst index = array.findLastIndex(element => element > 10);\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n","docs/rules/consistent-export-decorator-position.md":"# consistent-export-decorator-position\n\n📝 Enforce consistent decorator position on exported classes.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nDecorators can be placed before or after `export` and `export default` on class declarations. Pick one style for consistency.\n\nThis rule requires a parser that supports decorators, such as `@typescript-eslint/parser`.\n\n## Examples\n\n```js\n// eslint unicorn/consistent-export-decorator-position: error\n\n// ❌\nexport default @decorator class Foo {}\n\n// ❌\n@decorator export default class Foo {}\n\n// ✅\n@decorator\nexport default class Foo {}\n```\n\n### `before`\n\n```js\n// eslint unicorn/consistent-export-decorator-position: [\"error\", \"before\"]\n\n// ❌\n@decorator\nexport default class Foo {}\n\n// ✅\n@decorator export default class Foo {}\n```\n\n### `after`\n\n```js\n// eslint unicorn/consistent-export-decorator-position: [\"error\", \"after\"]\n\n// ❌\n@decorator\nexport default class Foo {}\n\n// ✅\nexport default @decorator class Foo {}\n```\n\n## Options\n\nType: `string`\\\nDefault: `'above'`\n\nAvailable options:\n\n- `'above'` - Require decorators on the line above the export.\n- `'before'` - Require decorators before `export` on the same line.\n- `'after'` - Require decorators after `export` or `export default`.\n","docs/rules/consistent-function-scoping.md":"# consistent-function-scoping\n\n📝 Move function definitions to the highest possible scope.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nA function definition should be placed as close to the top-level scope as possible without breaking its captured values. This improves readability, [directly improves performance](https://stackoverflow.com/a/81329/207247) and allows JavaScript engines to [better optimize performance](https://ponyfoo.com/articles/javascript-performance-pitfalls-v8#optimization-limit).\n\n## Examples\n\n```js\n// ❌\nexport function doFoo(foo) {\n\t// Does not capture anything from the scope, can be moved to the outer scope\n\tfunction doBar(bar) {\n\t\treturn bar === 'bar';\n\t}\n\n\treturn doBar;\n}\n```\n\n```js\n// ✅\nfunction doBar(bar) {\n\treturn bar === 'bar';\n}\n\nexport function doFoo(foo) {\n\treturn doBar;\n}\n```\n\n```js\n// ❌\nfunction doFoo() {\n\t// Does not capture anything from the scope, can be moved to the outer scope\n\treturn bar => bar === 'bar';\n}\n```\n\n```js\n// ✅\nconst doBar = bar => bar === 'bar';\n\nfunction doFoo() {\n\treturn doBar;\n}\n```\n\n```js\n// Arrow functions in return statements are also flagged\n// ❌\nexport function someAction() {\n\treturn dispatch => dispatch({type: 'SOME_TYPE'});\n}\n```\n\n```js\n// Arrow functions in return statements are also flagged\n// ✅\nconst handleDispatch = dispatch => dispatch({type: 'SOME_TYPE'});\n\nexport function someAction() {\n\treturn handleDispatch;\n}\n```\n\n```js\n// ❌\nfunction doFoo(foo) {\n\tconst doBar = bar => {\n\t\treturn bar === 'bar';\n\t};\n}\n```\n\n```js\n// ✅\nconst doBar = bar => {\n\treturn bar === 'bar';\n};\n\nfunction doFoo(foo) {}\n```\n\n```js\n// ✅\nexport function doFoo(foo) {\n\tfunction doBar(bar) {\n\t\treturn bar === 'bar' && foo.doBar(bar);\n\t}\n\n\treturn doBar;\n}\n\nconst doBar = bar => bar === 'bar';\n\nexport function doFoo() {\n\treturn doBar;\n}\n```\n\n## Options\n\n### checkArrowFunctions\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkArrowFunctions\": false` to disable linting of arrow functions.\n\n## Limitations\n\nThis rule does not detect or remove extraneous code blocks inside of functions:\n\n```js\nfunction doFoo(foo) {\n\t{\n\t\tfunction doBar(bar) {\n\t\t\treturn bar;\n\t\t}\n\t}\n\n\treturn foo;\n}\n```\n\n[Immediately invoked function expressions (IIFE)](https://en.wikipedia.org/wiki/Immediately_invoked_function_expression) are ignored:\n\n```js\n(function () {\n\tfunction doFoo(bar) {\n\t\treturn bar;\n\t}\n})();\n```\n\n[Built-in Hooks in React](https://reactjs.org/docs/hooks-reference.html) are ignored:\n\n```js\nuseEffect(() => {\n\tasync function getItems() {}\n\n\tgetItems();\n}, [])\n```\n\nFunctions inside `jest.mock()` factories are ignored because Jest restricts those factories from referencing out-of-scope variables:\n\n```js\njest.mock('module', () => {\n\tfunction createMock() {\n\t\treturn 'mock';\n\t}\n\n\treturn createMock;\n});\n```\n\nFunctions inside Vitest's `vi.mock()` and `vi.hoisted()` factories are also ignored because those factories run before the module's top-level code:\n\n```js\nconst mocks = vi.hoisted(() => {\n\tconst createMock = () => 'mock';\n\treturn {createMock};\n});\n\nvi.mock('module', () => {\n\tconst createMock = () => 'mock';\n\treturn {createMock};\n});\n```\n","docs/rules/consistent-function-style.md":"# consistent-function-style\n\n📝 Enforce function syntax by role.\n\n🚫 Disabled by default.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce function syntax by role.\n\nChoosing syntax by function role keeps declarations consistent and makes callbacks, methods, and standalone functions easier to distinguish.\n\nBy default, this rule reports nothing. Configure the roles you want to enforce.\n\nThis rule does not autofix. Function declarations, function expressions, arrow functions, and object methods are not always semantic equivalents, so `--fix` would be too risky for a style rule.\n\nThe rule offers editor suggestions only for simple callback conversions between anonymous function expressions and arrow functions. Suggestions are skipped when the callback contains comments, `this`, `arguments`, `super`, `new.target`, direct `eval()`, generators, named function expressions, or TypeScript type parameters.\n\n## Examples\n\n```js\n// eslint unicorn/consistent-function-style: ['error', {namedFunctions: 'declaration'}]\n\n// ❌\nconst parse = value => value;\n\n// ✅\nfunction parse(value) {\n\treturn value;\n}\n```\n\n```js\n// ✅ Reassigned variables are ignored by default.\nlet transform = value => value;\n\nif (debug) {\n\ttransform = wrap(transform);\n}\n```\n\n```js\n// ✅ Callbacks are ignored by default.\nitems.map(item => item.id);\n```\n\n```js\n// eslint unicorn/consistent-function-style: ['error', {namedFunctions: 'arrow-function'}]\n\n// ❌\nfunction parse(value) {\n\treturn JSON.parse(value);\n}\n\n// ✅\nconst parse = value => JSON.parse(value);\nexport default parse;\n```\n\n## Options\n\nType: `object`\n\nDefault:\n\n```js\n{\n\tdefault: 'ignore',\n\tnamedFunctions: 'ignore',\n\tnamedExports: 'ignore',\n\tcallbacks: 'ignore',\n\tobjectProperties: 'ignore',\n\treassignedVariables: 'ignore',\n\ttypedVariables: 'ignore',\n}\n```\n\nEach option chooses the expected style for a role.\n\nWhen multiple roles apply, the most specific role wins. Roles are checked in this order:\n\n```js\ndefaultExport\ntypedVariables\nreassignedVariables\nnamedExports\ncallbacks\nobjectProperties\nnamedFunctions\ndefault\n```\n\n### `default`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nFallback style for functions that do not match a more specific role.\n\n### `defaultExport`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for functions written directly inside `export default`. When omitted, named default-exported function declarations use the `namedFunctions` option, other named function expressions use the `default` option, and anonymous default exports are ignored. Explicitly setting `'ignore'` also suppresses syntax reports for direct default-exported functions. Exported identifiers such as `export default parse` are not followed.\n\n### `namedFunctions`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for function declarations and named variable functions.\n\n### `namedExports`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for inline named function exports, such as `export function foo() {}` and `export const foo = () => {}`. Export specifier lists like `export {foo}` are ignored.\n\n### `callbacks`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for inline functions passed as call or constructor arguments.\n\n### `objectProperties`\n\nAllowed values: `'method'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for object literal function properties.\n\n### `reassignedVariables`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for variable functions whose binding is reassigned after initialization.\n\n### `typedVariables`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for TypeScript variable functions with an explicit type annotation.\n\n## Limitations\n\nThe rule ignores anonymous default exports when `defaultExport` is omitted or set to `'ignore'`, export specifier lists, IIFEs, accessors, class methods, class fields, destructuring and parameter defaults, TypeScript overload declarations, and generators when the expected style is `'arrow-function'`. When `defaultExport` is configured to a non-`ignore` style, anonymous default-exported functions are checked for syntax but are still handled separately by [`no-anonymous-default-export`](./no-anonymous-default-export.md) for naming. When both rules are enabled, an anonymous default can therefore produce two reports: one for its syntax and one for its missing name. Most reports do not have suggestions, because the safe rewrite surface is intentionally narrow.\n","docs/rules/consistent-json-file-read.md":"# consistent-json-file-read\n\n📝 Enforce consistent JSON file reads before `JSON.parse()`.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen reading and parsing a JSON file, consistently read it using the configured style. By default, the rule prefers reading it as a string.\n\nThe default keeps the code compatible with TypeScript, where [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) accepts a string.\n\nThe rule only checks and fixes direct no-option reads and option objects where `encoding` is the only property. Reads with additional options are left unchanged to avoid dropping options.\n\n## Examples\n\n```js\n// ❌\nconst packageJson = JSON.parse(await fs.readFile('./package.json'));\n\n// ❌\nconst promise = fs.readFile('./package.json');\nconst packageJson = JSON.parse(await promise);\n\n// ✅\nconst packageJson = JSON.parse(await fs.readFile('./package.json', 'utf8'));\n```\n\n```js\n// ✅\nconst promise = fs.readFile('./package.json', {encoding: 'utf8', signal});\nconst packageJson = JSON.parse(await promise);\n```\n\n## Options\n\nType: `'string' | 'buffer'`\n\nDefault: `'string'`\n\n### `buffer`\n\nPrefer reading JSON files as buffers.\n\n```js\n// eslint unicorn/consistent-json-file-read: [\"error\", \"buffer\"]\n\n// ❌\nconst packageJson = JSON.parse(await fs.readFile('./package.json', 'utf8'));\n\n// ✅\nconst packageJson = JSON.parse(await fs.readFile('./package.json'));\n```\n","docs/rules/consistent-optional-chaining.md":"# consistent-optional-chaining\n\n📝 Enforce consistent optional chaining for same-base member access.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n\nEnforce consistent optional chaining for same-base member access in logical expressions.\n\nUsing optional chaining consistently for the same base makes nullish behavior easier to see and avoids visually similar expressions that handle missing values differently.\n\nThis rule intentionally handles only direct member access on both sides of `&&` or `||`. It does not rewrite broad truthiness checks like `foo && foo.bar` to `foo?.bar`, because that can change runtime values.\n\n## Examples\n\n```js\n// ❌\nfoo?.bar || foo.baz;\n\n// ✅\nfoo?.bar || foo?.baz;\n```\n\n```js\n// ❌\nfoo.bar || foo?.baz;\n\n// ✅\nfoo.bar || foo.baz;\n```\n\n```js\n// ❌\nfoo?.bar && foo?.baz;\n\n// ✅\nfoo?.bar && foo.baz;\n```\n\n```js\n// ❌\nfoo.bar && foo?.baz;\n\n// ✅\nfoo.bar && foo.baz;\n```\n","docs/rules/consistent-template-literal-escape.md":"# consistent-template-literal-escape\n\n📝 Enforce consistent style for escaping `${` in template literals.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen you need to include a literal `${` in a template literal (without it being interpreted as the start of an interpolation), there are multiple ways to escape it. This rule enforces using `\\${` (escaping the dollar sign) for consistency, as it's the most intuitive and clearest approach.\n\n## Escaping methods\n\n- `\\${` — escape the dollar sign ✅ (recommended)\n- `$\\{` — escape the opening brace (works, but inconsistent)\n- `\\$\\{` — escape both (redundant)\n\n## Examples\n\n```js\n// ❌ - Escaping the brace is inconsistent\nconst template = `$\\{variableName}`;\n\n// ❌ - Escaping both is redundant\nconst template = `\\$\\{variableName}`;\n\n// ✅ - Escape the dollar sign\nconst template = `\\${variableName}`;\n```\n\n```js\n// ✅ - Common use case: template strings for users\nconst message = `Use \\${variable} in your code`;\n\n// ✅ - JavaScript regex pattern\nconst regex = `/\\${pattern}/g`;\n```\n\n```js\n// ✅ - Normal variable interpolation still works\nconst name = 'Alice';\nconst greeting = `Hello ${name}, use \\${variable} for templates`;\n// → \"Hello Alice, use ${variable} for templates\"\n```\n","docs/rules/consistent-tuple-labels.md":"# consistent-tuple-labels\n\n📝 Enforce consistent labels on tuple type elements.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\n[Labeled tuple elements](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#labeled-tuple-elements) document what each position in a tuple means. Labeling only some of the elements is inconsistent: the unlabeled positions read as an oversight, and the tuple is harder to scan than one that is either fully labeled or fully unlabeled.\n\nThis rule requires that, when at least one element of a tuple type is labeled, every element is labeled. A tuple with no labels at all is left alone.\n\nA rest element counts as labeled when its label is present (`...rest: number[]`), so a fully labeled tuple that ends with a labeled rest element is not reported.\n\nThere is no autofix, since a meaningful label cannot be inferred.\n\n## Examples\n\n```ts\n// ❌\ntype Point = [x: number, number];\n\n// ✅\ntype Point = [x: number, y: number];\n```\n\n```ts\n// ✅\ntype Point = [number, number];\n```\n\n```ts\n// ❌\ntype Route = [name: string, ...string[]];\n\n// ✅\ntype Route = [name: string, ...segments: string[]];\n```\n","docs/rules/custom-error-definition.md":"# custom-error-definition\n\n📝 Enforce correct `Error` subclassing.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent way of defining `Error` subclasses. It works with superclasses whose names match the rule's `*Error` naming pattern.\n\nTypeScript abstract classes are ignored. Concrete subclasses are still checked.\n\nFor native error bases that accept `ErrorOptions` as their second argument, constructors with regular parameters must accept a non-rest `options` parameter in any position and pass it second to `super()`. Rest-only constructors are exempt from this check. A constructor with a fixed message can instead pass `{cause}` inline, and a constructor with an `options` parameter can forward only its cause with `{cause: options.cause}`. `AggregateError` and `SuppressedError` use different signatures, and custom bases may too, so they are exempt.\n\n```js\nclass ApiError extends Error {\n\tconstructor(status, message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'ApiError';\n\t\tthis.status = status;\n\t}\n}\n\nclass HttpError extends Error {\n\tconstructor(response, request, options) {\n\t\tsuper(`Request failed: ${request.method} ${request.url}`, options);\n\t\tthis.name = 'HttpError';\n\t\tthis.response = response;\n\t\tthis.request = request;\n\t}\n}\n```\n\n```js\n// ✅\nclass UserNotFoundError extends GraphQLError {\n\tconstructor(userId) {\n\t\tsuper(`User \"${userId}\" does not exist`, {extensions: {code: 'NOT_FOUND'}});\n\t\tthis.name = 'UserNotFoundError';\n\t}\n}\n```\n\n## Examples\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// The `this.message` assignment is useless as it's already set via the `super()` call.\n\t\tthis.message = message;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(undefined, options);\n\t\t// Pass the error message to `super()` instead of setting `this.message`.\n\t\tthis.message = message;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// No `name` property set. The name property is needed so the\n\t\t// error shows up as `[CustomError: foo]` and not `[Error: foo]`.\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// Use a string literal to set the `name` property as it will not change after minifying.\n\t\tthis.name = this.constructor.name;\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// The `name` property should be set to the class name.\n\t\tthis.name = 'MyError';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ❌\n// The class name should be capitalized and end with `Error`.\nclass foo extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'foo';\n\t}\n}\n\n// ✅\nclass FooError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'FooError';\n\t}\n}\n```\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, details) {\n\t\tsuper(message);\n\t\tthis.details = details;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.details = options?.details;\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends Error {\n\tconstructor() {\n\t\tsuper('My custom error');\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\n// The message is hard-coded and the error options are passed to `super()` inline, so no `options` parameter is needed.\nclass CustomError extends Error {\n\tconstructor(cause) {\n\t\tsuper('My custom error', {cause});\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends TypeError {\n\tconstructor() {\n\t\tsuper();\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends Error {\n\tname = 'CustomError';\n}\n```\n\nWhen defining a custom `message` accessor, don't pass the message to `super()` as it would shadow the accessor with an own `message` property. Store the message somewhere else instead.\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'CustomError';\n\t}\n\n\tget message() {\n\t\treturn 'Custom message';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\t#message;\n\n\tconstructor(message, options) {\n\t\tsuper(undefined, options);\n\t\tthis.#message = message;\n\t\tthis.name = 'CustomError';\n\t}\n\n\tget message() {\n\t\treturn this.#message;\n\t}\n}\n```\n","docs/rules/default-export-style.md":"# default-export-style\n\n📝 Enforce consistent default export declarations.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce whether default-exported functions and classes are declared inline with `export default` or separately. For functions, separate means a `const` arrow function exported by identifier. For classes, separate means a class declaration exported by identifier.\n\nA consistent declaration style makes default exports easier to scan and avoids mixing multiple declaration forms across a codebase.\n\nThis rule controls whether local default exports are written inline or separately. Named exports are intentionally ignored. Use [`consistent-function-style`](./consistent-function-style.md) for function syntax, including direct default-exported functions through its `defaultExport` option.\n\nUse [`no-anonymous-default-export`](./no-anonymous-default-export.md) to require names for anonymous default exports.\n\n## Examples\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"inline\"}]\n\n// ❌\nconst foo = () => {};\nexport default foo;\n\n// ✅\nexport default function foo() {}\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"separate\"}]\n\n// ❌\nexport default function foo() {}\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"ignore\"}]\n\n// ✅\nexport default function foo() {}\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"inline\"}]\n\n// ❌\nclass Foo {}\nexport default Foo;\n\n// ✅\nexport default class Foo {}\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"separate\"}]\n\n// ❌\nexport default class Foo {}\n\n// ✅\nclass Foo {}\nexport default Foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"ignore\"}]\n\n// ✅\nexport default class Foo {}\n\n// ✅\nclass Foo {}\nexport default Foo;\n```\n\n## Options\n\nType: `object`\n\nDefault:\n\n```js\n{\n\tfunctions: 'inline',\n\tclasses: 'inline',\n}\n```\n\n### `functions`\n\nAllowed values: `'inline'`, `'separate'`, `'ignore'`\n\n`'inline'` requires named default-exported functions to be declared inline:\n\n```js\nexport default function foo() {}\n```\n\n`'separate'` requires named default-exported functions to use a separate `const` arrow function declaration:\n\n```js\nconst foo = () => {};\nexport default foo;\n```\n\n`'ignore'` disables checks for functions.\n\n> [!NOTE]\n> When both rules are enabled, configure compatible styles. For example, `functions: 'inline'` pairs with `defaultExport: 'declaration'`, while `functions: 'separate'` pairs with `defaultExport: 'ignore'` when `namedFunctions` permits the separate `const` arrow function. The `defaultExport` option does not inspect `export default identifier`.\n\n### `classes`\n\nAllowed values: `'inline'`, `'separate'`, `'ignore'`\n\n`'inline'` requires named default-exported classes to be declared inline:\n\n```js\nexport default class Foo {}\n```\n\n`'separate'` requires named default-exported classes to use a separate class declaration:\n\n```js\nclass Foo {}\nexport default Foo;\n```\n\n`'ignore'` disables checks for classes.\n\n## Limitations\n\nThis rule intentionally ignores named exports, re-exports, CommonJS, anonymous defaults, non-adjacent declaration/export pairs, imported identifiers, values, objects, arrays, function expressions, `let`/`var` functions, multiple variable declarators, generators, later reassigned bindings, and TypeScript-specific syntax.\n","docs/rules/dom-node-dataset.md":"# dom-node-dataset\n\n📝 Enforce consistent style for DOM element dataset access.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUse [`.dataset`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset) on DOM elements over `getAttribute(…)`, `.setAttribute(…)`, `.removeAttribute(…)` and `.hasAttribute(…)`.\n\nThe `dataset` API maps `data-*` attributes to properties, avoiding repeated attribute-name strings and keeping reads and writes consistent.\n\nFor a missing attribute, `getAttribute(…)` returns `null`, but `.dataset` returns `undefined`. So reads are only offered as a suggestion, in both directions.\n\n## Examples\n\n```js\n// ❌\nconst unicorn = element.getAttribute('data-unicorn');\n\n// ✅\nconst {unicorn} = element.dataset;\n```\n\n```js\n// ❌\nelement.setAttribute('data-unicorn', '🦄');\n\n// ✅\nelement.dataset.unicorn = '🦄';\n```\n\n```js\n// ❌\nelement.removeAttribute('data-unicorn');\n\n// ✅\ndelete element.dataset.unicorn;\n```\n\n```js\n// ❌\nconst hasUnicorn = element.hasAttribute('data-unicorn');\n\n// ✅\nconst hasUnicorn = Object.hasOwn(element.dataset, 'unicorn');\n```\n\n```js\n// ✅\nconst foo = element.getAttribute('foo');\n```\n\n```js\n// ✅\nelement.setAttribute('not-dataset', '🦄');\n```\n\n```js\n// ✅\nelement.removeAttribute('not-dataset');\n```\n\n```js\n// ✅\nconst hasFoo = element.hasAttribute('foo');\n```\n\n## Options\n\n### preferAttributes\n\nType: `boolean`\\\nDefault: `false`\n\nWhen `true`, enforces the opposite direction: prefer `getAttribute(…)` / `setAttribute(…)` / `removeAttribute(…)` / `hasAttribute(…)` over named `.dataset` access — covering reads, writes, `delete`, simple destructuring, existence checks (`in`, `Object.hasOwn`, `.hasOwnProperty()`), and assigning `.dataset` to a variable (`const data = element.dataset`, which hides the attribute access from a search). Direct whole-object reads (`foo(element.dataset)`) and inherited members (`element.dataset.toString`) are not flagged. This can be useful for greppability when data attributes are also referenced in CSS/HTML.\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nconst unicorn = element.dataset.unicorn;\n\n// ✅\nconst unicorn = element.getAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nelement.dataset.unicorn = '🦄';\n\n// ✅\nelement.setAttribute('data-unicorn', '🦄');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\ndelete element.dataset.unicorn;\n\n// ✅\nelement.removeAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\n'unicorn' in element.dataset;\n\n// ✅\nelement.hasAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nconst data = element.dataset;\nconsole.log(data.unicorn);\n\n// ✅\nconsole.log(element.getAttribute('data-unicorn'));\n```\n","docs/rules/empty-brace-spaces.md":"# empty-brace-spaces\n\n📝 Enforce no spaces between braces.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEmpty blocks and object literals do not need internal whitespace, so this rule enforces a compact, consistent style. It also checks objects and arrays in JSON, JSONC, JSON5, and SOML, blocks in CSS, flow mappings and sequences in YAML, and inline tables and arrays in TOML. Braces and brackets containing comments are left unchanged.\n\n## Examples\n\n```js\n// ❌\nclass Unicorn {\n}\n\n// ✅\nclass Unicorn {}\n```\n\n```js\n// ❌\ntry {\n\tfoo();\n} catch { }\n\n// ✅\ntry {\n\tfoo();\n} catch {}\n```\n","docs/rules/error-message.md":"# error-message\n\n📝 Enforce passing a `message` value when creating a built-in error.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces a `message` value to be passed in when creating an instance of a built-in [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, which leads to more readable and debuggable code.\n\n## Examples\n\n```js\n// ❌\nthrow new Error();\n\n// ❌\nthrow new Error('');\n\n// ✅\nthrow new Error('Unexpected property.');\n```\n\n```js\n// ❌\nthrow new TypeError();\n\n// ✅\nthrow new TypeError('Array expected.');\n```\n\n```js\n// ❌\nconst error = new AggregateError(errors);\n\n// ✅\nconst error = new AggregateError(errors, 'Promises rejected.');\n```\n\n```js\n// ❌\nconst error = new SuppressedError(error, suppressed);\n\n// ✅\nconst error = new SuppressedError(error, suppressed, 'This is a suppressed error.');\n```\n","docs/rules/escape-case.md":"# escape-case\n\n📝 Require escape sequences to use uppercase or lowercase values.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent escaped value style by defining escape sequence values with uppercase or lowercase characters. The default style is uppercase, which promotes readability by making the escaped value more distinguishable from the identifier.\n\nTagged template literals are ignored because tag functions can observe the raw escape sequences.\n\nIn SOML, the configured case is ignored because Unicode escapes must use lowercase hexadecimal digits. Literal strings and keys are skipped.\n\nIn TOML, it checks basic strings and quoted keys, including multiline strings. It preserves `\\u` and `\\U` prefixes and also normalizes parser-tolerated `\\x` escapes, which TOML 1.0 does not define. Literal strings and keys are skipped.\n\nIn JSON, JSONC, and JSON5, it checks strings and quoted keys, including JSON5 hexadecimal escapes. In YAML, it checks hexadecimal and Unicode escapes in double-quoted scalars. In CSS, it checks one- to six-digit hexadecimal escapes in identifiers, strings, and URLs, preserving escape-terminating whitespace and skipping comments.\n\n## Examples\n\n```js\n// ❌\nconst foo = '\\xa9';\n\n// ✅\nconst foo = '\\xA9';\n```\n\n```js\n// ❌\nconst foo = '\\ud834';\n\n// ✅\nconst foo = '\\uD834';\n```\n\n```js\n// ❌\nconst foo = '\\u{1d306}';\n\n// ✅\nconst foo = '\\u{1D306}';\n```\n\n```js\n// ❌\nconst foo = '\\ca';\n\n// ✅\nconst foo = '\\cA';\n```\n\n## Options\n\nType: `string`\\\nDefault: `'uppercase'`\n\n- `'uppercase'` (default)\n  - Always use escape sequence values with uppercase characters.\n- `'lowercase'`\n  - Always use escape sequence values with lowercase characters.\n\nExample:\n\n```js\n{\n\t'unicorn/escape-case': ['error', 'lowercase']\n}\n```\n\n```js\n// ❌\nconst foo = '\\xA9';\n\n// ✅\nconst foo = '\\xa9';\n```\n\n```js\n// ❌\nconst foo = '\\uD834';\n\n// ✅\nconst foo = '\\ud834';\n```\n\n```js\n// ❌\nconst foo = '\\u{1D306}';\n\n// ✅\nconst foo = '\\u{1d306}';\n```\n\n```js\n// ❌\nconst foo = '\\cA';\n\n// ✅\nconst foo = '\\ca';\n```\n","docs/rules/expiring-todo-comments.md":"# expiring-todo-comments\n\n📝 Add expiration conditions to TODO comments.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule makes it possible to pass arguments to TODO, FIXME and XXX comments to trigger ESLint to report.\n\nFrom [ESLint's documentation](https://eslint.org/docs/latest/rules/no-warning-comments):\n\n> Developers often add comments to code which is not complete or needs review.\n\nTODO comments are useful when a piece of code needs some work. Unfortunately these can be easily forgotten as it's common to forget to track them, leaving dangling tasks to be found at later random moments, or never at all.\n\nWith this rule, a TODO can have a condition right from the beginning to define its lifespan. When the condition is met, ESLint will take care of reporting that there's work to be done.\n\nThis rule will ignore all TODOs without conditions. For more information, read the below [`eslint/no-warning-comments`](#disallow-warning-comments-no-warning-comments) section.\n\nThis rule also supports CSS comments when linting with [`@eslint/css`](https://github.com/eslint/css), HTML comments when linting with [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint), JSONC/JSON5 comments when linting with [`@eslint/json`](https://github.com/eslint/json), HTML comments in Markdown when linting with [`@eslint/markdown`](https://github.com/eslint/markdown), SOML `#` and block comments when linting with [`eslint-soml`](https://github.com/soml-lang/eslint-soml), TOML `#` comments when linting with [`eslint-plugin-toml`](https://github.com/ota-meshi/eslint-plugin-toml), and YAML `#` comments when linting with [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml).\n\nQuick overview of conditions:\n\n- Expire after a **specific date**.\n- Expire when **your package** (package.json) reaches a specific **version**.\n- Expire when a package.json **`engines`** property reaches a specific **version**.\n- Expire when you **install/uninstall** a specific **package**.\n- Expire when a **package** reaches a specific **version**.\n- Expire when a **peer dependency**'s minimum supported **version** reaches a specific **version**.\n\n## Conditions\n\n### Expiry Date\n\nUsing a date as condition, a TODO will only work as long as this date is not met. This is especially useful when you either know when the action should take place or simply want to set boundaries for yourself.\n\nDate expiry checks are disabled by default. Set [`checkDates`](#checkdates) to `true` to enable them.\n\n```js\n// TODO [2019-11-15]: Refactor this code before the sprint ends.\n// TODO (@lubien) [2019-07-18]: When John delivers his code. I can reuse it.\n// TODO [2019-08-10]: I must refactor this for sure before I deliver.\n```\n\nDates are in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601#Dates) and use [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) as timezone.\n\nMultiple dates on the same TODO are not valid and will be reported. There's no point in having two dates as the closest one will always be the one that is reported.\n\n### Package Version\n\nIf you're working on an npm package, you should have a root level package.json with a [`version`](https://docs.npmjs.com/files/package.json#version) field as specified by npm. This condition takes place under this value.\n\nBy assigning a condition to compare a package.json `version`, the TODO will report as soon as the condition is met. It's really useful when the work is related to the version of the package itself such as deprecated APIs.\n\n```js\n// TODO [>=1.0.0]: I should work around this when we reach v1.\n// TODO (@lubien) [>0]: For now this is fine but for a stable version we must refactor.\n// FIXME [>10]: This feature is deprecated and should be removed from the next major version.\n```\n\nMultiple package versions on the same TODO are not valid and will be reported. Just like dates, multiple versions will make no sense as the closest one will be the one to trigger the report.\n\n### Engine Version\n\nIn package.json, you can specify an [`\"engines\"` field](https://docs.npmjs.com/files/package.json#engines) with the Node.js (`node`) versions that your package supports.\n\nWith that in mind, this condition is triggered as soon as package.json's `node` engine reaches the target version. This is particularly useful for maintainers that strive for compatibility but have plans for the future when some feature will be widely available and when support for older versions could be dropped.\n\nImagine you want to use `async`/`await` but for now you support Node.js versions that don't have it. Maybe you're eager to use `import` and `export` but for now you have to support CommonJS?\n\n```js\n// TODO [engine:node@>=8]: We can use async/await now.\n// FIXME [engine:node@>=20.0.0]: Hey, node can use import/export now, we should refactor.\n```\n\nArgument versions should be [semver](https://semver.org/) compatible such as: `1.2.45`, `5.3`, `1`.\n\nOnly the `node` engine is supported by this condition.\n\nSupported comparisons are `>` and `>=`. Comparison must have a `@` before such as `@>` and `@>=`.\n\n### Dependency Presence\n\nAs a Node.js developer, you probably already know about package.json [dependencies](https://docs.npmjs.com/files/package.json#dependencies) and [devDependencies](https://docs.npmjs.com/files/package.json#devdependencies). This condition works based on the presence or absence of dependencies in both fields.\n\nYou may use `+` to trigger when a dependency is added and `-` when a dependency is removed.\n\n```js\n// TODO [-vue-function-api]: When we remove `vue-function-api` we should refactor this.\n// FIXME [+read-pkg]: If we use this package we don't need to use this function below.\n// XXX @lubien [+react, -jquery]: We can use React for this widget instead of jQuery.\n```\n\nSuch conditions are really useful when the code depends upon changes in dependencies that are known to be happening such as `vue-function-api` that will eventually be part of `vue` itself.\n\n### Dependency Version\n\nAnother way to make conditions based on dependencies is to look at versions. This is useful when developers know that changes in future versions of dependencies will impact their code.\n\n```js\n// TODO [vue@>=3]: Refactor to function API when it's stable.\n// FIXME [cerebro@>0.10.0]: This is a quickfix until cerebro fixes this.\n// XXX [popura@>=2.0.0]: This API is deprecated so we should not use it by then.\n```\n\nArgument versions should be [semver](https://semver.org/) compatible such as: `1.2.45`, `5.3`, `1`.\n\nSupported comparisons are `>` and `>=`. Comparison must have a `@` before such as `@>` and `@>=`.\n\n[Package manager catalogs](https://pnpm.io/catalogs) (`catalog:` version references in `package.json`) are not resolved; dependency and peer dependency version checks that use them are reported as unsupported.\n\n### Peer Dependency Version\n\nIf your package declares [`peerDependencies`](https://docs.npmjs.com/cli/configuring-npm/package-json#peerdependencies), you can make conditions based on the **minimum supported version** of a peer dependency. This is useful when you want a TODO to trigger once you bump the lowest version you support, for example to drop a fallback for a deprecated API.\n\n```js\n// TODO [peer:eslint@>=9]: Drop the `CLIEngine` fallback once we require ESLint 9.\n```\n\nThe peer dependency value is a version range (such as `>=8`, `^8 || ^9`), so the comparison is made against the **floor** of that range. For example, with `\"eslint\": \"^8 || ^9\"` the minimum supported version is `8`, so `[peer:eslint@>=9]` will **not** trigger; it triggers only once the floor reaches `9`.\n\nThis condition is separate from the [Dependency Version](#dependency-version) condition, which only checks `dependencies` and `devDependencies`. Use `peer:` when the same package can appear in both with independent versions.\n\nArgument versions should be [semver](https://semver.org/) compatible such as: `1.2.45`, `5.3`, `1`.\n\nSupported comparisons are `>` and `>=`. Comparison must have a `@` before such as `@>` and `@>=`.\n\n### Pre-releases\n\nTODO comments with rules for package.json and dependency versions support the semver pre-release format, such as `1.0.0-my.pre.release.1.2.3`. This means that if your TODO asks for version `>=1.0.0` and you're in `1.0.0-beta`, your TODO will **not** trigger as a pre-release comes first. When the version is at least `1.0.0`, it will properly trigger.\n\nKeep in mind that pre-releases compare by number and alphabetical order. Example: `1.0.0-alpha` < `1.0.0-alpha.1` < `1.0.0-alpha.beta` < `1.0.0-beta` < `1.0.0-beta.2` < `1.0.0-beta.11` < `1.0.0-rc.1` < `1.0.0`.\n\nYou can read more about the semver pre-release format [here](https://semver.org/#spec-item-9) and semver precedence rules [here](https://semver.org/#spec-item-11).\n\n### Combinations\n\nAny combination of rules is possible as long as you separate them by commas. Each condition **triggers an individual report.**\n\n```js\n// TODO [+react, -jquery]: We can use React for this widget instead of jQuery.\n// TODO [2019-07-15, +react]: Refactor this if we install React or if we reach that date.\n// TODO [-vue-function-api, vue@>=3]: Now we should use Vue native function API.\n```\n\n### Block Comments\n\nYou can also use block comments to specify TODOs with conditions. Each line can have its own set of conditions. This is especially useful when you aim for more details.\n\n```js\n/*\n * We should really make this code better.\n * When we support Node.js 12 we can refactor imports.\n * And we also can do [x], [y], [z].\n * TODO [engine:node@>=12]: Use import/export.\n */\n\n/*\n * This code would be so easy if we used `popura` package helpers.\n * When you can, install `popura`, use it and remove dead code.\n * TODO [+popura]: Refactor to use `popura`.\n *\n * You can also use `popura-cli` since we want help on [feature].\n * TODO [+popura-cli]: Document how to use `popura-cli`.\n */\n```\n\n### CSS\n\nWhen used with [`@eslint/css`](https://github.com/eslint/css), this rule can check CSS block comments too.\n\n```css\n/* TODO [2019-11-15]: Remove this fallback. */\n.outdated {\n\tcolor: hotpink;\n}\n```\n\n### HTML\n\nWhen used with [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint), this rule can check HTML comments too.\n\n```html\n<!-- TODO [2019-11-15]: Remove this fallback. -->\n<div class=\"outdated\"></div>\n```\n\n### JSONC / JSON5\n\nWhen used with [`@eslint/json`](https://github.com/eslint/json), this rule can check line comments in `.jsonc` and `.json5` files too.\n\n```jsonc\n// TODO [2019-11-15]: Update this configuration.\n{\n\t\"key\": \"value\"\n}\n```\n\n### Markdown\n\nWhen used with [`@eslint/markdown`](https://github.com/eslint/markdown), this rule can check HTML comments in Markdown files too.\n\n```md\n<!-- TODO [2019-11-15]: Update this section. -->\n\n# Heading\n```\n\n### YAML\n\nWhen used with [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml), this rule can check comments in YAML files too.\n\n```yaml\n# TODO [2019-11-15]: Update this configuration.\nkey: value\n```\n\n## Disallow Warning Comments (no-warning-comments)\n\nThis rule implements [`eslint/no-warning-comments`](https://eslint.org/docs/rules/no-warning-comments).\n\nThe sole difference is that first we check for **valid conditions** to apply this rule. If no valid conditions are met, we fall back to `eslint/no-warning-comments` if [`allowWarningComments`](#allowwarningcomments) is set to `false` (default `true`) and you'll see something like `Unexpected 'todo': 'TODO: …'.`\n\nThe reason behind this is that now that you have a powerful rule to make sure there are no stray TODOs on your code, you should strive for best practices. Don't just add TODO comments and leave them forever. Define conditions to justify the presence of warning comments.\n\nWith that in mind, you **could** disable that ESLint rule in favor of this one as you will get its same behavior and more.\n\nSince by default the option `allowWarningComments` is `true`, both rules can coexist even with different reporting levels. For example, one might want to error when conditions are met, but just warn on TODOs without conditions (See [`allowWarningComments`](#allowwarningcomments) below).\n\n## Legacy Branches\n\nAlthough this rule works just fine when you maintain a `main` branch, it gets trickier when you have legacy branches that happen to have unclosed TODOs.\n\nImagine you maintain a `main` branch at a version such as 10 and always keep working on it and also keep fixing your TODOs. But your package happens to **publish and support** legacy branches such as 8 and 9 for [long term support](https://en.wikipedia.org/wiki/Long-term_support) with code such as security patches, meaning you might have stray TODOs that won't get fixed and will cause your build to break unless you either fix or drop the TODO.\n\n## Conditions Overview\n\n- `[YYYY-MM-DD]` to define a [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) due date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Dates) format.\n- `[>1]` or `[>=2]` to expire at some version (from package.json). No whitespace.\n- `[+package]` or `[-package]` to expire when you add/remove a package.\n- `[package@>1]` or `[package@>=2]` to expire when a package hits some version. No whitespace.\n- `[peer:eslint@>9]` or `[peer:eslint@>=9]` to expire when a peer dependency's minimum supported version reaches some version. No whitespace.\n- `[engine:node@>8]` or `[engine:node@>=8]` to expire when the package bumps to the supported engines. No whitespace.\n\n## Overall Information\n\n- Multiple conditions can be separated by comma:\n  `[YYYY-MM-DD, +foo-package, engine:node@>=8, bar-package@>=2]`.\n- You cannot stack multiple dates or multiple versions of\n  your package on the same TODO.\n- You can use either `TODO`, `FIXME`, or `XXX`. You can change\n  these using options. (See [options.terms](#terms)).\n- TODOs may have any string before arguments. Really useful\n  when you want to highlight more information such as author name\n  like `TODO (lubien) [2019-05-30]` or `TODO @lubien [2019-05-30]`.\n- TODOs may or may not have a colon before the message such as\n  `TODO [...]: message` or `TODO [...] message`.\n- If no proper argument is found, you'll be notified that the TODO is useless (See [`eslint/no-warning-comments`](#disallow-warning-comments-no-warning-comments)).\n- CSS, HTML, JSONC, JSON5, Markdown, SOML, TOML, and YAML comments are supported with their respective ESLint plugins.\n\n## Examples\n\n```js\n// ❌\n// With `checkDates: true`\n// TODO [2000-01-01]: I'll fix this next week.\n// TODO [2000-01-01, 2001-01-01]: Multiple dates won't work.\n\n// TODO [>1]: If your package.json version is > 1.\n// TODO [>=1]: If your package.json version is >= 1.\n// TODO [>1, >2]: Multiple package versions won't work.\n\n// TODO [+already-have-pkg]: Since we already have it, this reports.\n// TODO [-we-dont-have-this-package]: Since we don't have, trigger a report.\n\n// TODO [read-pkg@>1]: When `read-pkg` version is > 1 don't forget to do this.\n// TODO [read-pkg@>=5.1.1]: When `read-pkg` version is >= 5.1.1 don't forget to do that.\n\n// TODO [peer:eslint@>=8]: Whoops, our minimum supported `eslint` is already >= 8.\n\n// TODO [engine:node@>=8]: Whoops, we are already supporting it!\n\n// TODO: Add unicorns.\n```\n\n```js\n// ✅\n// TODO [2200-12-25]: Too long... Can you feel it?\n// FIXME [2200-12-25]: Too long... Can you feel it?\n\n// TODO (lubien) [2200-12-12]: You can add something before the arguments.\n// TODO @lubien [2200-12-12]: You can add something before the arguments.\n// FIXME [2200-12-25] (lubien): You can add something after the arguments, before the colon.\n// TODO [2200-12-12] No colon after argument.\n\n// TODO [+react]: Refactor this when we use React.\n// TODO [-lodash]: If we remove lodash we need to change this.\n\n// TODO [lodash@>10]: Lodash has a new way to do this; when we bump to its version let's use it.\n// TODO [lodash@>=10]: Lodash has a new way to do this; when we bump to its version let's use it.\n\n// TODO [2200-12-25, +popura, lodash@>10]: Combo.\n\n// TODO [peer:eslint@>=99]: When our minimum supported `eslint` reaches v99.\n\n// TODO [engine:node@>12]: When we bump to this Node version we can use import/export.\n\n/*\n * TODO [2200-12-25]: Yet\n * TODO [2200-12-25]: Another\n * TODO [2200-12-25]: Way\n */\n```\n\n## Options\n\n### checkDates\n\nType: `boolean`\\\nDefault: `false`\n\nWhether to check expiration dates.\n\nThis option does not disable date argument validation. For example, TODO comments with multiple dates are still reported as invalid.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: false,\n\t},\n]\n```\n\n### checkDatesOnPullRequests\n\nType: `boolean`\\\nDefault: `false`\n\nWhether to check expiration dates on pull requests.\n\nSometimes developers may send [Pull Requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) at a time when TODO expiry dates are triggered. This means that their code would fail to pass linting, causing a false-positive.\n\nWhen date checks are enabled, this rule will not trigger expiry dates while on Pull Requests by default so that the one responsible for the fix will be the maintainer not the contributor.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: true,\n\t\tcheckDatesOnPullRequests: true,\n\t},\n]\n```\n\n### terms\n\nType: `string[]`\\\nDefault: `['todo', 'fixme', 'xxx']`\n\nAdd or remove TODO verbs.\n\nThe defaults come from the [`eslint/no-warning-comments` rule](https://eslint.org/docs/rules/no-warning-comments#options).\n\nIf you just want to add a verb, make sure to explicitly include the default ones like `['todo', 'fixme', 'xxx', 'mytodo']` or otherwise any default TODO verb will be ignored. Similarly, when you want to remove a verb, leave the others in like `['todo', 'fixme']`.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tterms: [\n\t\t\t'todo',\n\t\t\t'fixme',\n\t\t\t'xxx',\n\t\t],\n\t},\n]\n```\n\n### allowWarningComments\n\nType: `boolean`\\\nDefault: `true`\n\nIgnore TODOs without conditions.\n\nAs mentioned before, the [`eslint/no-warning-comments` rule](#disallow-warning-comments-no-warning-comments) will be triggered when there are no valid conditions on a TODO comment.\n\nThis is helpful if you want to use **both** this rule and the [`eslint/no-warning-comments` rule](#disallow-warning-comments-no-warning-comments), **but want different warning levels**, as it's not possible to set multiple warning levels on the same rule.\n\nIf you want this rule to trigger on stray TODO conditions, you can enable this fallback rule with this option.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tallowWarningComments: false,\n\t},\n]\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nIgnore TODOs matching any of the given regex patterns. This option is only useful if you have `allowWarningComments` set to `false`.\n\nWhen a string is given, it will be interpreted as a regular expression inside of a string.\n\nDon't forget that you must escape special characters in string regexes. If you want to ignore numbers with `\\d` for example, to match `#\\d`, you must use `/#\\d/` or `'#\\\\d'`.\n\nAs an example of this option, if you want this rule to **completely ignore** comments containing references to GitHub issues, you can do so by ignoring `\"#\\\\d+\"`:\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tallowWarningComments: false,\n\t\tignore: [\n\t\t\t'#\\\\d+',\n\t\t\t/issue-\\d+/i,\n\t\t],\n\t},\n]\n```\n\n### date\n\nType: `string` (`date` format)\\\nDefault: `<today>`\n\nFor TODOs with date deadlines, this option makes them trigger only if the deadline is later than the specified date. You could set this to a date in the future to find TODOs that expire soon, or set it far in the past if you want to ignore recently-expired TODOs.\n\nThe format must match [json-schema's date](https://json-schema.org/understanding-json-schema/reference/string.html#dates-and-times).\n\n### examples\n\nFind tech debt that has grown up and gone to college by triggering the rule only for incredibly old TODOs:\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: true,\n\t\tdate: '2000-01-01',\n\t},\n]\n```\n\nPrepare for the future by triggering the rule on known Y3K bugs:\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: true,\n\t\tdate: '3000-01-01',\n\t},\n]\n```\n","docs/rules/explicit-length-check.md":"# explicit-length-check\n\n📝 Enforce explicitly comparing the `length` or `size` property of a value.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nExplicit comparisons make empty and non-empty intent clear instead of relying on the truthiness of a numeric property.\n\nThis rule is fixable, unless it's [unsafe to fix](#unsafe-to-fix-case).\n\nIn Vue templates, checks inside event handler statement bodies or block statements are reported without fixes or suggestions.\n\n## Zero comparisons\n\nEnforce comparison with `=== 0` when checking for zero length.\n\n### Examples\n\n```js\n// ❌\nconst isEmpty = !foo.length;\n\n// ❌\nconst isEmpty = foo.length == 0;\n\n// ❌\nconst isEmpty = foo.length < 1;\n\n// ❌\nconst isEmpty = foo.length <= 0;\n\n// ❌\nconst isEmpty = 0 === foo.length;\n\n// ❌\nconst isEmpty = 0 == foo.length;\n\n// ❌\nconst isEmpty = 1 > foo.length;\n\n// ❌\n// Negative style is disallowed too\nconst isEmpty = !(foo.length > 0);\n\n// ✅\nconst isEmpty = foo.length === 0;\n```\n\n```js\n// ❌\nconst isEmptySet = !foo.size;\n\n// ✅\nconst isEmptySet = foo.size === 0;\n```\n\n```vue\n<template>\n\t<!-- ❌ -->\n\t<div v-if=\"!foo.length\">Vue</div>\n\n\t<!-- ✅ -->\n\t<div v-if=\"foo.length === 0\">Vue</div>\n</template>\n```\n\n## Non-zero comparisons\n\nEnforce comparison with `> 0` when checking for non-zero length.\n\n### Examples\n\n```js\n// ❌\nconst isNotEmpty = foo.length !== 0;\n\n// ❌\nconst isNotEmpty = foo.length != 0;\n\n// ❌\nconst isNotEmpty = foo.length >= 1;\n\n// ❌\nconst isNotEmpty = 0 !== foo.length;\n\n// ❌\nconst isNotEmpty = 0 != foo.length;\n\n// ❌\nconst isNotEmpty = 0 < foo.length;\n\n// ❌\nconst isNotEmpty = 1 <= foo.length;\n\n// ❌\nconst isNotEmpty = Boolean(foo.length);\n\n// ❌\n// Negative style is disallowed too\nconst isNotEmpty = !(foo.length === 0);\n\n// ✅\nconst isNotEmpty = foo.length > 0;\n```\n\n```js\n// ❌\nif (foo.length || bar.length) {}\n\n// ✅\nif (foo.length > 0 || bar.length > 0) {}\n```\n\n```js\n// ❌\nconst unicorn = foo.length ? 1 : 2;\n\n// ✅\nconst unicorn = foo.length > 0 ? 1 : 2;\n```\n\n```js\n// ❌\nwhile (foo.length) {}\n\n// ✅\nwhile (foo.length > 0) {}\n```\n\n```js\n// ❌\ndo {} while (foo.length);\n\n// ✅\ndo {} while (foo.length > 0);\n```\n\n```js\n// ❌\nfor (; foo.length; ) {};\n\n// ✅\nfor (; foo.length > 0; ) {};\n```\n\n### Options\n\nYou can define your preferred way of checking non-zero length by providing a `non-zero` option (`greater-than` by default):\n\n```js\n{\n\t'unicorn/explicit-length-check': [\n\t\t'error',\n\t\t{\n\t\t\t'non-zero': 'not-equal'\n\t\t}\n\t]\n}\n```\n\nThe `non-zero` option can be configured with one of the following:\n\n- `greater-than` (default)\n  - Enforces non-zero to be checked with: `foo.length > 0`\n- `not-equal`\n  - Enforces non-zero to be checked with: `foo.length !== 0`\n\nThis rule does not support Yoda-style comparisons like `0 < foo.length`. If you use [`eslint/yoda`](https://eslint.org/docs/latest/rules/yoda), configure it to allow non-Yoda style for relational comparisons.\n\n## Unsafe to fix case\n\n`.length` check inside some expressions are not safe to fix.\n\nExample:\n\n```js\nconst bothNotEmpty = (a, b) => a.length && b.length;\n\nif (bothNotEmpty(foo, bar)) {}\n```\n\nIn this case, the `bothNotEmpty` function returns a `number`, but it will most likely be used as a `boolean`. The rule will still report this as an error, but without an auto-fix. You can apply a [suggestion](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions) in your editor, which will fix it to:\n\n```js\nconst bothNotEmpty = (a, b) => a.length > 0 && b.length > 0;\n\nif (bothNotEmpty(foo, bar)) {}\n```\n\n`!foo.length` used as the left side of a comparison is also unsafe to fix due to operator precedence.\n\n```js\n// ❌\nif (!foo.length > 0) {}\n```\n\nThe rule is smart enough to know some `LogicalExpression`s are safe to fix, like when it's inside `if`, `while`, etc.\n","docs/rules/explicit-timer-delay.md":"# explicit-timer-delay\n\n📝 Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen using [`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) or [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval), the `delay` parameter is optional and defaults to `0`. This rule allows you to enforce whether the `delay` argument should always be explicitly provided or omitted when it's `0`.\n\n## Examples\n\n```js\n// ❌\nsetTimeout(() => console.log('Hello'));\n\n// ✅\nsetTimeout(() => console.log('Hello'), 0);\n```\n\n```js\n// ❌\nsetInterval(callback);\n\n// ✅\nsetInterval(callback, 0);\n```\n\n```js\n// ❌\nwindow.setTimeout(() => console.log('Hello'));\n\n// ✅\nwindow.setTimeout(() => console.log('Hello'), 0);\n```\n\n```js\n// ❌\nglobalThis.setInterval(callback);\n\n// ✅\nglobalThis.setInterval(callback, 0);\n```\n\n```js\n// ✅\nsetTimeout(() => console.log('Hello'), 1000);\nsetInterval(callback, 100);\n```\n\n## Options\n\nType: `string`\\\nDefault: `'always'`\n\n- `'always'` (default)\n  - Require explicit `delay` argument for clarity.\n- `'never'`\n  - Disallow explicit `0` delay, prefer implicit default. Non-zero delays are still allowed.\n\n### `'never'`\n\n```js\n{\n\t'unicorn/explicit-timer-delay': ['error', 'never']\n}\n```\n\n```js\n// ❌\nsetTimeout(() => console.log('Hello'), 0);\n\n// ✅\nsetTimeout(() => console.log('Hello'));\n```\n\n```js\n// ❌\nsetInterval(callback, 0);\n\n// ✅\nsetInterval(callback);\n```\n\n```js\n// ❌\nwindow.setTimeout(() => console.log('Hello'), 0);\n\n// ✅\nwindow.setTimeout(() => console.log('Hello'));\n```\n\n```js\n// ❌\nglobalThis.setInterval(callback, 0);\n\n// ✅\nglobalThis.setInterval(callback);\n```\n\n```js\n// ✅\nsetTimeout(() => console.log('Hello'), 1000);\nglobalThis.setInterval(callback, 100);\n```\n","docs/rules/filename-case.md":"# filename-case\n\n📝 Enforce a case style for filenames and directory names.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces filenames and directory names of linted files to use a certain case style and lowercase file extension. The default is `kebabCase`.\n\nConsistent paths make files predictable to find and import, including on case-sensitive filesystems.\n\nBecause this rule only inspects the path, it applies to files of any language, not just JavaScript, as long as they are linted with the matching ESLint language plugin (for example [`@eslint/css`](https://github.com/eslint/css) or [`@eslint/markdown`](https://github.com/eslint/markdown)).\n\nNamed virtual files created by processors are ignored to avoid duplicate reports for one physical file.\n\nDirectory names are checked only when the file is inside the current working directory. Files outside the current working directory only have their filename checked.\n\nConventional lowercase entrypoint filenames `index.js`, `index.mjs`, `index.cjs`, `index.ts`, `index.tsx`, and `index.vue` are intentionally ignored, including when `pascalCase` is selected. Their parent directories are still checked.\n\nCharacters other than `a-z`, `A-Z`, `0-9`, `-`, and `_` are ignored for casing and kept as-is in suggested names.\n\nThe case check ignores path segments starting with `$`, as they are commonly used for route parameters.\n\nSet the `checkDirectories` option to `false` to only check filenames.\n\n## Cases\n\n### `kebabCase`\n\n- `foo-bar.js`\n- `foo-bar.test.js`\n- `foo-bar.test-utils.js`\n\n### `camelCase`\n\n- `fooBar.js`\n- `fooBar.test.js`\n- `fooBar.testUtils.js`\n\n### `camelCaseWithAcronyms`\n\n- `innerHTML.js`\n- `getDOMRangeRect.js`\n- `apiURL.js`\n\nThis case style is still lower camel case. Leading acronyms are lowercased, for example `HTMLParser.js` should be `htmlParser.js`.\n\n### `snakeCase`\n\n- `foo_bar.js`\n- `foo_bar.test.js`\n- `foo_bar.test_utils.js`\n\n### `pascalCase`\n\n- `FooBar.js`\n- `FAQPage.js`\n- `FooBar.Test.js`\n- `FooBar.TestUtils.js`\n\n## Options\n\n### case\n\nType: `'camelCase' | 'camelCaseWithAcronyms' | 'snakeCase' | 'kebabCase' | 'pascalCase'`\n\nYou can set the `case` option like this:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'kebabCase',\n\t},\n]\n```\n\n### cases\n\nType: `{camelCase?: boolean, camelCaseWithAcronyms?: boolean, snakeCase?: boolean, kebabCase?: boolean, pascalCase?: boolean}`\n\nYou can set the `cases` option to allow multiple cases:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcases: {\n\t\t\tcamelCase: true,\n\t\t\tpascalCase: true,\n\t\t},\n\t},\n]\n```\n\nFor React projects, allow both kebab-case and PascalCase:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcases: {\n\t\t\tkebabCase: true,\n\t\t\tpascalCase: true,\n\t\t},\n\t},\n]\n```\n\nTo enforce PascalCase only for TypeScript and TSX files, use ESLint's `files` config:\n\n```js\nimport typescriptEslintParser from '@typescript-eslint/parser';\nimport {defineConfig} from 'eslint/config';\nimport unicorn from 'eslint-plugin-unicorn';\n\nexport default defineConfig([\n\t{\n\t\tplugins: {\n\t\t\tunicorn,\n\t\t},\n\t\trules: {\n\t\t\t'unicorn/filename-case': [\n\t\t\t\t'error',\n\t\t\t\t{\n\t\t\t\t\tcase: 'kebabCase',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\t{\n\t\tfiles: ['**/*.{ts,tsx}'],\n\t\tlanguageOptions: {\n\t\t\tparser: typescriptEslintParser,\n\t\t\tparserOptions: {\n\t\t\t\tecmaFeatures: {\n\t\t\t\t\tjsx: true,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\trules: {\n\t\t\t'unicorn/filename-case': [\n\t\t\t\t'error',\n\t\t\t\t{\n\t\t\t\t\tcase: 'pascalCase',\n\t\t\t\t\tcheckDirectories: false,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]);\n```\n\nThe override disables directory checking because rule options apply to both filenames and directory names.\n\nThe rule intentionally does not detect JSX syntax or React component exports. Non-component files can contain JSX too, like entrypoints, route files, tests, and `index.js`.\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nPath segments to ignore. If any path segment matches, the file is ignored.\n\nWhen a string is given, it's interpreted as a regular expression.\n\nSometimes you may have non-standard filenames or directory names in a project. This option lets you ignore those files or directories.\n\nFor example:\n\n- Vendor packages that are copied into the project.\n- Conventionally named files such as `README.md`.\n- Some tools may require special names for some files.\n- Ignore a directory and everything in it.\n\nDon't forget that you must escape special characters that you don't want to be interpreted as part of the regex, for example, if you have `[` in the actual path segment. For example, to match `[id].js`, use `/^\\[id]\\.js$/` or `'^\\\\[id]\\\\.js$'`.\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'kebabCase',\n\t\tignore: [\n\t\t\t'^FOOBAR\\\\.js$',\n\t\t\t'^vendor$',\n\t\t\t'^(B|b)az',\n\t\t\t'\\\\.SOMETHING\\\\.js$',\n\t\t\t/^fixtures$/i,\n\t\t],\n\t},\n]\n```\n\n### checkDirectories\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to check directory names. Filenames are always checked.\n\n### directoryRoots\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nDirectory roots below which directory names are checked. The matched root and its ancestors are skipped. Strings match exact `/`-separated paths relative to ESLint's current working directory. Regular expressions match the same paths; anchor them to avoid unintended deeper matches. The deepest match is used.\n\nFor example, check PascalCase directory names below multiple source roots:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'pascalCase',\n\t\tdirectoryRoots: [\n\t\t\t'app/javascript',\n\t\t\t/^packages\\/[^/]+\\/src$/u,\n\t\t],\n\t},\n]\n```\n\n### multipleFileExtensions\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to treat additional, `.`-separated parts of a filename as parts of the extension rather than parts of the filename.\n\nNote that the parts of the filename treated as the extension will not have the filename case enforced.\n\nThis only affects filenames. When `checkDirectories` is enabled, directory names are checked as full path segments.\n\nFor example:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'pascalCase',\n\t},\n]\n\n// Results\n✅ FooBar.Test.js\n✅ FooBar.TestUtils.js\n✅ FooBar.testUtils.js\n✅ FooBar.test.js\n✅ FooBar.test-utils.js\n✅ FooBar.test_utils.js\n```\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'pascalCase',\n\t\tmultipleFileExtensions: false,\n\t},\n]\n\n// Results\n✅ FooBar.Test.js\n✅ FooBar.TestUtils.js\n❌ FooBar.testUtils.js\n❌ FooBar.test.js\n❌ FooBar.test-utils.js\n❌ FooBar.test_utils.js\n```\n","docs/rules/id-match.md":"# id-match\n\n📝 Require identifiers to match a specified regular expression.\n\n🚫 Disabled by default.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule is the same as the built-in ESLint [`id-match`](https://eslint.org/docs/latest/rules/id-match) rule, but with an additional `checkNamedSpecifiers` option.\n\nEnforcing an identifier pattern prevents names from drifting from a project's naming convention while keeping that convention configurable.\n\n## Replacement for ESLint `id-match`\n\nThis rule replaces ESLint's built-in `id-match` rule, which Unicorn presets disable when this rule is enabled.\n\n## Examples\n\n```js\n/* eslint unicorn/id-match: [\"error\", \"^[a-z]+$\"] */\n\n// ❌\nconst foo$ = 1;\n\n// ✅\nconst foo = 1;\n```\n\n## CSS and HTML\n\nIn CSS, the rule checks class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media. Dotted layer segments are checked separately. CSS escapes are decoded, and leading `--` is excluded when matching custom-property and custom-media names. Built-in value keywords and `animation` shorthand values are skipped.\n\nIn HTML, it checks `id` and individual `class` names after decoding character references, retaining any leading `--`. Empty or templated values are skipped. Character references make diagnostics span the whole attribute value. JavaScript-only options do not apply to CSS or HTML. Names have no autofix because references elsewhere may need updating.\n\n## Options\n\nThis rule supports the same options as ESLint `id-match`.\n\n### `properties`\n\nSet `properties` to `true` to check object and member property names.\n\n### `classFields`\n\nSet `classFields` to `true` to check class field names.\n\n### `onlyDeclarations`\n\nSet `onlyDeclarations` to `true` to only check declared identifiers.\n\n### `ignoreDestructuring`\n\nSet `ignoreDestructuring` to `true` to ignore identifiers in destructuring patterns.\n\n### `checkNamedSpecifiers`\n\nSet `checkNamedSpecifiers` to `false` to ignore named import specifiers and external named export specifiers:\n\n```js\n/* eslint unicorn/id-match: [\"error\", \"^[a-z]+$\", {\"checkNamedSpecifiers\": false}] */\n\n// ✅\nimport {foo$} from 'module';\n\n// ✅\nexport {foo$} from 'module';\n```\n\nOnly named import specifiers and external named export specifiers are ignored. Default imports, namespace imports, namespace re-exports, local export specifiers, and later references to imported bindings are still checked:\n\n```js\n/* eslint unicorn/id-match: [\"error\", \"^[a-z]+$\", {\"checkNamedSpecifiers\": false}] */\n\n// ❌\nimport foo$ from 'module';\n\n// ❌\nimport * as foo$ from 'module';\n\n// ❌\nexport * as foo$ from 'module';\n\n// ❌\nconst foo = 1;\nexport {foo as bar$};\n\n// ✅\nimport {bar$} from 'module';\n\n// ❌\nconst foo = bar$;\n```\n","docs/rules/import-style.md":"# import-style\n\n📝 Enforce specific import styles per module.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nSometimes a module contains unrelated functions, like `util`, thus it is a good practice to enforce destructuring or named imports here. Other times, in modules like `path`, it is good to use default import as they have similar functions, all likely to be utilized.\n\nThis rule applies to modules listed in the `styles` option and the default styles below. Other imports are not affected.\n\nThis rule defines 4 import styles:\n\n- `unassigned` - `import 'foo'` or `require('foo')`\n- `default` - `import path from 'path'` or `const path = require('path')`\n- `namespace` - `import * as path from 'path'` or `const path = require('path')`\n- `named` - `import {inspect} from 'util'` or `const {inspect} = require('util')`\n\n## Examples\n\n```js\n// ❌\nconst util = require('node:util');\n\n// ✅\nconst {promisify} = require('node:util');\n```\n\n```js\n// ❌\nimport util from 'node:util';\n\n// ❌\nimport * as util from 'node:util';\n\n// ✅\nimport {promisify} from 'node:util';\n```\n\n```js\n// ❌\nimport * as path from 'node:path';\n\n// ✅\nimport path from 'node:path';\n```\n\n## Options\n\n### styles\n\nType: `object`\n\nYou can extend default import styles per module by passing the `styles` option.\n\nDefault options per module are:\n\n- `chalk` - `default` only\n- `path` - `default` only\n- `util` - `named` only\n\nImports with the `node:` protocol are matched as if the protocol were omitted. For example, `node:util` uses the same style as `util`. Configure these modules by their bare name, like `util` or `path`.\n\nThe example below:\n\n- Disables any restrictions on the `util` module imports.\n- Allows `named` import (leaving `default` allowed too) from the `path` module (by default only `default` import of `path` is allowed).\n\n```js\n'unicorn/import-style': [\n\t'error',\n\t{\n\t\tstyles: {\n\t\t\tutil: false,\n\t\t\tpath: {\n\t\t\t\tnamed: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\nDo not set all styles to `false` for a module. To disallow a module entirely, use the [`no-restricted-imports`](https://eslint.org/docs/latest/rules/no-restricted-imports) rule instead.\n\n### extendDefaultStyles\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"extendDefaultStyles\": false` to override the default `styles` option completely.\n\n### checkImport\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkImport\": false` to disable linting of static import statements (like `import ... from 'foo'` or `import 'foo'`) completely.\n\n### checkDynamicImport\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkDynamicImport\": false` to disable linting of dynamic import statements (like `await import('foo')`) completely.\n\n### checkExportFrom\n\nType: `boolean`\\\nDefault: `false`\n\nPass `\"checkExportFrom\": true` to enable linting of export-from statements (like `export ... from 'foo'`).\n\n### checkRequire\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkRequire\": false` to disable linting of `require` calls completely.\n","docs/rules/indent.md":"# indent\n\n📝 Enforce consistent indentation in JSON and CSS.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce leading indentation in JSON, JSONC, and JSON5 ([`@eslint/json`](https://github.com/eslint/json)) and CSS ([`@eslint/css`](https://github.com/eslint/css)). JSON checks nesting depth; CSS checks indentation style only.\n\nJavaScript and TypeScript are excluded because their statements and expressions need more detailed indentation rules. Use [`@stylistic/indent`](https://eslint.style/rules/indent) for those languages.\n\n## Options\n\n### `indent`\n\nType: `'tab' | integer`\\\nDefault: `'tab'`\n\nUse tabs, or a positive integer to set the number of spaces per indentation unit. Mixed tabs and spaces are rejected.\n\n```js\n{\n\t'unicorn/indent': [\n\t\t'error',\n\t\t{\n\t\t\tindent: 2,\n\t\t},\n\t],\n}\n```\n\n### `tabWidth`\n\nType: `integer`\\\nDefault: `4`\n\nA positive integer tab stop width for CSS conversion, whether converting to tabs or spaces. Ignored for JSON.\n\n## Examples\n\n### JSON\n\nEach open object or array adds one level. A line starting with `}` or `]` uses one level less; only the first closing delimiter determines that line's indentation. Top-level content is unindented.\n\nFor `{indent: 2}`:\n\n```json\n{\n  \"items\": [\n    true\n  ]\n}\n```\n\nStrings and comments do not affect depth. JSON5 indentation whitespace, including non-breaking spaces, is replaced.\n\n### CSS\n\nAccepts any number of tabs in tab mode, or multiples of `indent` spaces in space mode. **Nesting depth is not checked**, so unindented lines are valid anywhere.\n\nFor `{indent: 2}`, both examples pass:\n\n```css\na {\n  color: red;\n}\n\nb {\ncolor: blue;\n}\n```\n\nFixes expand tabs using tab stops, then round width up to a whole indentation unit. With defaults, four spaces become one tab, five become two tabs, and a space followed by a tab becomes one tab. With `{indent: 2, tabWidth: 4}`, a tab followed by a space becomes six spaces.\n\nOnly ASCII spaces and tabs are treated as indentation. Unicode identifier characters, including non-breaking spaces, are preserved.\n\n## Preserved content\n\nPreserves inline spacing, trailing whitespace, line endings, and non-whitespace token contents. Ignores blank lines and continuation lines inside multiline tokens and comments. Indentation before comment openers is checked.\n","docs/rules/isolated-functions.md":"# isolated-functions\n\n📝 Prevent usage of variables from outside the scope of isolated functions.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nSome functions need to be isolated from their surrounding scope due to execution context constraints. For example, functions passed to [`makeSynchronous()`](https://github.com/sindresorhus/make-synchronous) are executed in a worker or subprocess and cannot access variables from outside their scope. This rule helps identify when functions are using external variables that may cause runtime errors.\n\nCommon scenarios where functions must be isolated:\n\n- Functions passed to `makeSynchronous()` (executed in a worker)\n- Functions passed to `workerize()`\n- Functions passed to `page.evaluate()` in Puppeteer or Playwright style code\n- Functions that will be serialized via `Function.prototype.toString()`\n- Server actions or other remote execution contexts\n- Functions with specific JSDoc annotations\n\nBy default, this rule allows ES globals like `Array` and `Map`, and ESLint-resolved global variables from configuration or `/* global */` comments like `console` and `fetch`, in isolated functions, but prevents usage of variables from the surrounding scope.\n\n## Examples\n\n```js\n/* global fetch, console */\nimport makeSynchronous from 'make-synchronous';\n\nconst url = 'https://example.com';\n\nconst getText = makeSynchronous(async () => {\n\tconst response = await fetch(url); // ❌ 'url' is not defined in isolated function scope\n\treturn response.text();\n});\n\n// ✅ Define all variables within isolated function's scope\nconst getText = makeSynchronous(async () => {\n\tconst url = 'https://example.com'; // Variable defined within function scope\n\tconst response = await fetch(url);\n\treturn response.text();\n});\n\n// ✅ Alternative: Pass as parameter\nconst getText = makeSynchronous(async (url) => { // Variable passed as parameter\n\tconst response = await fetch(url);\n\treturn response.text();\n});\n\nconsole.log(getText('https://example.com'));\n```\n\n```js\nconst foo = 'hi';\n\n/** @isolated */\nfunction abc() {\n\treturn foo.slice(); // ❌ 'foo' is not defined in isolated function scope\n}\n\nconst object = {\n\t/** @isolated */\n\tmethod() {\n\t\treturn this.foo; // ❌ 'this' depends on external object state\n\t},\n};\n\n// ✅\n/** @isolated */\nfunction abc() {\n\tconst foo = 'hi'; // Variable defined within function scope\n\treturn foo.slice();\n}\n```\n\n## Options\n\nType: `object`\n\n### functions\n\nType: `string[]`\\\nDefault: `['makeSynchronous', 'workerize']`\n\nArray of function names that create isolated execution contexts. Functions passed as arguments to these functions will be considered isolated.\n\nThe rule also detects these common isolated execution APIs by default:\n\n- `browser.execute(fn)`\n- `page.evaluate(fn)`\n- `chrome.scripting.executeScript({func: () => {}})`\n- `browser.scripting.executeScript({func: () => {}})`\n\nGeneric names like `serialize`, `isolate`, and `memoize` are not enabled by default. Add project-specific serializer names to `functions` when they should be treated as isolated.\n\nOther `evaluate` calls are not enabled by default. Use `selectors` to opt into project-specific APIs that do not use the variable name `page`.\n\n### selectors\n\nType: `string[]`\\\nDefault: `[]`\n\nArray of [ESLint selectors](https://eslint.org/docs/developer-guide/selectors) to identify isolated functions. Useful for custom naming conventions or framework-specific patterns.\n\nSelectors must match the function node that should be treated as isolated. To isolate functions passed to a matching call expression, use ESLint selector syntax to select the function argument:\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tselectors: [\n\t\t\t\t'FunctionDeclaration[id.name=/lambdaHandler.*/]',\n\t\t\t\t'CallExpression[callee.property.name=/CodemodScript/] > :function'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### comments\n\nType: `string[]`\\\nDefault: `['@isolated']`\n\nArray of comment strings that mark functions as isolated. Functions with inline, block, or JSDoc comments tagged with these strings will be considered isolated. (Definition of \"tagged\": either the comment consists solely of the tag, or starts with it, and has an explanation following a hyphen, like `// @isolated - this function will be stringified`).\n\nTagged comments also apply to object methods, object properties whose value is a function expression or arrow function, and class methods. Isolated functions cannot use `this` or `super`; pass required state as parameters instead.\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tcomments: [\n\t\t\t\t'@isolated',\n\t\t\t\t'@remote'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### overrideGlobals\n\nType: `object`\\\nDefault: `{}`\n\nOverrides how specific global variables are handled. An empty object means no overrides; ES globals and ESLint-resolved globals from configuration or `/* global */` comments still apply. When specified as an object, each key is a global variable name and the value controls its behavior:\n\n- `'readonly'`: Global variable is allowed but cannot be written to\n- `'writable'`: Global variable is allowed and can be read/written\n- `'off'`: Global variable is not allowed\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\toverrideGlobals: {\n\t\t\t\tconsole: 'writable',     // Allowed and writable\n\t\t\t\tfetch: 'readonly',       // Allowed but readonly\n\t\t\t\tprocess: 'off'           // Not allowed\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n## Configuration examples\n\n### Custom function names\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tfunctions: [\n\t\t\t\t'makeSynchronous',\n\t\t\t\t'workerize',\n\t\t\t\t'createWorker',\n\t\t\t\t'serializeFunction'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### Lambda function naming convention\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tselectors: [\n\t\t\t\t'FunctionDeclaration[id.name=/lambdaHandler.*/]'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n```js\nconst foo = 'hi';\n\nfunction lambdaHandlerFoo() { // ❌ Will be flagged as isolated\n\treturn foo.slice();\n}\n\nfunction someOtherFunction() { // ✅ Not flagged\n\treturn foo.slice();\n}\n\ncreateLambda({\n\tname: 'fooLambda',\n\tcode: lambdaHandlerFoo.toString(), // Function will be serialized\n});\n```\n\n### Configured globals\n\n```js\n/* global console, fetch */\n\nmakeSynchronous(async () => {\n\tconsole.log('Starting...'); // ✅ Allowed if console is configured as a global\n\tconst response = await fetch('https://api.example.com'); // ✅ Allowed if fetch is configured as a global\n\treturn response.text();\n});\n```\n\n### Overriding specific globals\n\n`overrideGlobals` only overrides the listed names. It does not replace ES globals or ESLint-resolved globals from configuration or `/* global */` comments.\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\toverrideGlobals: {\n\t\t\t\tconsole: 'writable',     // Allowed and writable\n\t\t\t\tfetch: 'readonly',       // Allowed but readonly\n\t\t\t\tURL: 'readonly'          // Allowed but readonly\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n```js\n// ✅ All globals used are ES globals, ESLint-resolved globals, or explicitly overridden\nmakeSynchronous(async () => {\n\tconsole.log('Starting...'); // ✅ Allowed global\n\tconst response = await fetch('https://api.example.com'); // ✅ Allowed global\n\tconst url = new URL(response.url); // ✅ Allowed global\n\treturn response.text();\n});\n\nmakeSynchronous(async () => {\n\tconst response = await fetch('https://api.example.com', {\n\t\theaders: {\n\t\t\t'Authorization': `Bearer ${process.env.API_TOKEN}` // ❌ 'process' is not configured as an ESLint global or overrideGlobals entry\n\t\t}\n\t});\n\n\tconst url = new URL(response.url);\n\n\treturn response.text();\n});\n\n// ❌ Attempting to write to readonly global\nmakeSynchronous(async () => {\n\tfetch = null; // ❌ 'fetch' is readonly\n\tconsole.log('Starting...');\n});\n```\n\n### Predefined global variables\n\nTo enable a predefined set of globals, use the [`globals` package](https://npmjs.com/package/globals) similarly to how you would use it in `languageOptions` (see [ESLint docs on globals](https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables)):\n\n```js\nimport {defineConfig} from 'eslint/config';\nimport unicorn from 'eslint-plugin-unicorn';\nimport globals from 'globals';\n\nexport default defineConfig([\n\t{\n\t\tplugins: {\n\t\t\tunicorn,\n\t\t},\n\t\tlanguageOptions: {\n\t\t\tglobals: {\n\t\t\t\t...globals.builtin,\n\t\t\t\t...globals.applescript,\n\t\t\t\t...globals.greasemonkey,\n\t\t\t},\n\t\t},\n\t\trules: {\n\t\t\t'unicorn/isolated-functions': [\n\t\t\t\t'error',\n\t\t\t],\n\t\t},\n\t},\n]);\n```\n","docs/rules/iteration-fallback-style.md":"# iteration-fallback-style\n\n📝 Enforce a consistent style for optional loop sources.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce a consistent style for optional loop sources. A guard skips the loop without creating an empty collection, while a fallback keeps the loop compact. The `guard` style is the default.\n\nThe rule checks direct `for…of` and `for await…of` loops that use empty array fallbacks or matching guards, loops over `Object.keys()`, `Object.values()`, or `Object.entries()` that use empty object fallbacks or matching guards, and `for…in` loops with empty object fallbacks or matching guards.\n\n## Examples\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'guard'] */\n\n// ❌\nfor (const item of items || []) {\n\tuse(item);\n}\n\n// ✅\nif (items) {\n\tfor (const item of items) {\n\t\tuse(item);\n\t}\n}\n```\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'guard'] */\n\n// ❌\nfor (const [key, value] of Object.entries(options.config || {})) {\n\tuse(key, value);\n}\n\n// ✅\nif (options.config) {\n\tfor (const [key, value] of Object.entries(options.config)) {\n\t\tuse(key, value);\n\t}\n}\n```\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'fallback'] */\n\n// ❌\nif (items) {\n\tfor (const item of items) {\n\t\tuse(item);\n\t}\n}\n\n// ✅\nfor (const item of items || []) {\n\tuse(item);\n}\n```\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'fallback'] */\n\n// ❌\nif (options.config) {\n\tfor (const [key, value] of Object.entries(options.config)) {\n\t\tuse(key, value);\n\t}\n}\n\n// ✅\nfor (const [key, value] of Object.entries(options.config || {})) {\n\tuse(key, value);\n}\n```\n\n## Options\n\nType: `string`\\\nDefault: `'guard'`\n\n### `guard`\n\nPrefer an `if` guard over an empty fallback.\n\n### `fallback`\n\nPrefer an empty fallback over an `if` guard.\n\nTruthiness guards correspond to `||` fallbacks, while `source != null` guards correspond to `??` fallbacks.\n\nOnly direct loop guards and fallbacks are checked. Autofixes are limited to simple synchronous `for…of` loops with reference sources; `for await…of` and `for…in` are reported but not fixed. Getters, Proxies, `document.all`, and enumerable `Object.prototype` properties are not accounted for.\n","docs/rules/key-name-casing.md":"# key-name-casing\n\n📝 Enforce a case style for data keys.\n\n🚫 Disabled by default.\n\n<!-- end auto-generated rule header -->\n\nEnforce a consistent case style for decoded keys in JSON, JSONC, JSON5, SOML, TOML, and YAML. This includes unquoted JSON5 keys, YAML string keys (except plain `<<` merge keys), and TOML key segments, including table names. Non-string YAML keys, tagged, anchored, and alias keys, and string values are skipped.\n\nRenaming keys can break consumers in other files, so the rule has no fixes or suggestions.\n\n## Examples\n\n```jsonc\n// ❌\n{\"user_name\": 1, \"nested\": {\"OtherKey\": 2}}\n\n// ✅\n{\"userName\": 1, \"nested\": {\"otherKey\": 2}}\n```\n\nThe rule also reports YAML `user-name: 1` and TOML `[user_settings]` with the default `camelCase` style.\n\n## Options\n\nType: `object`\n\nEach enabled case is accepted. `camelCase` is enabled by default; set it to `false` when choosing another case exclusively. If all cases are disabled, no keys are checked.\n\n| Option | Default | Example |\n| --- | --- | --- |\n| `camelCase` | `true` | `userName` |\n| `PascalCase` | `false` | `UserName` |\n| `SCREAMING_SNAKE_CASE` | `false` | `USER_NAME` |\n| `'kebab-case'` | `false` | `user-name` |\n| `snake_case` | `false` | `user_name` |\n\nCase styles use canonical conversions from `change-case`. Acronyms are normalized, so `userId` is camelCase while `userID` is not. Empty keys and keys containing whitespace or punctuation fail unless explicitly ignored.\n\n```js\n'unicorn/key-name-casing': ['error', {\n\tcamelCase: false,\n\tsnake_case: true,\n\tSCREAMING_SNAKE_CASE: true,\n}]\n```\n\n### ignore\n\nType: `string[]`\\\nDefault: `[]`\n\nRegular expression patterns matching decoded key names to ignore. Patterns are not automatically anchored. Use `^` and `$` to match a complete name.\n\n```js\n'unicorn/key-name-casing': ['error', {\n\tignore: ['^\\\\$schema$', '^x-'],\n}]\n```\n","docs/rules/logical-assignment-operators.md":"# logical-assignment-operators\n\n📝 Require or disallow logical assignment operator shorthand.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule is the same as the built-in ESLint [`logical-assignment-operators`](https://eslint.org/docs/latest/rules/logical-assignment-operators) rule, but when `enforceForIfStatements` is enabled, falsy `if` assignments are reported with suggestions for both `||=` and `??=` instead of being autofixed.\n\nConsistently choosing logical-assignment shorthand or an explicit assignment or conditional makes updates easier to scan and avoids mixing the same pattern in different forms.\n\n## Replacement for ESLint `logical-assignment-operators`\n\nThis rule replaces ESLint's built-in `logical-assignment-operators` rule, which Unicorn presets disable when this rule is enabled.\n\n## Examples\n\n```js\n/* eslint unicorn/logical-assignment-operators: [\"error\", \"always\", {\"enforceForIfStatements\": true}] */\n\n// ❌\nif (!foo) {\n\tfoo = bar;\n}\n\n// ✅\nfoo ||= bar;\n\n// ✅\nfoo ??= bar;\n```\n\nComputed properties are supported too:\n\n```js\n/* eslint unicorn/logical-assignment-operators: [\"error\", \"always\", {\"enforceForIfStatements\": true}] */\n\n// ❌\nif (!object[key]) {\n\tobject[key] = [];\n}\n\n// ✅\nobject[key] ||= [];\n\n// ✅ When the intent is to replace only null or undefined values\nobject[key] ??= [];\n```\n\nProperty checks such as `key in object`, `object.hasOwnProperty(key)`, `Object.hasOwn(object, key)`, and `Object.keys(object).includes(key)` are not reported. They check for a property rather than a nullish value. For example, an `Object.hasOwn()` guard preserves an own property set to `undefined` and does not treat an inherited `constructor` as an own property. Replacing that guard with `??=` would change both behaviors.\n\n## Options\n\nThis rule supports the same options as ESLint `logical-assignment-operators`.\n","docs/rules/max-nested-calls.md":"# max-nested-calls\n\n📝 Limit the depth of nested calls.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nDeeply nested calls make code hard to read. Extract intermediate results to named variables instead.\n\nThis rule counts calls and constructor calls passed into other calls or constructors. Fluent receiver chains and JSX wrappers are ignored.\n\n## Examples\n\n```js\n// ❌\nfoo(bar(baz(qux())));\n\n// ✅\nconst value = baz(qux());\nfoo(bar(value));\n```\n\n```js\n// ✅\nquery().filter().map().toArray();\n```\n\n## Options\n\n### max\n\nType: `integer`\\\nDefault: `3`\n\nThe maximum allowed nested call depth.\n\n```js\n/* eslint unicorn/max-nested-calls: [\"error\", {\"max\": 4}] */\n// ✅\nfoo(bar(baz(qux())));\n```\n","docs/rules/name-replacements.md":"# name-replacements\n\n📝 Enforce replacements for variable, property, and filenames.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUsing clear names results in more readable code. Code is written only once, but read many times.\n\nThis rule enforces replacements for names, including variables, properties, imports, and filenames. The default replacements focus on common abbreviations, but the rule can also be used to replace terms, disallow words, etc. See the [`replacements`](#replacements) and [`extendDefaultReplacements`](#extenddefaultreplacements) options.\n\nYou can find the default replacements [here](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/rules/shared/name-replacements.js).\n\nThis rule is automatically fixable only for variable names with exactly one replacement defined. Ambiguous variable names and checked property names can be manually fixed with editor suggestions when the rename is local to source text. Filename reports and exported-name property reports do not provide editor suggestions.\n\nParameter names do not provide autofixes or editor suggestions when the function has an attached JSDoc `@param` comment, as those name references are not normal variable references and would otherwise be left stale. TypeScript parameter properties also do not provide autofixes or editor suggestions, as the corresponding class property references are not part of the parameter variable's references. TypeScript type predicate and assertion signature parameter references are updated when the parameter is renamed.\n\nTypeScript enum members are not checked, as a member access like `Foo.err` is not a reference to the member and would not be renamed with it.\n\n## React\n\nReact projects commonly use abbreviation families like `props`, `ref`, `prevState`, and route `params`. The `replacements` option disables matching those words both as complete identifiers and as parts of longer identifiers, for example `someRef`.\n\nUse an ESLint `files` override if you only want to allow those conventions in React files:\n\n```js\n{\n\tfiles: ['**/*.{jsx,tsx}'],\n\trules: {\n\t\t'unicorn/name-replacements': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\treplacements: {\n\t\t\t\t\tparam: false,\n\t\t\t\t\tparams: false,\n\t\t\t\t\tprev: false,\n\t\t\t\t\tprop: false,\n\t\t\t\t\tprops: false,\n\t\t\t\t\tref: false,\n\t\t\t\t\trefs: false,\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n}\n```\n\n## Examples\n\n```js\n// ❌\nconst e = new Error();\n\n// ✅\nconst error = new Error();\n```\n\n```js\n// ❌\nconst e = document.createEvent('Event');\n\n// ✅\nconst event = document.createEvent('Event');\n```\n\n```js\n// ❌\nclass Btn {}\n\n// ✅\nclass Button {}\n```\n\n```js\n// ✅\n// Property is not checked by default\nconst levels = {\n\terr: 0\n};\n```\n\n```js\n// ✅\n// Property is not checked by default\nthis.evt = 'click';\n```\n\n## Data keys, CSS, and HTML\n\nWith `checkProperties: true`, the rule checks JSON object keys, YAML string keys, TOML key segments (including table names), and SOML keys. It skips YAML non-string, tagged, anchored, and alias keys, plus string values.\n\nWith `checkVariables` (enabled by default), it checks CSS class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media, plus HTML `id` and individual `class` names. Built-in CSS property names and value keywords, and `animation` shorthand values are skipped. CSS escapes and HTML character references are decoded; templated HTML values are skipped.\n\nIgnore patterns match full decoded names, including `--`. Data and CSS/HTML diagnostics have no fixes or suggestions because names may be referenced elsewhere. `checkFilenames` also applies to data, CSS, and HTML files.\n\n## Options\n\nType: `object`\n\n### replacements\n\nType: `object`\n\nYou can extend default replacements by passing the `replacements` option.\n\nUse this to configure discouraged terms and their replacements. To allow a specific full identifier, use [`allowList`](#allowlist) instead.\n\nLowercase replacements will match both camelcase and pascalcase identifiers. For example, `err` will match both `err` and `Err`. `errCb` will match both `errCb` and `ErrCb`.\n\nLowercase replacements will match both complete identifiers and separate words inside identifiers. For example, `cmd` will match all of `cmd`, `createCmd` and `CmdFactory`.\n\nCamelcase replacements will only match complete identifiers. For example `errCb` will only match `errCb` and `ErrCb`. It will not match `fooErrCb` or `errCbFoo`.\n\nThe example below:\n\n- disables the default `e` → `event` replacement (leaving `e` → `error` enabled),\n- disables `res` replacement completely (both `res` → `response` and `res` → `result` from defaults are disabled),\n- adds a custom `usr` → `user` replacement,\n- adds a custom `errCb` → `handleError` replacement.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\te: {\n\t\t\t\tevent: false,\n\t\t\t},\n\t\t\tres: false,\n\t\t\tusr: {\n\t\t\t\tuser: true,\n\t\t\t},\n\t\t\terrCb: {\n\t\t\t\thandleError: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"extendDefaultReplacements\": false` to override the default `replacements` completely.\n\nThe example below disables all the default replacements and enables a custom `usr` → `user` one.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\textendDefaultReplacements: false,\n\t\treplacements: {\n\t\t\tusr: {\n\t\t\t\tuser: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\nDefaults can also include terminology preferences that are not abbreviations. Use custom replacements for project-specific preferences:\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\tpage: {\n\t\t\t\tscreen: true,\n\t\t\t},\n\t\t\tpages: {\n\t\t\t\tscreens: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\n### allowList\n\nType: `object`\n\nYou can extend the default allowList by passing the `allowList` option.\n\nUnlike the `replacements` option, `allowList` matches full identifier names case-sensitively.\n\nFor example, if you want to report `props` → `properties` (enabled by default), but allow `getInitialProps`, you could use the following configuration.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\tallowList: {\n\t\t\tgetInitialProps: true,\n\t\t},\n\t},\n]\n```\n\nFor example, `allowList: {elementRef: true}` allows `elementRef` while still reporting `ref`.\n\n### extendDefaultAllowList\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"extendDefaultAllowList\": false` to override the default `allowList` completely.\n\n### checkDefaultAndNamespaceImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in default or namespace import, **but only for internal modules**.\n- `true` - Check variables declared in default or namespace import.\n- `false` - Don't check variables declared in default or namespace import.\n\nBy default, the following code will be reported:\n\n```js\nimport * as err from './err';\n```\n\n```js\nimport err from '/err';\n```\n\nWith this set to `true`, the following code will be reported:\n\n```js\nimport tempWrite from 'temp-write';\n```\n\n```js\nimport * as err from 'err';\n```\n\n### checkShorthandImports\n\nType: `'internal'` | `boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in shorthand import, **but only for internal modules**.\n- `true` - Check variables declared in shorthand import.\n- `false` - Don't check variables declared in default shorthand import.\n\nBy default, the following code will be reported:\n\n```js\nimport {prop} from './foo';\n```\n\nWith this set to `true`, the following code will be reported:\n\n```js\nimport {prop} from 'ramda';\n```\n\n### checkShorthandProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `\"checkShorthandProperties\": true` to check variables declared as shorthand properties in object destructuring.\n\nWith this set to `true` the following code will be reported.\n\n```js\nconst {err} = foo;\n```\n\n```js\nfunction f({err}) {}\n```\n\n### checkProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `\"checkProperties\": true` to enable checking property names.\n\n### checkVariables\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkVariables\": false` to disable checking variable names.\n\n### checkFilenames\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkFilenames\": false` to disable checking filenames.\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nThis option lets you specify a regex pattern for matches to ignore.\n\nWhen a string is given, it's interpreted as a regular expression inside a string.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'\\\\.fixtures$',\n\t\t\t/^ignore/i,\n\t\t],\n\t},\n]\n```\n\nWhen checking filenames, only the basename is tested. For example, with a file named `foo.fixtures.js`, `ignore: [/\\.fixtures$/]` would pass and `ignore: [/\\.fixtures\\.js/]` would fail.\n","docs/rules/new-for-builtins.md":"# new-for-builtins\n\n📝 Enforce correct use of `new` for builtin constructors.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nMany builtin constructors can be called with or without `new`, but `new` should be preferred for consistency with constructors that require it. This rule also reports selected builtin namespace objects that are not callable or constructible.\n\nFor non-callable top-level namespace objects covered by ESLint core, like `Math`, `JSON`, `Reflect`, `Atomics`, `Intl`, and `Temporal`, use [`no-obj-calls`](https://eslint.org/docs/latest/rules/no-obj-calls).\n\nEnforces the use of `new` for the following builtins:\n\n- [`Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n- [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)\n- [`AsyncDisposableStack`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncDisposableStack)\n- [`BigInt64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array)\n- [`BigUint64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array)\n- [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)\n- [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`DisposableStack`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DisposableStack)\n- [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)\n- [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError)\n- [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError)\n- [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array)\n- [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array)\n- [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array)\n- [`Function`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)\n- [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array)\n- [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array)\n- [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array)\n- [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)\n- [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError)\n- [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError)\n- [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)\n- [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)\n- [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet)\n- [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n- [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n- [`SuppressedError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SuppressedError)\n- [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError)\n- [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError)\n- [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)\n- [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array)\n- [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array)\n- [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray)\n- [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)\n- [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer)\n- [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy)\n- [`WeakRef`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef)\n- [`FinalizationRegistry`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry)\n- [`Intl.Collator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator)\n- [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)\n- [`Intl.DisplayNames`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames)\n- [`Intl.DurationFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat)\n- [`Intl.ListFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat)\n- [`Intl.Locale`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale)\n- [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat)\n- [`Intl.PluralRules`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules)\n- [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat)\n- [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)\n- [`Temporal.Duration`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration)\n- [`Temporal.Instant`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant)\n- [`Temporal.PlainDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate)\n- [`Temporal.PlainDateTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime)\n- [`Temporal.PlainMonthDay`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay)\n- [`Temporal.PlainTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime)\n- [`Temporal.PlainYearMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth)\n- [`Temporal.ZonedDateTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime)\n- [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module)\n- [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Instance)\n- [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Memory)\n- [`WebAssembly.Table`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Table)\n- [`WebAssembly.Global`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Global)\n- [`WebAssembly.Tag`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Tag)\n- [`WebAssembly.Exception`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Exception)\n- [`WebAssembly.CompileError`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/CompileError)\n- [`WebAssembly.LinkError`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/LinkError)\n- [`WebAssembly.RuntimeError`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/RuntimeError)\n\nDisallows the use of `new` for the following builtins:\n\n- [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`Boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)\n- [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)\n\n> These should not use `new` as that would create object wrappers for the primitive values, which is not what you want. However, without `new` they can be useful for coercing a value to that type.\n\nThis rule is fixable, except `new String()`, `new Number()`, and `new Boolean()`, which [return wrapped objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#String_primitives_and_String_objects). `RegExp(regex)` returns `regex` itself, while `new RegExp(regex)` returns a copy with `lastIndex` reset, which is not preserved by the fix. Optional chains that would require adding `new` are ignored, as `new` cannot be optional. Reports for builtin namespace objects are not fixable.\n\nDisallows calling or constructing the following builtin namespace objects:\n\n- [`Temporal.Now`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now)\n- [`WebAssembly`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface)\n- [`WebAssembly.JSTag`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface)\n\n## Examples\n\n```js\n// ❌\nconst list = Array(10);\n\n// ✅\nconst list = new Array(10);\n```\n\n```js\n// ❌\nconst now = Date();\n\n// ✅\nconst now = String(new Date());\n```\n\n```js\n// ❌\nconst map = Map([\n\t['foo', 'bar']\n]);\n\n// ✅\nconst map = new Map([\n\t['foo', 'bar']\n]);\n```\n","docs/rules/no-abusive-eslint-disable.md":"# no-abusive-eslint-disable\n\n📝 Enforce specifying rules to disable in `eslint-disable` comments.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule makes you specify the rules you want to disable when using `eslint-disable`, `eslint-disable-line` or `eslint-disable-next-line` comments.\n\nBecause it inspects the disable directives themselves, it applies to files of any language that supports them, not just JavaScript, when linted with the matching ESLint language plugin (for example [`@eslint/css`](https://github.com/eslint/css) or [`@eslint/markdown`](https://github.com/eslint/markdown)).\n\nIf you want to disable an ESLint rule in a file or on a specific line, you can add a comment.\n\nOn a single line:\n\n```js\nconst message = 'foo';\nconsole.log(message); // eslint-disable-line no-console\n\n// eslint-disable-next-line no-console\nconsole.log(message);\n```\n\nOn the whole (rest of the) file:\n\n```js\n/* eslint-disable no-console */\nconst message = 'foo';\nconsole.log(message);\n```\n\nYou don't have to specify any rules (like `no-console` in the examples above), but you should, as you might otherwise hide useful errors.\n\n```js\n/* eslint-disable */\nconsole.log(message); // `message` is not defined, but it won't be reported\n```\n\nThis rule enforces specifying the rules to disable. If you want to disable ESLint on a file altogether, you should ignore it through [`.eslintignore`](https://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories) for ESLint or through the [`ignores` property](https://github.com/xojs/xo#ignores) in `package.json` for `XO`.\n\n## Examples\n\n```js\n// ❌\n/* eslint-disable */\nconsole.log(message);\n\n// ✅\n/* eslint-disable no-console */\nconsole.log(message);\n```\n\n```js\n// ❌\nconsole.log(message); // eslint-disable-line\n\n// ✅\nconsole.log(message); // eslint-disable-line no-console\n```\n\n```js\n// ❌\n// eslint-disable-next-line\nconsole.log(message);\n\n// ✅\n// eslint-disable-next-line no-console\nconsole.log(message);\n```\n","docs/rules/no-accessor-recursion.md":"# no-accessor-recursion\n\n📝 Disallow recursive access to `this` within getters and setters.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule prevents recursive access to `this` within getter and setter methods in objects and classes, avoiding infinite recursion and stack overflow errors.\n\n## Examples\n\n```js\n// ❌\nconst foo = {\n\tget bar() {\n\t\treturn this.bar;\n\t}\n};\n\n// ✅\nconst foo = {\n\tget bar() {\n\t\treturn this.baz;\n\t}\n};\n```\n\n```js\n// ❌\nclass Foo {\n\tget bar() {\n\t\treturn this.bar;\n\t}\n}\n\n// ✅\nclass Foo {\n\tget bar() {\n\t\treturn this.baz;\n\t}\n}\n```\n\n```js\n// ❌\nconst foo = {\n\tset bar(value) {\n\t\tthis.bar = value;\n\t}\n};\n\n// ✅\nconst foo = {\n\tset bar(value) {\n\t\tthis._bar = value;\n\t}\n};\n```\n\n```js\n// ❌\nclass Foo {\n\tset bar(value) {\n\t\tthis.bar = value;\n\t}\n}\n\n// ✅\nclass Foo {\n\tset bar(value) {\n\t\tthis._bar = value;\n\t}\n}\n```\n","docs/rules/no-accidental-bitwise-operator.md":"# no-accidental-bitwise-operator\n\n📝 Disallow bitwise operators where a logical operator was likely intended.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nBitwise operators (`&`, `|`, `|=`) are rarely used in everyday code, and when they show up in boolean-like contexts they are almost always a typo for the logical operators (`&&`, `||`, `||=`).\n\nThe bug is easy to miss and hard to debug:\n\n- Bitwise operators do not [short-circuit](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND#short-circuit_evaluation), so `if (object & object.property)` evaluates `object.property` even when `object` is `null` or `undefined`, throwing a `TypeError`.\n- `options | {}` coerces both sides to integers, silently producing `options | 0` instead of falling back to the default object.\n\nThis rule only targets the high-signal patterns where a logical operator was clearly intended, so it does not flag legitimate bitwise math like `flags & MASK` or `value | 0`. Because switching the operator changes runtime behavior, the fix is offered as a suggestion rather than applied automatically.\n\nThis is more targeted than the built-in [`no-bitwise`](https://eslint.org/docs/latest/rules/no-bitwise) rule, which disallows all bitwise operators. See also [`prefer-math-trunc`](./prefer-math-trunc.md), which covers the `value | 0` truncation idiom.\n\n## Examples\n\n```js\n// ❌\nif (object & object.property) {\n\t// …\n}\n\n// ✅\nif (object && object.property) {\n\t// …\n}\n```\n\n```js\n// ❌\noptions = options | {};\n\n// ✅\noptions = options || {};\n```\n\n```js\n// ❌\ninput |= '';\n\n// ✅\ninput ||= '';\n```\n\n```js\n// ✅ Not flagged: legitimate bitwise math\nconst masked = flags & MASK;\nconst truncated = value | 0;\n```\n","docs/rules/no-anonymous-default-export.md":"# no-anonymous-default-export\n\n📝 Disallow anonymous functions and classes as the default export.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nNaming default exports improves codebase searchability by ensuring consistent identifier use for a module's default export, both where it's declared and where it's imported.\n\n## Examples\n\n```js\n// ❌\nexport default class {}\n\n// ✅\nexport default class Foo {}\n```\n\n```js\n// ❌\nexport default function () {}\n\n// ✅\nexport default function foo() {}\n```\n\n```js\n// ❌\nexport default () => {};\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// ❌\nmodule.exports = class {};\n\n// ✅\nmodule.exports = class Foo {};\n```\n\n```js\n// ❌\nmodule.exports = function () {};\n\n// ✅\nmodule.exports = function foo() {};\n```\n\n```js\n// ❌\nmodule.exports = () => {};\n\n// ✅\nconst foo = () => {};\nmodule.exports = foo;\n```\n","docs/rules/no-array-callback-reference.md":"# no-array-callback-reference\n\n📝 Prevent passing a function reference directly to iterator methods.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPassing functions to iterator methods can cause issues when the function is changed without realizing that the iterator passes 2 more parameters to it. **This also applies when using TypeScript,** albeit only if the function accepts the same parameter type used by the iterator method.\n\nThis rule intentionally reports locally declared callbacks too. Use an inline wrapper when you want to make the callback arguments explicit.\n\nType predicate callbacks are allowed for `.every()`, `.filter()`, `.find()`, and `.findLast()` because wrapping them can fail to preserve TypeScript's predicate overload narrowing.\n\nA receiver known to be neither an array nor a typed array, such as a `Set` or a locally declared class with a same-named method, is ignored. A locally declared type is recognized from its annotation alone, while a receiver whose type comes from another module needs [type information](https://typescript-eslint.io/getting-started/typed-linting/). Unknown receivers are still reported, so use the `ignore` option or an inline disable for non-array APIs that intentionally share array method names.\n\nSuppose you have a `unicorn` module:\n\n```js\nconst unicorn = x => x + 1;\n\nexport default unicorn;\n```\n\nYou can then use it like this:\n\n```js\nimport unicorn from 'unicorn';\n\n[1, 2, 3].map(unicorn);\n//=> [2, 3, 4]\n```\n\nThe `unicorn` module now does a minor version that adds another argument:\n\n```js\nconst unicorn = (x, y) => x + (y ? y : 1);\n\nexport default unicorn;\n```\n\nYour code will now return something different and probably break for users because it is now passing the index of the item as second argument.\n\n```js\nimport unicorn from 'unicorn';\n\n[1, 2, 3].map(unicorn);\n//=> [2, 3, 5]\n```\n\nThis rule helps safely call the function with the expected number of parameters:\n\n```js\nimport unicorn from 'unicorn';\n\n[1, 2, 3].map(x => unicorn(x));\n//=> [2, 3, 4]\n```\n\n## Examples\n\n```js\n// ❌\nconst foo = array.map(callback);\n\n// ✅\nconst foo = array.map(element => callback(element));\n```\n\n```js\n// ✅\nconst foo = array.map(Boolean);\n```\n\n```js\n// ❌\narray.forEach(callback);\n\n// ✅\narray.forEach(element => {\n\tcallback(element);\n});\n```\n\n```js\n// ❌\nconst foo = array.every(callback);\n\n// ✅\nconst foo = array.every(element => callback(element));\n```\n\n```js\n// ❌\nconst foo = array.filter(callback);\n\n// ✅\nconst foo = array.filter(element => callback(element));\n```\n\n```js\n// ✅\nconst foo = array.filter(Boolean);\n```\n\n```js\n// ❌\nconst foo = array.find(callback);\n\n// ✅\nconst foo = array.find(element => callback(element));\n```\n\n```js\n// ❌\nconst index = array.findIndex(callback);\n\n// ✅\nconst index = array.findIndex(element => callback(element));\n```\n\n```js\n// ❌\nconst foo = array.some(callback);\n\n// ✅\nconst foo = array.some(element => callback(element));\n```\n\n```js\n// ❌\nconst foo = array.reduce(callback, 0);\n\n// ✅\nconst foo = array.reduce(\n\t(accumulator, element) => accumulator + callback(element),\n\t0\n);\n```\n\n```js\n// ❌\nconst foo = array.reduceRight(callback, []);\n\n// ✅\nconst foo = array.reduceRight(\n\t(accumulator, element) => [\n\t\t...accumulator,\n\t\tcallback(element)\n\t],\n\t[]\n);\n```\n\n```js\n// ❌\nconst foo = array.flatMap(callback);\n\n// ✅\nconst foo = array.flatMap(element => callback(element));\n```\n\nA call expression is left alone. Hoisting it into a binding would change how many times it runs, so the rewrite is a manual edit rather than something the rule can offer:\n\n```js\n// ✅ Not reported\narray.forEach(someFunction({foo: 'bar'}));\n```\n\n```js\n// A manual rewrite, if you want the call to happen once\nconst callback = someFunction({foo: 'bar'});\n\narray.forEach(element => {\n\tcallback(element);\n});\n```\n\n```js\n// ❌\narray.forEach(callback, thisArgument);\n\n// ✅\narray.forEach(function (element) {\n\tcallback(element, this);\n}, thisArgument);\n```\n\n```js\n// ✅\nfunction readFile(filename) {\n\treturn fs.readFile(filename, 'utf8');\n}\n\nPromise.map(filenames, readFile);\n```\n\n## Options\n\nType: `object`\n\n### ignore\n\nType: `string[]`\n\nCallees to ignore. The callee is matched against the object the iterator method is called on, so `\"Angular\"` ignores all `Angular.<method>(…)` calls.\n\n`Promise`, `React.Children`, `Children`, `lodash`, `underscore`, `_`, `Async`, `async`, `this`, `$`, and `jQuery` are always ignored.\n\nExample:\n\n```js\n{\n\t'unicorn/no-array-callback-reference': [\n\t\t'error',\n\t\t{\n\t\t\tignore: [\n\t\t\t\t'Angular',\n\t\t\t\t'P'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n```js\n/* eslint unicorn/no-array-callback-reference: [\"error\", {\"ignore\": [\"Angular\"]}] */\nAngular.forEach(list, fn); // Passes\n```\n","docs/rules/no-array-concat-in-loop.md":"# no-array-concat-in-loop\n\n📝 Disallow array accumulation with `Array#concat()` in loops.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\n`Array#concat()` creates a new array every time it is called. When an accumulator is reassigned with `.concat()` on every loop iteration, each iteration copies everything accumulated so far, which can make the loop quadratic in the total number of accumulated items.\n\nUse `Array#push()` inside the loop when each chunk is an array, or collect the nested arrays and flatten them once outside the loop.\n\nThis rule intentionally only reports local `let` and `var` variables initialized to an empty array literal. It does not try to infer arbitrary array-like values or custom `.concat()` methods.\n\nThis rule does not provide an autofix. Replacing `.concat()` with `.push()` can change observable behavior when the old array is aliased, and `.concat()` has argument-spreading semantics that are not always equivalent to `push(...value)`.\n\n## Examples\n\n```js\n// ❌\nlet result = [];\n\nfor (const chunk of chunks) {\n\tresult = result.concat(chunk);\n}\n```\n\n```js\n// ✅\nconst result = [];\n\nfor (const chunk of chunks) {\n\tresult.push(...chunk);\n}\n```\n\n```js\n// ✅\nconst result = chunks.flat();\n```\n\n```js\n// ✅\nlet result = [];\n\nfor (const chunk of chunks) {\n\tresult = other.concat(chunk);\n}\n```\n","docs/rules/no-array-fill-with-reference-type.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-fill-with-reference-type.md -->","docs/rules/no-array-from-fill.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-from-fill.md -->","docs/rules/no-array-front-mutation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-front-mutation.md -->","docs/rules/no-array-method-this-argument.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-method-this-argument.md -->","docs/rules/no-array-reduce.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-reduce.md -->","docs/rules/no-array-reverse.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-reverse.md -->","docs/rules/no-array-sort-for-min-max.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-sort-for-min-max.md -->","docs/rules/no-array-sort.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-sort.md -->","docs/rules/no-array-splice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-splice.md -->","docs/rules/no-asterisk-prefix-in-documentation-comments.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-asterisk-prefix-in-documentation-comments.md -->","docs/rules/no-async-iterator-callback.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-async-iterator-callback.md -->","docs/rules/no-async-promise-finally.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-async-promise-finally.md -->","docs/rules/no-await-expression-member.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-await-expression-member.md -->","docs/rules/no-await-in-promise-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-await-in-promise-methods.md -->","docs/rules/no-barrel-files.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-barrel-files.md -->","docs/rules/no-blob-to-file.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-blob-to-file.md -->","docs/rules/no-boolean-sort-comparator.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-boolean-sort-comparator.md -->","docs/rules/no-break-in-nested-loop.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-break-in-nested-loop.md -->","docs/rules/no-canvas-to-image.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-canvas-to-image.md -->","docs/rules/no-chained-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-chained-comparison.md -->","docs/rules/no-collection-bracket-access.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-collection-bracket-access.md -->","docs/rules/no-computed-property-existence-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-computed-property-existence-check.md -->","docs/rules/no-conflicting-constraints.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-conflicting-constraints.md -->","docs/rules/no-confusing-array-splice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-confusing-array-splice.md -->","docs/rules/no-confusing-array-with.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-confusing-array-with.md -->","docs/rules/no-console-spaces.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-console-spaces.md -->","docs/rules/no-constant-zero-expression.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-constant-zero-expression.md -->","docs/rules/no-declarations-before-early-exit.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-declarations-before-early-exit.md -->","docs/rules/no-document-cookie.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-document-cookie.md -->","docs/rules/no-double-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-double-comparison.md -->","docs/rules/no-duplicate-if-branches.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-if-branches.md -->","docs/rules/no-duplicate-logical-operands.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-logical-operands.md -->","docs/rules/no-duplicate-loops.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-loops.md -->","docs/rules/no-duplicate-set-values.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-set-values.md -->","docs/rules/no-empty-file.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-empty-file.md -->","docs/rules/no-empty-link-text.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-empty-link-text.md -->","docs/rules/no-error-property-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-error-property-assignment.md -->","docs/rules/no-exports-in-scripts.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-exports-in-scripts.md -->","docs/rules/no-for-each.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-for-each.md -->","docs/rules/no-for-loop.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-for-loop.md -->","docs/rules/no-global-object-property-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-global-object-property-assignment.md -->","docs/rules/no-immediate-mutation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-immediate-mutation.md -->","docs/rules/no-impossible-length-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-impossible-length-comparison.md -->","docs/rules/no-incomplete-accessor-override.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-incomplete-accessor-override.md -->","docs/rules/no-incorrect-query-selector.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-incorrect-query-selector.md -->","docs/rules/no-incorrect-template-string-interpolation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-incorrect-template-string-interpolation.md -->","docs/rules/no-ineffective-csp-directives.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-ineffective-csp-directives.md -->","docs/rules/no-instanceof-builtins.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-instanceof-builtins.md -->","docs/rules/no-invalid-argument-count.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-argument-count.md -->","docs/rules/no-invalid-boolean-attribute-value.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-boolean-attribute-value.md -->","docs/rules/no-invalid-character-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-character-comparison.md -->","docs/rules/no-invalid-dom-token.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-dom-token.md -->","docs/rules/no-invalid-fetch-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-fetch-options.md -->","docs/rules/no-invalid-file-input-accept.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-file-input-accept.md -->","docs/rules/no-invalid-integrity.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-integrity.md -->","docs/rules/no-invalid-intl-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-intl-options.md -->","docs/rules/no-invalid-property-descriptor.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-property-descriptor.md -->","docs/rules/no-invalid-remove-event-listener.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-remove-event-listener.md -->","docs/rules/no-invalid-response-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-response-options.md -->","docs/rules/no-invalid-style-set-property.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-style-set-property.md -->","docs/rules/no-invalid-temporal-arithmetic.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-temporal-arithmetic.md -->","docs/rules/no-invalid-url-protocol-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-url-protocol-comparison.md -->","docs/rules/no-invalid-well-known-symbol-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-well-known-symbol-methods.md -->","docs/rules/no-javascript-url.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-javascript-url.md -->","docs/rules/no-keyword-prefix.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-keyword-prefix.md -->","docs/rules/no-late-current-target-access.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-late-current-target-access.md -->","docs/rules/no-late-event-control.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-late-event-control.md -->","docs/rules/no-leading-empty-lines.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-leading-empty-lines.md -->","docs/rules/no-lonely-if.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-lonely-if.md -->","docs/rules/no-loop-iterable-mutation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-loop-iterable-mutation.md -->","docs/rules/no-loss-of-precision.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-loss-of-precision.md -->","docs/rules/no-magic-array-flat-depth.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-magic-array-flat-depth.md -->","docs/rules/no-manually-wrapped-comments.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-manually-wrapped-comments.md -->","docs/rules/no-mismatched-map-key.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-mismatched-map-key.md -->","docs/rules/no-misrefactored-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-misrefactored-assignment.md -->","docs/rules/no-missing-local-resource.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-missing-local-resource.md -->","docs/rules/no-multiple-promise-resolver-calls.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-multiple-promise-resolver-calls.md -->","docs/rules/no-named-default.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-named-default.md -->","docs/rules/no-negated-array-predicate.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negated-array-predicate.md -->","docs/rules/no-negated-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negated-comparison.md -->","docs/rules/no-negated-condition.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negated-condition.md -->","docs/rules/no-negation-in-equality-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negation-in-equality-check.md -->","docs/rules/no-nested-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-nested-ternary.md -->","docs/rules/no-new-array.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-new-array.md -->","docs/rules/no-new-buffer.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-new-buffer.md -->","docs/rules/no-non-function-verb-prefix.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-non-function-verb-prefix.md -->","docs/rules/no-nonstandard-builtin-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-nonstandard-builtin-properties.md -->","docs/rules/no-null.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-null.md -->","docs/rules/no-object-as-default-parameter.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-object-as-default-parameter.md -->","docs/rules/no-object-methods-with-collections.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-object-methods-with-collections.md -->","docs/rules/no-optional-chaining-on-undeclared-variable.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-optional-chaining-on-undeclared-variable.md -->","docs/rules/no-prevent-default-in-passive-listener.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-prevent-default-in-passive-listener.md -->","docs/rules/no-process-exit.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-process-exit.md -->","docs/rules/no-redundant-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-redundant-comparison.md -->","docs/rules/no-repeated-call-wrappers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-repeated-call-wrappers.md -->","docs/rules/no-return-array-push.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-return-array-push.md -->","docs/rules/no-selector-as-dom-name.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-selector-as-dom-name.md -->","docs/rules/no-shorthand-property-overrides.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-shorthand-property-overrides.md -->","docs/rules/no-single-promise-in-promise-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-single-promise-in-promise-methods.md -->","docs/rules/no-static-only-class.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-static-only-class.md -->","docs/rules/no-subtraction-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-subtraction-comparison.md -->","docs/rules/no-thenable.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-thenable.md -->","docs/rules/no-this-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-this-assignment.md -->","docs/rules/no-this-outside-of-class.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-this-outside-of-class.md -->","docs/rules/no-top-level-assignment-in-function.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-top-level-assignment-in-function.md -->","docs/rules/no-top-level-side-effects.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-top-level-side-effects.md -->","docs/rules/no-transition-all.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-transition-all.md -->","docs/rules/no-typeof-undefined.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-typeof-undefined.md -->","docs/rules/no-uncalled-method.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-uncalled-method.md -->","docs/rules/no-undeclared-class-members.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-undeclared-class-members.md -->","docs/rules/no-unnecessary-array-flat-depth.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-array-flat-depth.md -->","docs/rules/no-unnecessary-array-flat-map.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-array-flat-map.md -->","docs/rules/no-unnecessary-array-splice-count.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-array-splice-count.md -->","docs/rules/no-unnecessary-await.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-await.md -->","docs/rules/no-unnecessary-boolean-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-boolean-comparison.md -->","docs/rules/no-unnecessary-default-arguments.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-default-arguments.md -->","docs/rules/no-unnecessary-fetch-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-fetch-options.md -->","docs/rules/no-unnecessary-global-this.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-global-this.md -->","docs/rules/no-unnecessary-nested-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-nested-ternary.md -->","docs/rules/no-unnecessary-parameters.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-parameters.md -->","docs/rules/no-unnecessary-polyfills.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-polyfills.md -->","docs/rules/no-unnecessary-slice-end.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-slice-end.md -->","docs/rules/no-unnecessary-splice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-splice.md -->","docs/rules/no-unnecessary-string-trim.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-string-trim.md -->","docs/rules/no-unreadable-array-destructuring.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-array-destructuring.md -->","docs/rules/no-unreadable-for-of-expression.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-for-of-expression.md -->","docs/rules/no-unreadable-iife.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-iife.md -->","docs/rules/no-unreadable-new-expression.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-new-expression.md -->","docs/rules/no-unreadable-object-destructuring.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-object-destructuring.md -->","docs/rules/no-unsafe-buffer-conversion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-buffer-conversion.md -->","docs/rules/no-unsafe-dom-html.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-dom-html.md -->","docs/rules/no-unsafe-json-serialization.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-json-serialization.md -->","docs/rules/no-unsafe-promise-all-settled-values.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-promise-all-settled-values.md -->","docs/rules/no-unsafe-property-key.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-property-key.md -->","docs/rules/no-unsafe-sqlite-interpolation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-sqlite-interpolation.md -->","docs/rules/no-unsafe-string-replacement.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-string-replacement.md -->","docs/rules/no-unused-builtin-method-return.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unused-builtin-method-return.md -->","docs/rules/no-unused-iterator-helper.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unused-iterator-helper.md -->","docs/rules/no-unused-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unused-properties.md -->","docs/rules/no-url-in-search-params.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-url-in-search-params.md -->","docs/rules/no-useless-boolean-cast.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-boolean-cast.md -->","docs/rules/no-useless-coercion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-coercion.md -->","docs/rules/no-useless-collection-argument.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-collection-argument.md -->","docs/rules/no-useless-compound-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-compound-assignment.md -->","docs/rules/no-useless-concat.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-concat.md -->","docs/rules/no-useless-continue.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-continue.md -->","docs/rules/no-useless-delete-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-delete-check.md -->","docs/rules/no-useless-else.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-else.md -->","docs/rules/no-useless-error-capture-stack-trace.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-error-capture-stack-trace.md -->","docs/rules/no-useless-fallback-in-spread.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-fallback-in-spread.md -->","docs/rules/no-useless-iterator-to-array.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-iterator-to-array.md -->","docs/rules/no-useless-length-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-length-check.md -->","docs/rules/no-useless-logical-operand.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-logical-operand.md -->","docs/rules/no-useless-override.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-override.md -->","docs/rules/no-useless-promise-resolve-reject.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-promise-resolve-reject.md -->","docs/rules/no-useless-re-export.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-re-export.md -->","docs/rules/no-useless-recursion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-recursion.md -->","docs/rules/no-useless-set-construction.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-set-construction.md -->","docs/rules/no-useless-spread.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-spread.md -->","docs/rules/no-useless-switch-case.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-switch-case.md -->","docs/rules/no-useless-template-literals.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-template-literals.md -->","docs/rules/no-useless-undefined.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-undefined.md -->","docs/rules/no-using-resource-escape.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-using-resource-escape.md -->","docs/rules/no-xor-as-exponentiation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-xor-as-exponentiation.md -->","docs/rules/no-zero-fractions.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-zero-fractions.md -->","docs/rules/number-literal-case.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fnumber-literal-case.md -->","docs/rules/numeric-separators-style.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fnumeric-separators-style.md -->","docs/rules/operator-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Foperator-assignment.md -->","docs/rules/prefer-abort-signal-any.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-abort-signal-any.md -->","docs/rules/prefer-abort-signal-timeout.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-abort-signal-timeout.md -->","docs/rules/prefer-add-event-listener-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-add-event-listener-options.md -->","docs/rules/prefer-add-event-listener.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-add-event-listener.md -->","docs/rules/prefer-aggregate-error.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-aggregate-error.md -->","docs/rules/prefer-array-find.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-find.md -->","docs/rules/prefer-array-flat-map.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-flat-map.md -->","docs/rules/prefer-array-flat.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-flat.md -->","docs/rules/prefer-array-from-async.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-from-async.md -->","docs/rules/prefer-array-from-map.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-from-map.md -->","docs/rules/prefer-array-from-range.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-from-range.md -->","docs/rules/prefer-array-index-of.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-index-of.md -->","docs/rules/prefer-array-iterable-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-iterable-methods.md -->","docs/rules/prefer-array-last-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-last-methods.md -->","docs/rules/prefer-array-slice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-slice.md -->","docs/rules/prefer-array-some.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-some.md -->","docs/rules/prefer-at.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-at.md -->","docs/rules/prefer-await.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-await.md -->","docs/rules/prefer-bigint-literals.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-bigint-literals.md -->","docs/rules/prefer-blob-reading-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-blob-reading-methods.md -->","docs/rules/prefer-block-statement-over-iife.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-block-statement-over-iife.md -->","docs/rules/prefer-boolean-return.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-boolean-return.md -->","docs/rules/prefer-class-fields.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-class-fields.md -->","docs/rules/prefer-classlist-toggle.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-classlist-toggle.md -->","docs/rules/prefer-code-point.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-code-point.md -->","docs/rules/prefer-combined-guards.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-combined-guards.md -->","docs/rules/prefer-continue.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-continue.md -->","docs/rules/prefer-date-now.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-date-now.md -->","docs/rules/prefer-default-parameters.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-default-parameters.md -->","docs/rules/prefer-direct-iteration.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-direct-iteration.md -->","docs/rules/prefer-dispose.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dispose.md -->","docs/rules/prefer-dom-node-append.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-append.md -->","docs/rules/prefer-dom-node-html-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-html-methods.md -->","docs/rules/prefer-dom-node-remove.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-remove.md -->","docs/rules/prefer-dom-node-replace-children.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-replace-children.md -->","docs/rules/prefer-dom-node-text-content.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-text-content.md -->","docs/rules/prefer-early-return.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-early-return.md -->","docs/rules/prefer-else-if.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-else-if.md -->","docs/rules/prefer-error-is-error.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-error-is-error.md -->","docs/rules/prefer-escaped-irregular-whitespace.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-escaped-irregular-whitespace.md -->","docs/rules/prefer-event-target.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-event-target.md -->","docs/rules/prefer-export-from.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-export-from.md -->","docs/rules/prefer-flat-math-min-max.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-flat-math-min-max.md -->","docs/rules/prefer-get-or-insert-computed.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-get-or-insert-computed.md -->","docs/rules/prefer-global-number-constants.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-global-number-constants.md -->","docs/rules/prefer-global-this.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-global-this.md -->","docs/rules/prefer-group-by.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-group-by.md -->","docs/rules/prefer-has-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-has-check.md -->","docs/rules/prefer-hoisting-branch-code.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-hoisting-branch-code.md -->","docs/rules/prefer-https.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-https.md -->","docs/rules/prefer-identifier-import-export-specifiers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-identifier-import-export-specifiers.md -->","docs/rules/prefer-import-meta-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-import-meta-properties.md -->","docs/rules/prefer-includes-over-repeated-comparisons.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-includes-over-repeated-comparisons.md -->","docs/rules/prefer-includes.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-includes.md -->","docs/rules/prefer-iterable-in-constructor.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterable-in-constructor.md -->","docs/rules/prefer-iterator-concat.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-concat.md -->","docs/rules/prefer-iterator-helpers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-helpers.md -->","docs/rules/prefer-iterator-to-array-at-end.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-to-array-at-end.md -->","docs/rules/prefer-iterator-to-array.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-to-array.md -->","docs/rules/prefer-iterator-zip.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-zip.md -->","docs/rules/prefer-json-import.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-json-import.md -->","docs/rules/prefer-keyboard-event-key.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-keyboard-event-key.md -->","docs/rules/prefer-literal-ascii.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-literal-ascii.md -->","docs/rules/prefer-location-assign.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-location-assign.md -->","docs/rules/prefer-logical-operator-over-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-logical-operator-over-ternary.md -->","docs/rules/prefer-map-from-entries.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-map-from-entries.md -->","docs/rules/prefer-math-abs.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-abs.md -->","docs/rules/prefer-math-constants.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-constants.md -->","docs/rules/prefer-math-min-max.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-min-max.md -->","docs/rules/prefer-math-trunc.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-trunc.md -->","docs/rules/prefer-minimal-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-minimal-ternary.md -->","docs/rules/prefer-modern-dom-apis.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-modern-dom-apis.md -->","docs/rules/prefer-modern-math-apis.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-modern-math-apis.md -->","docs/rules/prefer-module.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-module.md -->","docs/rules/prefer-native-coercion-functions.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-native-coercion-functions.md -->","docs/rules/prefer-negative-index.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-negative-index.md -->","docs/rules/prefer-node-protocol.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-node-protocol.md -->","docs/rules/prefer-number-coercion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-number-coercion.md -->","docs/rules/prefer-number-is-safe-integer.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-number-is-safe-integer.md -->","docs/rules/prefer-number-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-number-properties.md -->","docs/rules/prefer-object-define-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-define-properties.md -->","docs/rules/prefer-object-destructuring-defaults.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-destructuring-defaults.md -->","docs/rules/prefer-object-from-entries.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-from-entries.md -->","docs/rules/prefer-object-iterable-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-iterable-methods.md -->","docs/rules/prefer-observer-apis.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-observer-apis.md -->","docs/rules/prefer-optional-catch-binding.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-optional-catch-binding.md -->","docs/rules/prefer-path2d.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-path2d.md -->","docs/rules/prefer-private-class-fields.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-private-class-fields.md -->","docs/rules/prefer-promise-static-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-promise-static-methods.md -->","docs/rules/prefer-promise-try.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-promise-try.md -->","docs/rules/prefer-promise-with-resolvers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-promise-with-resolvers.md -->","docs/rules/prefer-prototype-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-prototype-methods.md -->","docs/rules/prefer-query-selector.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-query-selector.md -->","docs/rules/prefer-queue-microtask.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-queue-microtask.md -->","docs/rules/prefer-reflect-apply.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-reflect-apply.md -->","docs/rules/prefer-regexp-escape.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-regexp-escape.md -->","docs/rules/prefer-regexp-test.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-regexp-test.md -->","docs/rules/prefer-response-static-json.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-response-static-json.md -->","docs/rules/prefer-scoped-selector.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-scoped-selector.md -->","docs/rules/prefer-set-has.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-set-has.md -->","docs/rules/prefer-set-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-set-methods.md -->","docs/rules/prefer-set-size.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-set-size.md -->","docs/rules/prefer-short-arrow-method.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-short-arrow-method.md -->","docs/rules/prefer-short-escape-sequences.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-short-escape-sequences.md -->","docs/rules/prefer-simple-condition-first.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-simple-condition-first.md -->","docs/rules/prefer-simple-sort-comparator.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-simple-sort-comparator.md -->","docs/rules/prefer-simplified-conditions.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-simplified-conditions.md -->","docs/rules/prefer-single-array-predicate.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-array-predicate.md -->","docs/rules/prefer-single-call.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-call.md -->","docs/rules/prefer-single-object-destructuring.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-object-destructuring.md -->","docs/rules/prefer-single-replace.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-replace.md -->","docs/rules/prefer-smaller-scope.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-smaller-scope.md -->","docs/rules/prefer-split-limit.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-split-limit.md -->","docs/rules/prefer-spread.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-spread.md -->","docs/rules/prefer-string-match-all.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-match-all.md -->","docs/rules/prefer-string-pad-start-end.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-pad-start-end.md -->","docs/rules/prefer-string-raw.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-raw.md -->","docs/rules/prefer-string-repeat.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-repeat.md -->","docs/rules/prefer-string-replace-all.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-replace-all.md -->","docs/rules/prefer-string-slice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-slice.md -->","docs/rules/prefer-string-starts-ends-with.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-starts-ends-with.md -->","docs/rules/prefer-string-trim-start-end.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-trim-start-end.md -->","docs/rules/prefer-structured-clone.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-structured-clone.md -->","docs/rules/prefer-switch.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-switch.md -->","docs/rules/prefer-temporal-conversion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-temporal-conversion.md -->","docs/rules/prefer-temporal.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-temporal.md -->","docs/rules/prefer-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-ternary.md -->","docs/rules/prefer-then-catch.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-then-catch.md -->","docs/rules/prefer-toggle-attribute.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-toggle-attribute.md -->","docs/rules/prefer-top-level-await.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-top-level-await.md -->","docs/rules/prefer-type-error.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-type-error.md -->","docs/rules/prefer-type-literal-last.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-type-literal-last.md -->","docs/rules/prefer-uint8array-base64.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-uint8array-base64.md -->","docs/rules/prefer-uint8array-hex.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-uint8array-hex.md -->","docs/rules/prefer-unary-minus.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-unary-minus.md -->","docs/rules/prefer-unicode-code-point-escapes.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-unicode-code-point-escapes.md -->","docs/rules/prefer-url-can-parse.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-url-can-parse.md -->","docs/rules/prefer-url-href.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-url-href.md -->","docs/rules/prefer-url-search-parameters.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-url-search-parameters.md -->","docs/rules/prefer-while-loop-condition.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-while-loop-condition.md -->","docs/rules/relative-url-style.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frelative-url-style.md -->","docs/rules/require-array-join-separator.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-array-join-separator.md -->","docs/rules/require-array-sort-compare.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-array-sort-compare.md -->","docs/rules/require-css-escape.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-css-escape.md -->","docs/rules/require-frontmatter-fields.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-frontmatter-fields.md -->","docs/rules/require-module-attributes.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-module-attributes.md -->","docs/rules/require-module-specifiers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-module-specifiers.md -->","docs/rules/require-number-to-fixed-digits-argument.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-number-to-fixed-digits-argument.md -->","docs/rules/require-passive-events.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-passive-events.md -->","docs/rules/require-post-message-target-origin.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-post-message-target-origin.md -->","docs/rules/require-proxy-trap-boolean-return.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-proxy-trap-boolean-return.md -->","docs/rules/require-text-decoder-streaming.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-text-decoder-streaming.md -->","docs/rules/single-line-block-comment-style.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fsingle-line-block-comment-style.md -->","docs/rules/string-content.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fstring-content.md -->","docs/rules/switch-case-braces.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fswitch-case-braces.md -->","docs/rules/switch-case-break-position.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fswitch-case-break-position.md -->","docs/rules/template-indent.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Ftemplate-indent.md -->","docs/rules/text-encoding-identifier-case.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Ftext-encoding-identifier-case.md -->","docs/rules/throw-new-error.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fthrow-new-error.md -->","docs/rules/try-complexity.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Ftry-complexity.md -->"},"files":{"AGENTS.md":"# Agents\n\n## Philosophy\n\nKeep rules simple. Target common patterns, skip rare edge cases rather than overcomplicating the rule.\n\n### Out of scope\n\nThese constructs are intentionally unsupported. Do not add machinery to handle them:\n\n- **`Array` subclasses** — Receiver checks treat `new Foo()` as non-array, so `class Foo extends Array {}` is missed. Do not add class heritage resolution for this. (`Error` subclasses are different: `createTypeCheckers` resolves class heritage by default.)\n- **Shadowed built-ins** — Receiver checks may recognize built-ins by name without resolving scope. Do not add scope resolution for shadowed constructors.\n- **BigInt typed-array chains** — Only direct constructors, static `.from()`/`.of()`, and explicit types are recognized. Do not add flow analysis for method chains.\n\n## Rule anatomy\n\nRules export a default config object with `create` and `meta`. The `create` function uses `context.on(NodeType, listener)` to register visitors (this is the Unicorn-specific API, not standard ESLint). See the [ESLint custom rules guide](https://eslint.org/docs/latest/extend/custom-rules) for the underlying API.\n\nKey differences from standard ESLint:\n\n- Use `context.on('NodeType', listener)` and `context.onExit('NodeType', listener)` instead of returning a visitor object.\n- Listeners return or yield problem objects (`{node, messageId, fix, suggest, data}`) directly. The adapter calls `context.report()` for you.\n- Fix functions receive `(fixer, {abort})`. Call `abort()` to bail out of an unfixable case.\n\n```js\nconst MESSAGE_ID = 'rule-name';\n\nconst messages = {\n\t[MESSAGE_ID]: 'Error message with {{placeholder}}.',\n};\n\n/** @param {import('eslint').Rule.RuleContext} context */\nconst create = context => {\n\tcontext.on('CallExpression', node => {\n\t\treturn {\n\t\t\tnode,\n\t\t\tmessageId: MESSAGE_ID,\n\t\t\tdata: {placeholder: 'value'},\n\t\t\tfix: fixer => fixer.replaceText(node, 'replacement'),\n\t\t};\n\t});\n};\n\n/** @type {import('eslint').Rule.RuleModule} */\nconst config = {\n\tcreate,\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Enforce …',\n\t\t\trecommended: true, // 'unopinionated' (safest, in both presets), true (in recommended only), or false (opt-in)\n\t\t},\n\t\tfixable: 'code', // or omit; add hasSuggestions: true for suggestions\n\t\tschema: [],\n\t\tdefaultOptions: [{option: 'default'}], // merged automatically\n\t\tmessages,\n\t},\n};\nexport default config;\n```\n\nOptions are accessed via `context.options[0]`. Use `meta.defaultOptions` for defaults (no manual merging).\n\n### `recommended` config level\n\n`meta.docs.recommended` picks the preset that enables the rule. `'unopinionated'` does NOT mean \"too opinionated\" — it means the opposite:\n\n- **`'unopinionated'`** — Uncontroversial; in both `unopinionated` and `recommended` (the former is a subset). Safest bucket and the default for new rules.\n- **`true`** — A more opinionated call, still on by default. In `recommended` only.\n- **`false`** — Off by default, only in `all`. For niche or opt-in rules.\n\n| `recommended` | `unopinionated` | `recommended` config | `all` |\n|---|---|---|---|\n| `'unopinionated'` | on | on | on |\n| `true` | off | on | on |\n| `false` (or omitted) | off | off | on |\n\nSo a rule too opinionated or niche for broad use is `false`, never `'unopinionated'`. If unsure which level fits, share your recommendation and ask.\n\nName boolean options in the positive `check*` form (for example, `checkProperties`), never the negated `ignore*`/`skip*` form, so option naming stays consistent across rules. This does not apply to array/pattern options like `ignore` (a list of patterns to ignore), which follow ESLint's own conventions.\n\n### Helper naming\n\nName helpers after what they return or do:\n\n- `is*`/`has*`/`should*`/`can*`/`needs*` must return booleans. Prefer explicit `false` over `undefined` in predicate helpers.\n- `get*Problem` returns one problem object or `undefined`; `get*Problems` returns/yields multiple problem objects.\n- `report*` should call `context.report()` directly.\n- Avoid `check*` for private helpers. Reserve `check*` for public boolean options, like `checkProperties`.\n- Do not combine reporting/yielding with a predicate return. Split into a problem builder and a boolean at the call site.\n\n## Rule languages\n\nEvery new rule should declare the official [`meta.languages`](https://eslint.org/docs/latest/extend/custom-rules#rule-languages) field, in `\"plugin/language\"` form, one per line: `['js/js']` for JavaScript/TypeScript-only rules (most), or the languages it supports (for example `['js/js', 'css/css']`, or `['*']` for any file type).\n\nAvailable identifiers:\n\n- `js/js` — JavaScript and TypeScript\n- `css/css` — [`@eslint/css`](https://github.com/eslint/css)\n- `json/json`, `json/jsonc`, `json/json5` — [`@eslint/json`](https://github.com/eslint/json)\n- `markdown/commonmark`, `markdown/gfm` — [`@eslint/markdown`](https://github.com/eslint/markdown)\n- `html/html` — [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint)\n- `toml/toml`: [`eslint-plugin-toml`](https://github.com/ota-meshi/eslint-plugin-toml)\n- `yml/yaml` — [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml)\n\nMost rules visit JavaScript AST nodes, so `js/js` is all they can support. But when a rule's logic is language-agnostic (filename, raw text, comments, or disable directives), support as many languages as is feasible. Root node types differ per language (`Program` for JS/TS, HTML, TOML, and YAML, `StyleSheet` for CSS, `Document` for JSON, `root` for Markdown), so use `onRoot(context, listener)` to run on every root and `getComments(context)` for cross-language comments (both from `rules/utils/`). For reference, see `prefer-https` (`['*']`, raw-text scan) and `no-empty-file` (per-language root handlers).\n\nCSS-only rules (`['css/css']`) belong in [`eslint-cssicorn`](https://github.com/sindresorhus/eslint-cssicorn), not here.\n\n### TOML\n\n- The `Program` body always contains a `TOMLTopLevelTable`, even in empty files. Its `body` contains key/value pairs and table declarations; an empty named table counts as content.\n- `TOMLValue` nodes distinguish strings, integers, floats, and dates/times through `kind`. Read numeric source text to preserve precision and signs; skip `inf` and `nan` when grouping digits. Do not convert `1.0` to `1`, which changes the TOML type.\n- The parser exposes `#` comments as `Block` nodes. Use `getComments(context)` and preserve `#` when fixing comments. `sourceCode.parserServices?.isTOML` identifies TOML.\n- Basic strings and basic quoted keys interpret escapes; literal strings do not. `escape-case` demonstrates escape-preserving edits. `string-content` checks decoded string values only, leaves keys unchanged, and writes double-quoted basic strings. Its serializer uses `JSON.stringify()` plus DEL escaping and skips fixes for unpaired surrogates.\n- Use `languages.toml` from `test/utils/test.js` in snapshot cases. For regular rule-tester tests, use `language: languages.toml.language` and `plugins: languages.toml.plugins`. Test fixes and suggestions with the TOML parser, including literal/multiline strings and comments.\n\n## Reusable utilities\n\n`../eslint-node-test` adapts its infrastructure (rule adapter, snapshot test harness, doc generation) from this plugin. When changing shared patterns here (rule anatomy, testing conventions, autofix rules), consider whether the equivalent should be ported over there.\n\n`../eslint-cssicorn` shares CSS rule utilities with this plugin (for example, `rules/shared/css-shorthand-properties.js`). Keep them in sync: when you change a CSS utility in one plugin, make the same change in the other.\n\nBefore writing helpers, check these directories:\n\n- **`rules/ast/`** - AST node type checks: `isMethodCall`, `isCallExpression`, `isMemberExpression`, `isFunction`, `isStringLiteral`, etc.\n- **`rules/utils/`** - General utilities: `needsSemicolon`, parenthesis helpers (`shouldAddParenthesesToMemberExpressionObject`, etc.), `isNodeMatches`, `getCallExpressionTokens`, `isSameReference`, `getReferences`, etc.\n- **`rules/fix/`** - Fixer helpers: `removeArgument`, `removeMethodCall`, `replaceArgument`, `replaceReferenceIdentifier`, `removeParentheses`, `replaceTemplateElement`, `switchCallExpressionToNewExpression`, etc.\n- **`rules/shared/`** - Shared rule logic for rules that share patterns (e.g., `simple-array-search-rule.js`).\n\nImport from the barrel `index.js` in each directory (e.g., `import {isMethodCall} from './ast/index.js'`).\n\nWhen matching a string's value, use `getStaticStringValue()` so quoted strings and untagged template literals without expressions behave the same. Check against `undefined` when empty strings are supported. Keep `isStringLiteral()` and literal node checks for syntax-specific behavior, such as quotes, escapes, directives, and static import/export sources. Audit fixers separately: template nodes have no `.value` or `.raw`, and generated quoted strings must escape the decoded value.\n\nAlso check `../eslint-node-test/rules/ast/`, `../eslint-node-test/rules/utils/`, and `../eslint-node-test/rules/fix/` — some helpers there were adapted from here and may have picked up fixes or edge cases worth porting back.\n\nWhen at least two rules need the same non-trivial logic, put it in a shared utility (`rules/utils/` for general helpers, `rules/shared/` for shared rule logic) and use it from each rule instead of duplicating it. This also applies when you write logic that an existing rule already has: extract it from that rule and use it in both. Keep trivial or rule-specific helpers local.\n\nAlso use `@eslint-community/eslint-utils` for helpers like `findVariable`, `getStaticValue`, `hasSideEffect`, `getPropertyName`, and token predicates (`isCommaToken`, `isSemicolonToken`, etc.).\n\nMost commonly used utilities:\n\n- **`isMethodCall`** - The most used helper. Check if a node is a method call matching specific criteria.\n- **`isParenthesized`**, **`getParenthesizedRange`** (from `rules/utils/`) - Handle extra parentheses around nodes.\n- **`needsSemicolon`** - Check if a semicolon is needed before a replacement.\n- **`isValueNotUsable`** - Check if a call expression's return value is unused (safe to change behavior).\n- **`hasSideEffect`** (from `@eslint-community/eslint-utils`) - Check if a node has side effects, important for safe autofixes.\n- **`findVariable`** (from `@eslint-community/eslint-utils`) - Resolve a variable's scope binding.\n- **`getStaticValue`** (from `@eslint-community/eslint-utils`) - Get a node's static value at lint time.\n- **`fixSpaceAroundKeyword`**, **`removeMethodCall`**, **`removeArgument`** - Common fix helpers.\n\n## Code path analysis\n\nUse [ESLint's code path analysis API](https://eslint.org/docs/latest/extend/code-path-analysis) when a rule needs to know whether control flow always exits a branch or function body (e.g., via `return`, `throw`, `break`, `continue`, exhaustive `switch`, infinite loop). CPA is more accurate than manual AST walking because it handles complex constructs like `try`/`catch`/`finally`, labeled breaks, and unreachable code after infinite loops.\n\nWhen to use CPA instead of manual AST walking:\n\n- **Checking if an `if` branch always exits** — Use `trackBranchExits` from `rules/utils/`. It registers CPA event listeners and returns a predicate `(branch) => boolean`. Query it after the `IfStatement` has exited (use `context.onExit`). Used by `no-useless-else`, `no-declarations-before-early-exit`, `prefer-else-if`.\n- **Checking if a function body always exits** — Track segments per code path using `onCodePathStart`/`onCodePathEnd`/`onCodePathSegmentStart`/`onCodePathSegmentEnd`/`onUnreachableCodePathSegmentStart`/`onUnreachableCodePathSegmentEnd`. Snapshot segment reachability at `BlockStatement:exit` for function bodies (before code path segments end). See `require-proxy-trap-boolean-return` for the pattern.\n\nKey implementation notes:\n\n- Use a **per-code-path segment stack** (`segmentSetStack`) so nested functions don't pollute the enclosing path's state.\n- When checking CPA data from a parent node, use `context.onExit` (not `context.on`) so inner code paths have been fully analyzed.\n- At `onCodePathEnd`, all segments have already ended, so `currentSegments()` is empty. Snapshot reachability at the AST node exit (e.g., `BlockStatement:exit`) instead.\n- `trackBranchExits` uses a `prevSegments`-based check: a branch \"falls through\" if any post-if merge segment has a `prevSegment` in the branch's terminal segment set.\n\nWhen NOT to use CPA:\n\n- Simple last-statement checks (e.g., \"does the last statement return?\") — just check `node.type`.\n- Collecting return statements or associating them with functions — a simple function stack or AST walk is fine.\n- Fixer logic that only needs to know \"return or throw\" in the last position — no CPA needed.\n\n## Auto-generated files\n\n- **`rules/index.js`** is auto-generated. Never edit it by hand. Run `npm run create-rules-index-file` to regenerate after adding or removing rules.\n- **Non-JavaScript language table** in `readme.md` is generated from `meta.languages`. Run `npm run fix:non-js-languages` after changing language support; add new language columns in `scripts/create-non-js-languages-list.js`.\n- **Doc headers** in `docs/rules/<rule>.md` (everything above `<!-- end auto-generated rule header -->`) are auto-generated by `eslint-doc-generator`. Do not edit them. Run `npm run fix:eslint-docs` to update.\n\nOn rebase, `rules/index.js` and the `readme.md` rules table almost always conflict because other rules were added meanwhile. Don't hand-resolve `rules/index.js` — take either side, then run `npm run create-rules-index-file`. For `readme.md`, keep both rows and re-sort the table alphabetically.\n\n## Documentation\n\nKeep rule documentation succinct, especially sections about limitations and caveats. Focus on practical information users need to understand and use the rule.\n\nDo not use Markdown tables in rule documentation. Use prose, lists, or code examples instead.\n\nUse JavaScript syntax for configuration examples, not JSON-style quoted keys and strings, unless the example is specifically JSON.\n\nFor rule documentation examples, prefer one failing (`// ❌`) example followed by one corresponding passing (`// ✅`) example in each code block whenever possible. Use separate blocks for distinct cases instead of grouping all failing and passing examples together.\n\n## Testing\n\nTests should be comprehensive with many edge cases, but no duplicate coverage. Add lots of focused edge-case tests for matching and fixes/suggestions. Add tests for edge cases the rule intentionally ignores to document the behavior.\n\nTests use the built-in `node:test` runner. Prefer `test.snapshot()` which auto-generates snapshots for errors, fixes, and suggestions:\n\n```js\nimport {getTester} from './utils/test.js';\nconst {test} = getTester(import.meta);\n\ntest.snapshot({\n\tvalid: ['validCode'],\n\tinvalid: ['invalidCode'],\n});\n```\n\nOther test modes: `test.typescript()` and `test.vue()` set the parser for all cases in the block. For individual TypeScript cases within a normal `test.snapshot()`, use `{code, parser: parsers.typescript}` instead. Import `parsers` from `./utils/test.js`.\n\n- **Never run integration tests** (`test/integration/test.js`). They are too slow for development.\n- **While developing, only run targeted tests**: `node --test test/rule-name.js`. Do not run `npm test` or the full suite until all changes are complete.\n- **Only run the full test suite (`npm test`) once at the very end** to confirm everything passes.\n- **For new rules, run dogfooding before pushing**: `npm run run-rules-on-codebase`. Re-run it after each fix — fixes to rule logic often surface new violations elsewhere. Delete any scratch files first (e.g. in `.ai-temporary/`), or the dogfooding run lints them too.\n- Create or update snapshots: `node --test --test-update-snapshots test/rule-name.js`. A new snapshot case fails until you do this. Snapshots are saved in `test/snapshots/rule-name.js.snapshot`.\n- Focus a single case: wrap with `test.only('code')` or `test.only({code, options})`, and run with `node --test --test-only test/rule-name.js` (remove before committing). Never update snapshots while `only` is used: the update rewrites the whole snapshot file, so the snapshots of the skipped cases are deleted.\n- Use `t.assert.*` inside tests, with the strict methods (`strictEqual`, `deepStrictEqual`), because `t.assert` is loose mode. Helpers outside tests import `node:assert/strict`.\n- For non-snapshot tests, use `test()` with explicit `errors` and `output`\n\n### Edge cases to test\n\nInclude test cases for these when relevant to the rule:\n\n- **TypeScript** - Type assertions (`foo as Bar`, `<Bar>foo`), non-null assertions (`foo!`), `satisfies`, generics. Verify both matching and fixer/suggestion output, including optional chaining behavior and ASI protection when the output can start with `(` or `[`. Use `{code, parser: parsers.typescript}`. For rules that use type information (e.g. `isBoolean`, `parserServices.getTypeAtLocation`), test three tiers where it makes sense: plain JS, TS with only type annotations (syntax-only, via `parsers.typescript`), and TS with full type info (via the `typeAware` helper with `projectService: {allowDefaultProject: ['*.ts']}`). See `test/no-unsafe-property-key.js` for the `typeAware` pattern.\n- **JSX** - JSX expressions and fragments, if the rule targets patterns that can appear in JSX.\n- **Comments** - Inline and block comments inside the targeted node, to verify fixes don't drop them.\n- **Parenthesized expressions** - Extra parentheses around the target: `(foo).bar()`.\n- **Nested/chained** - The pattern appearing inside other expressions or chained calls.\n- **Computed properties** - `obj[method]()` vs `obj.method()`.\n- **Tagged templates** - `` tag`string` ``.\n- **Template literals without expressions** - Test quoted and backtick forms wherever matching depends on a string's value, including mixed forms, escaped values, and empty strings. Test interpolated and tagged templates separately; they are not static strings.\n- **Optional chaining** - `foo?.bar()`, `foo?.bar?.baz`.\n- **Spread** - `[...foo]`, `{...foo}`, `fn(...args)`.\n- **Destructuring** - The pattern inside destructuring assignments or parameters.\n- **Return value used vs unused** - `const x = foo.bar()` vs `foo.bar()` as a statement. Some fixes are only safe when the return value is unused (see `isValueNotUsable`).\n\n## Linting\n\nCI lints with **ESLint**, not `xo` — a clean `npx xo` run does not mean CI passes.\n\nRun `npm run fix` (or `npm run fix:js` for JS only) — it auto-fixes and reports whatever remains. Prefer it over hand-fixing errors one at a time.\n\nLint enforces single quotes (`avoidEscape: false`, no template literals). Don't write backtick strings in test cases unless you need interpolation — `--fix` can't convert a backtick string that contains a `'`, so you'd have to fix it by hand.\n\n## Autofix\n\nAlways try to provide an autofix if it cannot change runtime behavior. If an autofix could change runtime behavior, try to provide a suggestion instead.\n\nDo not complicate autofixes to handle shadowed built-in globals like `Number`, `Math`, `parseInt`, or `parseFloat`. Treat that as unsupported unless the rule already has a simple, local scope-safety check for another reason.\n\nDo not complicate autofixes to preserve Proxy or accessor side effects. Treat that as unsupported.\n\nDo not block reports, suggestions, or autofixes only to preserve sparse array holes. Treat array holes as unsupported.\n\nDo not turn all of a rule's autofixes into suggestions because of a rare evaluation-order case. These cases are unsupported: temporal dead zone reads, `valueOf`/`toString` coercion order, and when a side-effect-free expression is evaluated. Keep the autofix for the common pure form (for example `new Set([...x])`, `array.some(x => x === value)`, or a pure inline callback). Use a suggestion only when a real side effect can change the result, such as a call, assignment, update, `await`, `yield`, or a callback that is not proven pure. When a fix changes evaluation order, add a test that proves the most common form of the pattern is still autofixed.\n\nWhen writing fix functions:\n\n1. **Comments** - Keep reporting unless comments affect rule semantics; let ESLint handle disable directives. Withhold edits that remove or move comments using `getCommentSafeProblem()` or `abort()`. Preserve safe token edits.\n2. **Parentheses** - Replacing `foo` in `foo.bar()` with a complex expression may need wrapping: `(a + b).bar()`. Use helpers from `rules/utils/` like `shouldAddParenthesesToMemberExpressionObject`.\n3. **Semicolons** - If a fix makes a statement start with `[` or `(`, check `needsSemicolon()` and prepend `;` if needed.\n4. **Spacing** - Replacing `{foo}` with an identifier may merge tokens: `const{foo}` becomes `constfoo`. Add spaces when a symbol-boundary becomes a letter-boundary.\n5. **Generator fixes** - Use `* fix(fixer) { yield ... }` for multi-step fixes.\n6. **Suggestions** - Use `suggest` array with `messageId` and `fix` when autofix could change runtime behavior. Set `hasSuggestions: true` in meta.\n7. **Indentation and line endings** - ESLint inserts fix text verbatim and does not re-indent it. Never hardcode `\\t` or `\\n` when building new lines. Use the helpers in `rules/utils/`: `getLineIndent(node, context)` for the indentation of the line a node is on, `getIndentUnit(context)` for one level of the file's indentation, `getLinebreak(context)` for the file's line ending, and `reindentText(text, sourceIndent, targetIndent)` to move multi-line text to another indentation. Test fixes with space-indented and CRLF input, not only tabs and LF.\n\n## Rule naming\n\nUse a clear prefix that signals intent (see [ESLint built-in rules](https://eslint.org/docs/latest/rules/) for inspiration):\n\n- **`no-`** - Disallow something: `no-array-reduce`, `no-await-in-promise-methods`\n- **`prefer-`** - Suggest a better alternative: `prefer-array-flat-map`, `prefer-set-has`\n- **`require-`** - Mandate something is present: `require-array-join-separator`\n- **`consistent-`** - Enforce a single consistent style: `consistent-destructuring`\n- **No prefix** - Enforce a specific pattern: `error-message`, `filename-case`, `throw-new-error`\n\nName after the target construct, not the fix. Be specific: `no-array-method-this-argument` not `no-this-argument`.\n\n## Creating a new rule\n\n1. Run `npm run create-rule` to scaffold the rule file, test file, and doc file. This also regenerates `rules/index.js` and updates doc headers.\n2. Write tests in `test/<rule>.js` before implementing the rule.\n3. Implement the rule in `rules/<rule>.js`.\n4. Write documentation in `docs/rules/<rule>.md` (below the auto-generated header).\n5. Run `node --test --test-update-snapshots test/<rule>.js` to create the snapshots, review them, then run `node --test test/<rule>.js` to verify tests pass.\n6. Before pushing, run lint (`npm run lint:js`, which runs `eslint` — see [Linting](#linting)), dogfooding (`npm run run-rules-on-codebase`), and then `npm test`. If dogfooding finds intentional internal patterns, disable the rule in `eslint.dogfooding.config.js` instead of adding repo-specific heuristics.\n\n## Commit message format\n\nFollow these conventions:\n\n- **New rule**: `` Add `rule-name` rule ``\n- **Fix/improve existing rule**: `` `rule-name`: Short description ``\n- **General fix**: `Fix short description`\n- **Add option to rule**: `` `rule-name`: Add `optionName` option ``\n- **Drop a rule**: `` Drop `rule-name` rule ``\n\nAlways use backticks around rule names and option names in commit messages.\n","CLAUDE.md":"AGENTS.md","docs/rules/better-dom-traversing.md":"# better-dom-traversing\n\n📝 Prefer better DOM traversal APIs.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPrefer more readable and robust DOM traversal APIs.\n\nUse named first-child properties instead of positional access, selectors instead of positional child traversal, `.closest()` instead of repeated parent traversal, and merged `.querySelector()` calls when static selectors can be combined.\n\nThis rule is syntax-based and reports common DOM traversal patterns. Suggestions are intentionally manual because the replacement can change behavior in some cases, such as `undefined` versus `null` for empty child collections, exact-depth parent traversal versus selector-based ancestor lookup, or chained `querySelector()` calls that only search inside the first matching element.\n\n`props.children` access is ignored because it is component data, not DOM traversal.\n\n## Examples\n\n```js\n// ❌\nelement.childNodes[0];\n\n// ✅\nelement.firstChild;\n```\n\n```js\n// ❌\nelement.children[0];\n\n// ✅\nelement.firstElementChild;\n```\n\n```js\n// ❌\nelement.children[2];\n\n// ✅\nelement.querySelector(':scope selector');\n```\n\n```js\n// ❌\nelement.parentElement.parentElement;\n\n// ✅\nelement.closest('selector');\n```\n\n```js\n// ❌\nelement.querySelector('a').querySelector('b');\n\n// ✅\nelement.querySelector(':scope a b');\n```\n","docs/rules/catch-error-name.md":"# catch-error-name\n\n📝 Enforce a specific parameter name in catch clauses.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent name for caught errors across:\n\n- `try/catch` clauses\n- `.catch(…)` Promise handlers\n- `.then(…, rejectionHandler)` Promise handlers\n\nUsing one recognizable name makes error handlers easier to scan and avoids renaming the same concept across callback styles.\n\nThe desired parameter name is [configurable](#name), but defaults to `error`.\n\nThe following names are ignored:\n\n- `_`, but only if the error is not used.\n- Descriptive names, for example, `fsError` or `authError`.\n- Names matching [`options.ignore`](#ignore).\n\n## Examples\n\n```js\n// ❌\ntry {} catch (badName) {}\n\n// ✅\ntry {} catch (error) {}\n```\n\n```js\n// ❌\npromise.catch(badName => {});\n\n// ✅\npromise.catch(error => {});\n```\n\n```js\n// ❌\npromise.then(undefined, badName => {});\n\n// ✅\npromise.then(undefined, error => {});\n```\n\n```js\n// ❌\ntry {} catch (_) {\n\tconsole.log(_);\n}\n\n// ✅\n// Underscore is allowed when the error is not used\ntry {} catch (_) {\n\t// error is not used\n}\n```\n\n```js\n// ✅\n// Descriptive name is allowed\ntry {} catch (fsError) {}\n```\n\n```js\n// ✅\n// `error_` is allowed because of shadowed variables\ntry {} catch (error_) {\n\tconst error = new Error('🦄');\n}\n```\n\n## Options\n\n### name\n\nType: `string`\\\nDefault: `'error'`\n\nYou can set the `name` option like this:\n\n```js\n'unicorn/catch-error-name': [\n\t'error',\n\t{\n\t\tname: 'exception',\n\t},\n]\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nThis option lets you specify a regex pattern for matches to ignore.\n\nWhen a string is given, it's interpreted as a regular expression inside a string.\n\n```js\n'unicorn/catch-error-name': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'^error\\\\d*$',\n\t\t\t/^ignore/i,\n\t\t],\n\t},\n]\n```\n\nWith `^unicorn$`, this would fail:\n\n```js\ntry {} catch (pony) {}\n```\n\nAnd this would pass:\n\n```js\ntry {} catch (unicorn) {}\n```\n\n## Tip\n\nIn order to avoid shadowing in nested catch clauses, the auto-fix rule appends underscores to the identifier name.\n","docs/rules/class-reference-in-static-methods.md":"# class-reference-in-static-methods\n\n📝 Enforce consistent class references in static methods.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces either dynamic static dispatch with `this` and `super`, or direct references with class names.\n\nChoosing one style makes it clear whether a static method is intended to follow subclass dispatch or stay tied to a specific class.\n\nBy default, it prefers `this` and `super`.\n\n## Examples\n\n```js\n// ❌\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tFoo.qux();\n\t\tBar.qux();\n\t}\n}\n\n// ✅\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tthis.qux();\n\t\tsuper.qux();\n\t}\n}\n```\n\nWith `{preferThis: false, preferSuper: false}`:\n\n```js\n// ❌\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tthis.qux();\n\t\tsuper.qux();\n\t}\n}\n\n// ✅\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tFoo.qux();\n\t\tBar.qux();\n\t}\n}\n```\n\n## Options\n\nType: `object`\n\n### preferThis\n\nType: `boolean`\\\nDefault: `true`\n\nPrefer `this` over the current class name in static methods.\n\n### preferSuper\n\nType: `boolean`\\\nDefault: `true`\n\nPrefer `super` over the superclass name in static methods.\n","docs/rules/comma-spacing.md":"# comma-spacing\n\n📝 Enforce consistent spacing before and after commas in JSON and SOML.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces no whitespace before commas and exactly one ASCII space after commas on the same line in JSON, JSONC, and JSON5 using [`@eslint/json`](https://github.com/eslint/json), and in SOML using [`eslint-soml`](https://github.com/soml-lang/eslint-soml).\n\nPreserves line breaks and surrounding whitespace, including comma-first layouts. Ignores spacing after trailing commas directly before `]` or `}`, but still checks spacing before them.\n\nChecks spacing between commas and adjacent comments, preserving comment contents and whitespace beyond them. For example, `[1,/* comment */]` becomes `[1, /* comment */]`. Commas inside strings and comments are ignored.\n\nThis rule has no options and does not support `eslint-plugin-jsonc` languages.\n\nFor JavaScript and TypeScript, use [`@stylistic/comma-spacing`](https://eslint.style/rules/comma-spacing), which allows multiple spaces after commas.\n\n## Examples\n\n### Incorrect\n\n```json\n[1 ,2,  3]\n```\n\n```json\n{\"first\": 1,\"second\": 2}\n```\n\n### Correct\n\n```json\n[1, 2, 3]\n```\n\n```json\n{\"first\": 1, \"second\": 2}\n```\n\n```jsonc\n[1, /* Keep comment */2]\n```\n\n```json5\n[1, 2,]\n```\n","docs/rules/comment-content.md":"# comment-content\n\n📝 Enforce better comment content.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces curated replacements in comments. It is useful for common name, brand, and acronym casing corrections such as `nodejs` → `Node.js`, and for project-specific prose preferences.\n\nThis rule is not a spellchecker. It only checks known replacement patterns.\n\nIt only reports one replacement per comment at a time.\n\nIt focuses on prose-like comment text and skips obvious non-prose regions such as code snippets, including commented-out multi-line code, links, paths, structured data, and command examples.\n\nText inside backticks is ignored, including fenced code blocks in block comments. Use backticks for literal commands and identifiers.\n\n```js\n// ✅\n// Run `git config --list`.\n```\n\nIn JSDoc comments, it skips structured tag syntax such as parameter names, type expressions, and symbol references, while continuing to check prose in tag descriptions.\n\n## Examples\n\n```js\n// ❌\n// nodejs uses javascript.\n\n// ✅\n// Node.js uses JavaScript.\n```\n\n```js\n// ❌\n// See the github issue.\n\n// ✅\n// See the GitHub issue.\n```\n\n```js\n// ❌\n// The application stores png files.\n\n// ✅\n// The app stores PNG files.\n```\n\n## Options\n\nType: `object`\n\n### checkUniformCase\n\nType: `boolean`\\\nDefault: `true`\n\nBy default, the rule re-cases matching tokens regardless of their case, including all-lowercase (`json`) and all-uppercase (`JSON`) ones.\n\nPass `checkUniformCase: false` to only correct tokens that already mix upper- and lower-case, such as `Github` → `GitHub`. All-lowercase and all-uppercase tokens are then left alone, as their casing is often intentional. Replacements that change the actual letters (such as `application` → `app`, or your own typo fixes) still apply regardless of case.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\tcheckUniformCase: false,\n\t},\n]\n```\n\n### replacements\n\nType: `object`\n\nYou can extend the default replacements by passing the `replacements` option.\n\nThe key is treated as a regex. By default, custom replacements are case-sensitive.\n\nDefault replacement patterns treat Unicode letters, marks, numbers, and underscores as part of a word. Custom patterns are used exactly as written.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\t'\\\\bteh\\\\b': 'the',\n\t\t\t'\\\\bto do\\\\b': {\n\t\t\t\treplacement: 'TODO',\n\t\t\t\tcaseSensitive: false,\n\t\t\t},\n\t\t\t'\\\\bnode\\\\.?js\\\\b': false,\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `extendDefaultReplacements: false` to override the default replacements completely.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\textendDefaultReplacements: false,\n\t\treplacements: {\n\t\t\t'\\\\bteh\\\\b': 'the',\n\t\t},\n\t},\n]\n```\n","docs/rules/consistent-arrow-return-style.md":"# consistent-arrow-return-style\n\n📝 Enforce a consistent return style for multiline arrow function bodies.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUse concise bodies when the expression fits on one line and an explicit `return` when it spans multiple lines. A line break between `=>` and a single-line expression is ignored.\n\nOnly blocks with a single `return` and a single-line argument are converted. Blocks with other statements, bare returns, or multiline return expressions are ignored.\n\nFixes are omitted when reindenting could change string, template literal, or JSX text, or when removing the block could change how the following token is parsed.\n\nThis rule is an alternative to [`arrow-body-style`](https://eslint.org/docs/latest/rules/arrow-body-style). Do not enable both rules together.\n\n## Examples\n\n```js\n// ❌\nconst getValue = () => getValueFromServer(\n\turl,\n\toptions,\n);\n\n// ✅\nconst getValue = () => {\n\treturn getValueFromServer(\n\t\turl,\n\t\toptions,\n\t);\n};\n\n// ❌\nconst getValue = () => {\n\treturn value;\n};\n\n// ✅\nconst getValue = () => value;\n\n// ❌\nconst getObject = () => ({\n\tvalue,\n});\n\n// ✅\nconst getObject = () => {\n\treturn {\n\t\tvalue,\n\t};\n};\n\n// ❌ No fix: contains a comment.\nconst getValue = () => /* Keep this comment. */\n\tgetValueFromServer(\n\t\turl,\n\t\toptions,\n\t);\n```\n","docs/rules/consistent-assert.md":"# consistent-assert\n\n📝 Enforce consistent assertion style with `node:assert`.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPrefer `assert.ok()` over `assert()` for its explicit intent and better readability. It aligns with other assert methods, ensuring consistency and making code easier to maintain and understand.\n\n## Examples\n\n```js\nimport assert from 'node:assert/strict';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n\n```js\nimport assert from 'node:assert';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n\n```js\nimport {strict as assert} from 'node:assert';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n","docs/rules/consistent-boolean-name.md":"# consistent-boolean-name\n\n📝 Enforce consistent naming for boolean names.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nBy default, this rule checks boolean variables, parameters, and functions. Object, class, and TypeScript property and method names are ignored unless enabled with their respective options.\n\nEach `check*` option accepts one of these modes:\n\n- `always`: require prefixes for booleans and reject misleading prefixes on non-booleans.\n- `prohibit`: only reject misleading prefixes on non-booleans.\n- `never`: skip the occurrence entirely.\n\nBoolean names should start with a prefix that makes the boolean meaning clear.\n\nNames that start with a boolean prefix should also refer to booleans or boolean-returning functions. Unknown values are ignored.\n\nFunctions and callable type annotations returning `boolean`, `Promise<boolean>`, `PromiseLike<boolean>`, or unions of these are considered boolean-returning, whether or not the function is `async`.\n\nGetters returning promises are treated as non-boolean values.\n\nWhen type information is unavailable, a type annotation is needed to require prefixes for promise-returning functions.\n\nConfigured wrapper bindings may use boolean prefixes when a configured property or method provides a boolean-like value. This applies only to variables and parameters that are not reassigned.\n\nReports for property and method names, and reports for non-boolean values using boolean prefixes, do not provide rename suggestions.\n\nThe default prefixes are:\n\n- `is`\n- `are`\n- `has`\n- `have`\n- `can`\n- `should`\n- `was`\n- `were`\n- `does`\n- `did`\n- `will`\n- `requires`\n\nThe `do` prefix is excluded because it also starts action names like `doWork()`, which would then be reserved for boolean-like values. Use `doesChecksPass` instead of `doChecksPass`, or `didChecksPass` for a past result; identifiers need not follow English grammar. To allow `do`, set `prefixes: {do: true}`.\n\nThe plural prefixes (`are`, `have`, `were`) allow names for boolean collections, like `areFilesValid`.\n\nThe prefix must be a distinct word part. `isReady`, `is_ready`, and `IS_READY` are allowed, but `island` is not considered to have the `is` prefix.\n\nReact hook function bindings are checked after the required `use` prefix. For example, `useIsReady` is treated as a boolean hook name, while `useReady` is not. `ignore` patterns still match the original source name, like `useReady`.\n\nReact refs initialized with a boolean-like value may use boolean prefixes when the binding name ends in `Ref` or `Reference`, such as `isMountedRef`, `hasConsentRef`, or `hasConsentReference`. The suffix identifies the binding as a ref object. The binding must not be reassigned after initialization.\n\nDirect Vue `ref()` calls with boolean-like values and `computed()` calls with synchronous getters returning booleans may use boolean prefixes, such as `isBranch` or `hasDepartment`. The binding must not be reassigned after initialization. For refs returned by other calls, such as composables returning `ShallowRef<boolean>`, use type-aware [`wrappers`](#wrappers) with `{Ref: 'value'}`, which also covers `ComputedRef`.\n\nThis rule intentionally does not check destructuring bindings, imports, class names, or catch parameters.\n\nTypeScript type annotation checks resolve local type aliases and callable interfaces, including generic type parameters, but not qualified or namespaced type references.\n\nJSDoc `@type`, `@param`, and `@returns` annotations are supported without TypeScript configuration. Rename suggestions update matching `@param` names. Inference is best effort; advanced types, typedefs, and imports are not resolved.\n\nWithout TypeScript type information, nested generic alias resolution is best effort. Some finite nested instantiations may be treated as unknown.\n\nThis rule is only automatically fixable when a non-global, non-exported, non-ambient variable binding can be safely renamed to the first enabled prefix without adding a collision suffix. Other safe rename candidates are still provided as editor suggestions.\n\n## Examples\n\n```js\n// ❌\nconst completed = true;\n\n// ✅\nconst isCompleted = true;\n```\n\n```js\n// ❌\nconst hasName = 'Sindre';\n\n// ✅\nconst name = 'Sindre';\n```\n\n```js\n// ❌\nfunction hasTitle() {\n\treturn 'Unicorn';\n}\n\n// ✅\nfunction getTitle() {\n\treturn 'Unicorn';\n}\n```\n\n```js\n// ❌\nconst completed = progress === 100;\n\n// ✅\nconst hasCompleted = progress === 100;\n```\n\n```js\n// ❌\nconst completed = Boolean(value);\n\n// ✅\nconst isCompleted = Boolean(value);\n```\n\n```js\n// ❌\nfunction download(showProgress = false) {}\n\n// ✅\nfunction download(shouldShowProgress = false) {}\n```\n\n```js\n// ❌\n/** @param {boolean} showProgress */\nfunction download(showProgress) {}\n\n// ✅\n/** @param {boolean} shouldShowProgress */\nfunction download(shouldShowProgress) {}\n```\n\n```ts\n// ❌\nconst completed: boolean = true;\n\n// ✅\nconst isCompleted: boolean = true;\n```\n\n```js\n// ❌\nfunction completed() {\n\treturn true;\n}\n\n// ✅\nfunction isCompleted() {\n\treturn true;\n}\n```\n\n```ts\n// ❌\nfunction download(showProgress: boolean) {}\n\n// ✅\nfunction download(shouldShowProgress: boolean) {}\n```\n\n```js\n// ✅\n// Object fields are ignored unless `checkFields` is set to a mode other than `never`.\n// Methods and getters use `checkMethods`. Setter names are ignored because setters do not return values.\nconst task = {\n\tcompleted: progress === 100,\n};\n```\n\n## Options\n\n### checkVariables\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check variable names.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tcheckVariables: 'prohibit',\n\t},\n]\n```\n\nWith `checkVariables: 'prohibit'`, this would fail:\n\n```js\nconst hasName = 'Sindre';\n```\n\nAnd these would pass:\n\n```js\nconst completed = true;\nconst isCompleted = true;\n```\n\n### checkArguments\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check parameter names, including TypeScript constructor parameter properties. Setter parameters are ignored because their names are positional. For example, `checkArguments: 'never'` allows both forms:\n\n```js\nfunction download(showProgress = false) {}\nfunction download(shouldShowProgress = false) {}\n```\n\n### checkFunctions\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check function names.\n\n### checkMethods\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'never'`\n\nHow to check object and class methods, getters, and TypeScript method signatures. Setter names are ignored because setters do not return values.\n\n### checkFields\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'never'`\n\nHow to check object properties, class fields, TypeScript property signatures, and TypeScript constructor parameter properties. Constructor parameter properties are checked as both arguments and fields.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tcheckMethods: 'always',\n\t\tcheckFields: 'never',\n\t},\n]\n```\n\nWith the above config, this would fail:\n\n```js\nclass Task {\n\thasTitle() {\n\t\treturn 'Unicorn';\n\t}\n}\n```\n\nAnd this would pass:\n\n```js\nclass Task {\n\tcompleted = true;\n\tisCompleted() {\n\t\treturn true;\n\t}\n}\n```\n\n### prefixes\n\nType: `Record<string, boolean>`\\\nDefault:\n\n```js\n{\n\tis: true,\n\tare: true,\n\thas: true,\n\thave: true,\n\tcan: true,\n\tshould: true,\n\twas: true,\n\twere: true,\n\tdoes: true,\n\tdid: true,\n\twill: true,\n\trequires: true,\n}\n```\n\nThe `prefixes` option is merged with the defaults. Set a prefix to `true` to allow it for boolean names and reserve it for boolean-like values. Set a prefix to `false` to disable it in both directions.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tprefixes: {\n\t\t\tneeds: true,\n\t\t\tdid: false,\n\t\t},\n\t},\n]\n```\n\nWith the above config, this would pass:\n\n```js\nconst needsUpdate = true;\n```\n\nAnd this would fail:\n\n```js\nconst didUpdate = true;\n```\n\n### wrappers\n\nType: `Record<string, string>`\\\nDefault: `{}`\n\nMap unqualified TypeScript wrapper type names to the property or method that provides a boolean-like value. Same-named types share configuration. Derived types, intersections, and constrained type parameters are supported. Members may provide `boolean`, `Promise<boolean>`, or `PromiseLike<boolean>`; nullable results are accepted. Requires TypeScript type information.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\twrappers: {\n\t\t\tStorageItem: 'get',\n\t\t},\n\t},\n]\n```\n\nWith the above configuration, this would pass:\n\n```ts\ninterface StorageItem<Base, Return = Base | undefined> {\n\tget(): Promise<Return>;\n}\n\ndeclare const isUnicorn: StorageItem<unknown, boolean>;\n```\n\nBut this would still fail because `get()` returns a string:\n\n```ts\ninterface StorageItem<Base, Return = Base | undefined> {\n\tget(): Promise<Return>;\n}\n\ndeclare const isUnicorn: StorageItem<unknown, string>;\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nNames matching any of these patterns are not checked. Strings are treated as regular expressions, so they match anywhere in the name unless anchored with `^` and `$`.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'value',\n\t\t\t'^completed$',\n\t\t],\n\t},\n]\n```\n\nWith the above config, these would pass:\n\n```js\nconst value = true;\nconst completed = true;\n```\n","docs/rules/consistent-class-member-order.md":"# consistent-class-member-order\n\n📝 Enforce consistent class member order.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n\nA predictable member order makes classes faster to scan and keeps related static, instance, field, and method members together.\n\nThis rule enforces the following class member order:\n\n1. Static fields\n2. Static blocks\n3. Static methods\n4. Private instance fields\n5. Public instance fields\n6. Constructors\n7. Private instance methods\n8. Public instance methods\n\nStatic members are grouped by `static` before privacy, so `static #foo` belongs with other static fields or methods.\n\nTypeScript `protected` members follow the same order as public members.\n\nThis rule does not autofix because fields and static blocks run in declaration order, and method order is observable through property reflection.\n\nIt may offer a manual suggestion for simple class bodies without comments, decorators, computed keys, or unsupported members. The suggestion is not offered when it would move a static field across a static block. It can still move instance fields past each other, which changes the order their initializers run in, so check fields whose initializers have side effects or read other fields.\n\nThis rule is intentionally simple. It only enforces group order and will not add options for sorting within groups, newline handling, or more detailed member categories. Use a dedicated sorting rule if you need that.\n\n## Options\n\nType: `object`\n\n### order\n\nType: `string[]`\n\nDefault:\n\n```js\n[\n\t'static-field',\n\t'static-block',\n\t'static-method',\n\t'private-field',\n\t'public-field',\n\t'constructor',\n\t'private-method',\n\t'public-method',\n]\n```\n\nThe array must contain each group exactly once.\n\n## Examples\n\n```js\n// ❌\nclass Foo {\n\tconstructor() {}\n\t#privateField = 1;\n\tpublicField = 1;\n}\n```\n\n```js\n// ✅\nclass Foo {\n\tstatic staticField = 1;\n\t#privateField = 1;\n\tpublicField = 1;\n\n\tconstructor() {}\n}\n```\n\n```js\n// ❌\nclass Foo {\n\tpublicMethod() {}\n\t#privateMethod() {}\n}\n```\n\n```js\n// ✅\nclass Foo {\n\tstatic staticMethod() {}\n\t#privateMethod() {}\n\tpublicMethod() {}\n}\n```\n","docs/rules/consistent-compound-words.md":"# consistent-compound-words\n\n📝 Enforce consistent spelling of compound words in identifiers.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nCompound words should be treated as one word when applying identifier casing conventions.\n\nTreating the same compound word consistently prevents equivalent concepts from being cased differently across identifiers.\n\nThis rule uses a conservative curated list of common compound-word mistakes in code identifiers. It is not a spellchecker or a prose style rule.\n\n## Examples\n\n```js\n// ❌\nconst passWord = 'secret';\n\n// ✅\nconst password = 'secret';\n```\n\n```js\n// ❌\nconst isInViewPort = true;\n\n// ✅\nconst isInViewport = true;\n```\n\n```js\n// ❌\nfunction unSubscribe() {}\n\n// ✅\nfunction unsubscribe() {}\n```\n\n## Intentionally not checked\n\nIn JavaScript, this rule does not check string keys, computed properties, property reads, JSX attributes, or export aliases. These are often external API surfaces where preserving the exact spelling is more important than normalizing identifier style.\n\nIt also intentionally excludes ambiguous or common API spellings such as `fileName`, `setUp`, `lookUp`, and `newLine`. These can be natural identifiers when the words keep separate meaning, for example a newly created line instead of the newline character.\n\n## Data keys, CSS, and HTML\n\nWith `checkProperties: true`, the rule checks JSON object keys, YAML string keys, TOML key segments (including table names), and SOML keys. It skips YAML non-string, tagged, anchored, and alias keys, plus string values.\n\nWith `checkVariables` (enabled by default), it checks CSS class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media, plus HTML `id` and individual `class` names. Built-in CSS property names and value keywords, and `animation` shorthand values are skipped. CSS escapes and HTML character references are decoded; templated HTML values are skipped.\n\nFor example, `backGround`, `back-ground`, and `back_ground` are flagged in favor of `background`. Allow-list entries match the full decoded name, including `--`. Data and CSS/HTML diagnostics have no fixes or suggestions because names may be referenced elsewhere.\n\n## Options\n\nType: `object`\n\n### replacements\n\nType: `object`\n\nYou can extend default replacements by passing the `replacements` option.\n\n```js\n'unicorn/consistent-compound-words': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\tfooBar: 'foobar',\n\t\t\tpassWord: false,\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `extendDefaultReplacements: false` to override the default `replacements` completely.\n\n### allowList\n\nType: `object`\n\nUse `allowList` to skip full identifier names case-sensitively. Values must be `true`.\n\n```js\n'unicorn/consistent-compound-words': [\n\t'error',\n\t{\n\t\tallowList: {\n\t\t\tlegacyUserName: true,\n\t\t},\n\t},\n]\n```\n\n### checkVariables\n\nType: `boolean`\\\nDefault: `true`\n\nPass `checkVariables: false` to disable checking variable names.\n\n### checkProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `checkProperties: true` to check property definitions and property writes.\n\n### checkDefaultAndNamespaceImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in default or namespace imports, but only for internal modules.\n- `true` - Check variables declared in default or namespace imports.\n- `false` - Don't check variables declared in default or namespace imports.\n\n### checkShorthandImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in shorthand imports, but only for internal modules.\n- `true` - Check variables declared in shorthand imports.\n- `false` - Don't check variables declared in shorthand imports.\n\n### checkShorthandProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `checkShorthandProperties: true` to check variables declared as shorthand properties in object patterns.\n","docs/rules/consistent-conditional-object-spread.md":"# consistent-conditional-object-spread\n\n📝 Enforce consistent conditional object spread style.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen conditionally spreading properties into an object literal, pick one style consistently.\n\nBy default, this rule prefers `&&` because it avoids an unnecessary empty object branch.\n\n## Examples\n\n```js\n// ❌\nconst object = {...(condition ? {property} : {})};\n\n// ✅\nconst object = {...(condition && {property})};\n```\n\nAn `undefined` or `null` fallback branch spreads nothing, so it is treated the same as an empty object:\n\n```js\n// ❌\nconst object = {...(condition ? {property} : undefined)};\n\n// ✅\nconst object = {...(condition && {property})};\n```\n\nWith the default `'logical'` style, a boolean cast of the condition is also reported, because every falsy value spreads nothing:\n\n```js\n// ❌\nconst object = {...(!!condition && {property})};\n\n// ❌\nconst object = {...(Boolean(condition) && {property})};\n\n// ✅\nconst object = {...(condition && {property})};\n\n// ❌\nconst object = {...(!!first && !!second && {property})};\n\n// ✅\nconst object = {...(first && second && {property})};\n```\n\n> [!NOTE]\n> In TypeScript, a condition of type `unknown` needs the boolean cast, because TypeScript does not allow spreading `unknown`. Use an `// eslint-disable-next-line` comment in that case.\n\nWith the `'ternary'` option:\n\n```js\n// eslint unicorn/consistent-conditional-object-spread: [\"error\", \"ternary\"]\n\n// ❌\nconst object = {...(condition && {property})};\n\n// ✅\nconst object = {...(condition ? {property} : {})};\n```\n\n## Options\n\nType: `string`\\\nDefault: `'logical'`\n\nAvailable options:\n\n- `'logical'` - Prefer `...(condition && object)`, without a boolean cast of `condition`.\n- `'ternary'` - Prefer `...(condition ? object : {})`.\n","docs/rules/consistent-date-clone.md":"# consistent-date-clone\n\n📝 Prefer passing `Date` directly to the constructor when cloning.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThe [`Date` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date) can clone a `Date` object directly when passed as an argument. This is simpler and more efficient than extracting the timestamp with `.getTime()`.\n\n> Note: This approach requires ES2015 (ES6) or later. In older environments, `new Date(date)` converts to a string first, but modern JavaScript handles this correctly.\n\n## Examples\n\n```js\n// ❌\nnew Date(date.getTime());\n\n// ✅\nnew Date(date);\n```\n\n```js\n// ❌\nconst cloned = new Date(originalDate.getTime());\n\n// ✅\nconst cloned = new Date(originalDate);\n```\n\n```js\n// ✅\n// When you need just the timestamp value\nconst timestamp = date.getTime();\n```\n","docs/rules/consistent-destructuring.md":"# consistent-destructuring\n\n📝 Use destructured variables over properties.\n\n🚫 Disabled by default.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces the use of already destructured variables over accessing the same direct, non-computed identifier property again. Previous destructurings are easily missed which leads to an inconsistent code style.\n\nThis rule is partly fixable. It does not suggest adding new properties to existing destructuring patterns, as that could read properties earlier than before.\n\nThere is no option to ignore specific sources or properties. Properties without a corresponding destructured variable are ignored by design.\n\n## Examples\n\n```js\n// ❌\nconst {a} = foo;\nconsole.log(foo.a);\n\n// ✅\nconst {a} = foo;\nconsole.log(a);\n\n// ✅\nconsole.log(foo.a, foo.b);\n```\n\n```js\n// ✅\nconst {a} = foo;\nconsole.log(a, foo.b);\n```\n\n```js\n// ✅\nconst {\n\ta: {b},\n} = foo;\nconsole.log(foo.a.c);\n```\n\n```js\n// ❌\nconst {bar} = foo;\nconst {a} = foo.bar;\n\n// ✅\nconst {bar} = foo;\nconst {a} = bar;\n```\n\n```js\n// ✅\nconst {a} = foo;\nconsole.log(a, foo.b());\n```\n\n```js\n// ✅\nconst {a} = foo.bar;\nconsole.log(foo.bar.a);\n```\n\nA destructured value is a snapshot. A direct call such as `update(foo)` or `foo.update()` between the destructuring and the property access could have changed the object, so that access is not reported. This is best-effort: a call in a nested function, a method call on `this`, and a call later in a loop body (which runs again before the next access) are not taken into account.\n\n```js\n// ✅\nconst {a} = foo;\nupdate(foo);\nconsole.log(foo.a);\n```\n","docs/rules/consistent-empty-array-spread.md":"# consistent-empty-array-spread\n\n📝 Prefer consistent types when spreading a ternary in an array literal.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen spreading a ternary in an array, we can use both `[]` and `''` as fallbacks, but it's better to have consistent types in both branches.\n\n## Examples\n\n```js\n// ❌\nconst array = [\n\ta,\n\t...(foo ? [b, c] : ''),\n];\n\n// ❌\nconst array = [\n\ta,\n\t...(foo ? 'bc' : []),\n];\n\n// ✅\nconst array = [\n\ta,\n\t...(foo ? [b, c] : []),\n];\n\n// ✅\nconst array = [\n\ta,\n\t...(foo ? 'bc' : ''),\n];\n```\n","docs/rules/consistent-existence-index-check.md":"# consistent-existence-index-check\n\n📝 Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.\n\nPrefer using `index === -1` to check if an element does not exist and `index !== -1` to check if an element does exist.\n\nThe value `-1` is the sentinel returned by these methods when no match is found, so comparing it directly with `===` or `!==` makes the check read as a not-found sentinel check instead of a numeric range check.\n\nSimilar to the [`explicit-length-check`](explicit-length-check.md) rule.\n\n## Examples\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index >= 0) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index > -1) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = foo.lastIndexOf('bar');\n\n// ❌\nif (index >= 0) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = array.findIndex(element => element > 10);\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n\n```js\nconst index = array.findLastIndex(element => element > 10);\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n","docs/rules/consistent-export-decorator-position.md":"# consistent-export-decorator-position\n\n📝 Enforce consistent decorator position on exported classes.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nDecorators can be placed before or after `export` and `export default` on class declarations. Pick one style for consistency.\n\nThis rule requires a parser that supports decorators, such as `@typescript-eslint/parser`.\n\n## Examples\n\n```js\n// eslint unicorn/consistent-export-decorator-position: error\n\n// ❌\nexport default @decorator class Foo {}\n\n// ❌\n@decorator export default class Foo {}\n\n// ✅\n@decorator\nexport default class Foo {}\n```\n\n### `before`\n\n```js\n// eslint unicorn/consistent-export-decorator-position: [\"error\", \"before\"]\n\n// ❌\n@decorator\nexport default class Foo {}\n\n// ✅\n@decorator export default class Foo {}\n```\n\n### `after`\n\n```js\n// eslint unicorn/consistent-export-decorator-position: [\"error\", \"after\"]\n\n// ❌\n@decorator\nexport default class Foo {}\n\n// ✅\nexport default @decorator class Foo {}\n```\n\n## Options\n\nType: `string`\\\nDefault: `'above'`\n\nAvailable options:\n\n- `'above'` - Require decorators on the line above the export.\n- `'before'` - Require decorators before `export` on the same line.\n- `'after'` - Require decorators after `export` or `export default`.\n","docs/rules/consistent-function-scoping.md":"# consistent-function-scoping\n\n📝 Move function definitions to the highest possible scope.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nA function definition should be placed as close to the top-level scope as possible without breaking its captured values. This improves readability, [directly improves performance](https://stackoverflow.com/a/81329/207247) and allows JavaScript engines to [better optimize performance](https://ponyfoo.com/articles/javascript-performance-pitfalls-v8#optimization-limit).\n\n## Examples\n\n```js\n// ❌\nexport function doFoo(foo) {\n\t// Does not capture anything from the scope, can be moved to the outer scope\n\tfunction doBar(bar) {\n\t\treturn bar === 'bar';\n\t}\n\n\treturn doBar;\n}\n```\n\n```js\n// ✅\nfunction doBar(bar) {\n\treturn bar === 'bar';\n}\n\nexport function doFoo(foo) {\n\treturn doBar;\n}\n```\n\n```js\n// ❌\nfunction doFoo() {\n\t// Does not capture anything from the scope, can be moved to the outer scope\n\treturn bar => bar === 'bar';\n}\n```\n\n```js\n// ✅\nconst doBar = bar => bar === 'bar';\n\nfunction doFoo() {\n\treturn doBar;\n}\n```\n\n```js\n// Arrow functions in return statements are also flagged\n// ❌\nexport function someAction() {\n\treturn dispatch => dispatch({type: 'SOME_TYPE'});\n}\n```\n\n```js\n// Arrow functions in return statements are also flagged\n// ✅\nconst handleDispatch = dispatch => dispatch({type: 'SOME_TYPE'});\n\nexport function someAction() {\n\treturn handleDispatch;\n}\n```\n\n```js\n// ❌\nfunction doFoo(foo) {\n\tconst doBar = bar => {\n\t\treturn bar === 'bar';\n\t};\n}\n```\n\n```js\n// ✅\nconst doBar = bar => {\n\treturn bar === 'bar';\n};\n\nfunction doFoo(foo) {}\n```\n\n```js\n// ✅\nexport function doFoo(foo) {\n\tfunction doBar(bar) {\n\t\treturn bar === 'bar' && foo.doBar(bar);\n\t}\n\n\treturn doBar;\n}\n\nconst doBar = bar => bar === 'bar';\n\nexport function doFoo() {\n\treturn doBar;\n}\n```\n\n## Options\n\n### checkArrowFunctions\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkArrowFunctions\": false` to disable linting of arrow functions.\n\n## Limitations\n\nThis rule does not detect or remove extraneous code blocks inside of functions:\n\n```js\nfunction doFoo(foo) {\n\t{\n\t\tfunction doBar(bar) {\n\t\t\treturn bar;\n\t\t}\n\t}\n\n\treturn foo;\n}\n```\n\n[Immediately invoked function expressions (IIFE)](https://en.wikipedia.org/wiki/Immediately_invoked_function_expression) are ignored:\n\n```js\n(function () {\n\tfunction doFoo(bar) {\n\t\treturn bar;\n\t}\n})();\n```\n\n[Built-in Hooks in React](https://reactjs.org/docs/hooks-reference.html) are ignored:\n\n```js\nuseEffect(() => {\n\tasync function getItems() {}\n\n\tgetItems();\n}, [])\n```\n\nFunctions inside `jest.mock()` factories are ignored because Jest restricts those factories from referencing out-of-scope variables:\n\n```js\njest.mock('module', () => {\n\tfunction createMock() {\n\t\treturn 'mock';\n\t}\n\n\treturn createMock;\n});\n```\n\nFunctions inside Vitest's `vi.mock()` and `vi.hoisted()` factories are also ignored because those factories run before the module's top-level code:\n\n```js\nconst mocks = vi.hoisted(() => {\n\tconst createMock = () => 'mock';\n\treturn {createMock};\n});\n\nvi.mock('module', () => {\n\tconst createMock = () => 'mock';\n\treturn {createMock};\n});\n```\n","docs/rules/consistent-function-style.md":"# consistent-function-style\n\n📝 Enforce function syntax by role.\n\n🚫 Disabled by default.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce function syntax by role.\n\nChoosing syntax by function role keeps declarations consistent and makes callbacks, methods, and standalone functions easier to distinguish.\n\nBy default, this rule reports nothing. Configure the roles you want to enforce.\n\nThis rule does not autofix. Function declarations, function expressions, arrow functions, and object methods are not always semantic equivalents, so `--fix` would be too risky for a style rule.\n\nThe rule offers editor suggestions only for simple callback conversions between anonymous function expressions and arrow functions. Suggestions are skipped when the callback contains comments, `this`, `arguments`, `super`, `new.target`, direct `eval()`, generators, named function expressions, or TypeScript type parameters.\n\n## Examples\n\n```js\n// eslint unicorn/consistent-function-style: ['error', {namedFunctions: 'declaration'}]\n\n// ❌\nconst parse = value => value;\n\n// ✅\nfunction parse(value) {\n\treturn value;\n}\n```\n\n```js\n// ✅ Reassigned variables are ignored by default.\nlet transform = value => value;\n\nif (debug) {\n\ttransform = wrap(transform);\n}\n```\n\n```js\n// ✅ Callbacks are ignored by default.\nitems.map(item => item.id);\n```\n\n```js\n// eslint unicorn/consistent-function-style: ['error', {namedFunctions: 'arrow-function'}]\n\n// ❌\nfunction parse(value) {\n\treturn JSON.parse(value);\n}\n\n// ✅\nconst parse = value => JSON.parse(value);\nexport default parse;\n```\n\n## Options\n\nType: `object`\n\nDefault:\n\n```js\n{\n\tdefault: 'ignore',\n\tnamedFunctions: 'ignore',\n\tnamedExports: 'ignore',\n\tcallbacks: 'ignore',\n\tobjectProperties: 'ignore',\n\treassignedVariables: 'ignore',\n\ttypedVariables: 'ignore',\n}\n```\n\nEach option chooses the expected style for a role.\n\nWhen multiple roles apply, the most specific role wins. Roles are checked in this order:\n\n```js\ndefaultExport\ntypedVariables\nreassignedVariables\nnamedExports\ncallbacks\nobjectProperties\nnamedFunctions\ndefault\n```\n\n### `default`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nFallback style for functions that do not match a more specific role.\n\n### `defaultExport`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for functions written directly inside `export default`. When omitted, named default-exported function declarations use the `namedFunctions` option, other named function expressions use the `default` option, and anonymous default exports are ignored. Explicitly setting `'ignore'` also suppresses syntax reports for direct default-exported functions. Exported identifiers such as `export default parse` are not followed.\n\n### `namedFunctions`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for function declarations and named variable functions.\n\n### `namedExports`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for inline named function exports, such as `export function foo() {}` and `export const foo = () => {}`. Export specifier lists like `export {foo}` are ignored.\n\n### `callbacks`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for inline functions passed as call or constructor arguments.\n\n### `objectProperties`\n\nAllowed values: `'method'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for object literal function properties.\n\n### `reassignedVariables`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for variable functions whose binding is reassigned after initialization.\n\n### `typedVariables`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for TypeScript variable functions with an explicit type annotation.\n\n## Limitations\n\nThe rule ignores anonymous default exports when `defaultExport` is omitted or set to `'ignore'`, export specifier lists, IIFEs, accessors, class methods, class fields, destructuring and parameter defaults, TypeScript overload declarations, and generators when the expected style is `'arrow-function'`. When `defaultExport` is configured to a non-`ignore` style, anonymous default-exported functions are checked for syntax but are still handled separately by [`no-anonymous-default-export`](./no-anonymous-default-export.md) for naming. When both rules are enabled, an anonymous default can therefore produce two reports: one for its syntax and one for its missing name. Most reports do not have suggestions, because the safe rewrite surface is intentionally narrow.\n","docs/rules/consistent-json-file-read.md":"# consistent-json-file-read\n\n📝 Enforce consistent JSON file reads before `JSON.parse()`.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen reading and parsing a JSON file, consistently read it using the configured style. By default, the rule prefers reading it as a string.\n\nThe default keeps the code compatible with TypeScript, where [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) accepts a string.\n\nThe rule only checks and fixes direct no-option reads and option objects where `encoding` is the only property. Reads with additional options are left unchanged to avoid dropping options.\n\n## Examples\n\n```js\n// ❌\nconst packageJson = JSON.parse(await fs.readFile('./package.json'));\n\n// ❌\nconst promise = fs.readFile('./package.json');\nconst packageJson = JSON.parse(await promise);\n\n// ✅\nconst packageJson = JSON.parse(await fs.readFile('./package.json', 'utf8'));\n```\n\n```js\n// ✅\nconst promise = fs.readFile('./package.json', {encoding: 'utf8', signal});\nconst packageJson = JSON.parse(await promise);\n```\n\n## Options\n\nType: `'string' | 'buffer'`\n\nDefault: `'string'`\n\n### `buffer`\n\nPrefer reading JSON files as buffers.\n\n```js\n// eslint unicorn/consistent-json-file-read: [\"error\", \"buffer\"]\n\n// ❌\nconst packageJson = JSON.parse(await fs.readFile('./package.json', 'utf8'));\n\n// ✅\nconst packageJson = JSON.parse(await fs.readFile('./package.json'));\n```\n","docs/rules/consistent-optional-chaining.md":"# consistent-optional-chaining\n\n📝 Enforce consistent optional chaining for same-base member access.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n\nEnforce consistent optional chaining for same-base member access in logical expressions.\n\nUsing optional chaining consistently for the same base makes nullish behavior easier to see and avoids visually similar expressions that handle missing values differently.\n\nThis rule intentionally handles only direct member access on both sides of `&&` or `||`. It does not rewrite broad truthiness checks like `foo && foo.bar` to `foo?.bar`, because that can change runtime values.\n\n## Examples\n\n```js\n// ❌\nfoo?.bar || foo.baz;\n\n// ✅\nfoo?.bar || foo?.baz;\n```\n\n```js\n// ❌\nfoo.bar || foo?.baz;\n\n// ✅\nfoo.bar || foo.baz;\n```\n\n```js\n// ❌\nfoo?.bar && foo?.baz;\n\n// ✅\nfoo?.bar && foo.baz;\n```\n\n```js\n// ❌\nfoo.bar && foo?.baz;\n\n// ✅\nfoo.bar && foo.baz;\n```\n","docs/rules/consistent-template-literal-escape.md":"# consistent-template-literal-escape\n\n📝 Enforce consistent style for escaping `${` in template literals.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen you need to include a literal `${` in a template literal (without it being interpreted as the start of an interpolation), there are multiple ways to escape it. This rule enforces using `\\${` (escaping the dollar sign) for consistency, as it's the most intuitive and clearest approach.\n\n## Escaping methods\n\n- `\\${` — escape the dollar sign ✅ (recommended)\n- `$\\{` — escape the opening brace (works, but inconsistent)\n- `\\$\\{` — escape both (redundant)\n\n## Examples\n\n```js\n// ❌ - Escaping the brace is inconsistent\nconst template = `$\\{variableName}`;\n\n// ❌ - Escaping both is redundant\nconst template = `\\$\\{variableName}`;\n\n// ✅ - Escape the dollar sign\nconst template = `\\${variableName}`;\n```\n\n```js\n// ✅ - Common use case: template strings for users\nconst message = `Use \\${variable} in your code`;\n\n// ✅ - JavaScript regex pattern\nconst regex = `/\\${pattern}/g`;\n```\n\n```js\n// ✅ - Normal variable interpolation still works\nconst name = 'Alice';\nconst greeting = `Hello ${name}, use \\${variable} for templates`;\n// → \"Hello Alice, use ${variable} for templates\"\n```\n","docs/rules/consistent-tuple-labels.md":"# consistent-tuple-labels\n\n📝 Enforce consistent labels on tuple type elements.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\n[Labeled tuple elements](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#labeled-tuple-elements) document what each position in a tuple means. Labeling only some of the elements is inconsistent: the unlabeled positions read as an oversight, and the tuple is harder to scan than one that is either fully labeled or fully unlabeled.\n\nThis rule requires that, when at least one element of a tuple type is labeled, every element is labeled. A tuple with no labels at all is left alone.\n\nA rest element counts as labeled when its label is present (`...rest: number[]`), so a fully labeled tuple that ends with a labeled rest element is not reported.\n\nThere is no autofix, since a meaningful label cannot be inferred.\n\n## Examples\n\n```ts\n// ❌\ntype Point = [x: number, number];\n\n// ✅\ntype Point = [x: number, y: number];\n```\n\n```ts\n// ✅\ntype Point = [number, number];\n```\n\n```ts\n// ❌\ntype Route = [name: string, ...string[]];\n\n// ✅\ntype Route = [name: string, ...segments: string[]];\n```\n","docs/rules/custom-error-definition.md":"# custom-error-definition\n\n📝 Enforce correct `Error` subclassing.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent way of defining `Error` subclasses. It works with superclasses whose names match the rule's `*Error` naming pattern.\n\nTypeScript abstract classes are ignored. Concrete subclasses are still checked.\n\nFor native error bases that accept `ErrorOptions` as their second argument, constructors with regular parameters must accept a non-rest `options` parameter in any position and pass it second to `super()`. Rest-only constructors are exempt from this check. A constructor with a fixed message can instead pass `{cause}` inline, and a constructor with an `options` parameter can forward only its cause with `{cause: options.cause}`. `AggregateError` and `SuppressedError` use different signatures, and custom bases may too, so they are exempt.\n\n```js\nclass ApiError extends Error {\n\tconstructor(status, message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'ApiError';\n\t\tthis.status = status;\n\t}\n}\n\nclass HttpError extends Error {\n\tconstructor(response, request, options) {\n\t\tsuper(`Request failed: ${request.method} ${request.url}`, options);\n\t\tthis.name = 'HttpError';\n\t\tthis.response = response;\n\t\tthis.request = request;\n\t}\n}\n```\n\n```js\n// ✅\nclass UserNotFoundError extends GraphQLError {\n\tconstructor(userId) {\n\t\tsuper(`User \"${userId}\" does not exist`, {extensions: {code: 'NOT_FOUND'}});\n\t\tthis.name = 'UserNotFoundError';\n\t}\n}\n```\n\n## Examples\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// The `this.message` assignment is useless as it's already set via the `super()` call.\n\t\tthis.message = message;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(undefined, options);\n\t\t// Pass the error message to `super()` instead of setting `this.message`.\n\t\tthis.message = message;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// No `name` property set. The name property is needed so the\n\t\t// error shows up as `[CustomError: foo]` and not `[Error: foo]`.\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// Use a string literal to set the `name` property as it will not change after minifying.\n\t\tthis.name = this.constructor.name;\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// The `name` property should be set to the class name.\n\t\tthis.name = 'MyError';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ❌\n// The class name should be capitalized and end with `Error`.\nclass foo extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'foo';\n\t}\n}\n\n// ✅\nclass FooError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'FooError';\n\t}\n}\n```\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, details) {\n\t\tsuper(message);\n\t\tthis.details = details;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.details = options?.details;\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends Error {\n\tconstructor() {\n\t\tsuper('My custom error');\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\n// The message is hard-coded and the error options are passed to `super()` inline, so no `options` parameter is needed.\nclass CustomError extends Error {\n\tconstructor(cause) {\n\t\tsuper('My custom error', {cause});\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends TypeError {\n\tconstructor() {\n\t\tsuper();\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends Error {\n\tname = 'CustomError';\n}\n```\n\nWhen defining a custom `message` accessor, don't pass the message to `super()` as it would shadow the accessor with an own `message` property. Store the message somewhere else instead.\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'CustomError';\n\t}\n\n\tget message() {\n\t\treturn 'Custom message';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\t#message;\n\n\tconstructor(message, options) {\n\t\tsuper(undefined, options);\n\t\tthis.#message = message;\n\t\tthis.name = 'CustomError';\n\t}\n\n\tget message() {\n\t\treturn this.#message;\n\t}\n}\n```\n","docs/rules/default-export-style.md":"# default-export-style\n\n📝 Enforce consistent default export declarations.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce whether default-exported functions and classes are declared inline with `export default` or separately. For functions, separate means a `const` arrow function exported by identifier. For classes, separate means a class declaration exported by identifier.\n\nA consistent declaration style makes default exports easier to scan and avoids mixing multiple declaration forms across a codebase.\n\nThis rule controls whether local default exports are written inline or separately. Named exports are intentionally ignored. Use [`consistent-function-style`](./consistent-function-style.md) for function syntax, including direct default-exported functions through its `defaultExport` option.\n\nUse [`no-anonymous-default-export`](./no-anonymous-default-export.md) to require names for anonymous default exports.\n\n## Examples\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"inline\"}]\n\n// ❌\nconst foo = () => {};\nexport default foo;\n\n// ✅\nexport default function foo() {}\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"separate\"}]\n\n// ❌\nexport default function foo() {}\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"ignore\"}]\n\n// ✅\nexport default function foo() {}\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"inline\"}]\n\n// ❌\nclass Foo {}\nexport default Foo;\n\n// ✅\nexport default class Foo {}\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"separate\"}]\n\n// ❌\nexport default class Foo {}\n\n// ✅\nclass Foo {}\nexport default Foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"ignore\"}]\n\n// ✅\nexport default class Foo {}\n\n// ✅\nclass Foo {}\nexport default Foo;\n```\n\n## Options\n\nType: `object`\n\nDefault:\n\n```js\n{\n\tfunctions: 'inline',\n\tclasses: 'inline',\n}\n```\n\n### `functions`\n\nAllowed values: `'inline'`, `'separate'`, `'ignore'`\n\n`'inline'` requires named default-exported functions to be declared inline:\n\n```js\nexport default function foo() {}\n```\n\n`'separate'` requires named default-exported functions to use a separate `const` arrow function declaration:\n\n```js\nconst foo = () => {};\nexport default foo;\n```\n\n`'ignore'` disables checks for functions.\n\n> [!NOTE]\n> When both rules are enabled, configure compatible styles. For example, `functions: 'inline'` pairs with `defaultExport: 'declaration'`, while `functions: 'separate'` pairs with `defaultExport: 'ignore'` when `namedFunctions` permits the separate `const` arrow function. The `defaultExport` option does not inspect `export default identifier`.\n\n### `classes`\n\nAllowed values: `'inline'`, `'separate'`, `'ignore'`\n\n`'inline'` requires named default-exported classes to be declared inline:\n\n```js\nexport default class Foo {}\n```\n\n`'separate'` requires named default-exported classes to use a separate class declaration:\n\n```js\nclass Foo {}\nexport default Foo;\n```\n\n`'ignore'` disables checks for classes.\n\n## Limitations\n\nThis rule intentionally ignores named exports, re-exports, CommonJS, anonymous defaults, non-adjacent declaration/export pairs, imported identifiers, values, objects, arrays, function expressions, `let`/`var` functions, multiple variable declarators, generators, later reassigned bindings, and TypeScript-specific syntax.\n","docs/rules/dom-node-dataset.md":"# dom-node-dataset\n\n📝 Enforce consistent style for DOM element dataset access.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUse [`.dataset`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset) on DOM elements over `getAttribute(…)`, `.setAttribute(…)`, `.removeAttribute(…)` and `.hasAttribute(…)`.\n\nThe `dataset` API maps `data-*` attributes to properties, avoiding repeated attribute-name strings and keeping reads and writes consistent.\n\nFor a missing attribute, `getAttribute(…)` returns `null`, but `.dataset` returns `undefined`. So reads are only offered as a suggestion, in both directions.\n\n## Examples\n\n```js\n// ❌\nconst unicorn = element.getAttribute('data-unicorn');\n\n// ✅\nconst {unicorn} = element.dataset;\n```\n\n```js\n// ❌\nelement.setAttribute('data-unicorn', '🦄');\n\n// ✅\nelement.dataset.unicorn = '🦄';\n```\n\n```js\n// ❌\nelement.removeAttribute('data-unicorn');\n\n// ✅\ndelete element.dataset.unicorn;\n```\n\n```js\n// ❌\nconst hasUnicorn = element.hasAttribute('data-unicorn');\n\n// ✅\nconst hasUnicorn = Object.hasOwn(element.dataset, 'unicorn');\n```\n\n```js\n// ✅\nconst foo = element.getAttribute('foo');\n```\n\n```js\n// ✅\nelement.setAttribute('not-dataset', '🦄');\n```\n\n```js\n// ✅\nelement.removeAttribute('not-dataset');\n```\n\n```js\n// ✅\nconst hasFoo = element.hasAttribute('foo');\n```\n\n## Options\n\n### preferAttributes\n\nType: `boolean`\\\nDefault: `false`\n\nWhen `true`, enforces the opposite direction: prefer `getAttribute(…)` / `setAttribute(…)` / `removeAttribute(…)` / `hasAttribute(…)` over named `.dataset` access — covering reads, writes, `delete`, simple destructuring, existence checks (`in`, `Object.hasOwn`, `.hasOwnProperty()`), and assigning `.dataset` to a variable (`const data = element.dataset`, which hides the attribute access from a search). Direct whole-object reads (`foo(element.dataset)`) and inherited members (`element.dataset.toString`) are not flagged. This can be useful for greppability when data attributes are also referenced in CSS/HTML.\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nconst unicorn = element.dataset.unicorn;\n\n// ✅\nconst unicorn = element.getAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nelement.dataset.unicorn = '🦄';\n\n// ✅\nelement.setAttribute('data-unicorn', '🦄');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\ndelete element.dataset.unicorn;\n\n// ✅\nelement.removeAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\n'unicorn' in element.dataset;\n\n// ✅\nelement.hasAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nconst data = element.dataset;\nconsole.log(data.unicorn);\n\n// ✅\nconsole.log(element.getAttribute('data-unicorn'));\n```\n","docs/rules/empty-brace-spaces.md":"# empty-brace-spaces\n\n📝 Enforce no spaces between braces.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEmpty blocks and object literals do not need internal whitespace, so this rule enforces a compact, consistent style. It also checks objects and arrays in JSON, JSONC, JSON5, and SOML, blocks in CSS, flow mappings and sequences in YAML, and inline tables and arrays in TOML. Braces and brackets containing comments are left unchanged.\n\n## Examples\n\n```js\n// ❌\nclass Unicorn {\n}\n\n// ✅\nclass Unicorn {}\n```\n\n```js\n// ❌\ntry {\n\tfoo();\n} catch { }\n\n// ✅\ntry {\n\tfoo();\n} catch {}\n```\n","docs/rules/error-message.md":"# error-message\n\n📝 Enforce passing a `message` value when creating a built-in error.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces a `message` value to be passed in when creating an instance of a built-in [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, which leads to more readable and debuggable code.\n\n## Examples\n\n```js\n// ❌\nthrow new Error();\n\n// ❌\nthrow new Error('');\n\n// ✅\nthrow new Error('Unexpected property.');\n```\n\n```js\n// ❌\nthrow new TypeError();\n\n// ✅\nthrow new TypeError('Array expected.');\n```\n\n```js\n// ❌\nconst error = new AggregateError(errors);\n\n// ✅\nconst error = new AggregateError(errors, 'Promises rejected.');\n```\n\n```js\n// ❌\nconst error = new SuppressedError(error, suppressed);\n\n// ✅\nconst error = new SuppressedError(error, suppressed, 'This is a suppressed error.');\n```\n","docs/rules/escape-case.md":"# escape-case\n\n📝 Require escape sequences to use uppercase or lowercase values.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent escaped value style by defining escape sequence values with uppercase or lowercase characters. The default style is uppercase, which promotes readability by making the escaped value more distinguishable from the identifier.\n\nTagged template literals are ignored because tag functions can observe the raw escape sequences.\n\nIn SOML, the configured case is ignored because Unicode escapes must use lowercase hexadecimal digits. Literal strings and keys are skipped.\n\nIn TOML, it checks basic strings and quoted keys, including multiline strings. It preserves `\\u` and `\\U` prefixes and also normalizes parser-tolerated `\\x` escapes, which TOML 1.0 does not define. Literal strings and keys are skipped.\n\nIn JSON, JSONC, and JSON5, it checks strings and quoted keys, including JSON5 hexadecimal escapes. In YAML, it checks hexadecimal and Unicode escapes in double-quoted scalars. In CSS, it checks one- to six-digit hexadecimal escapes in identifiers, strings, and URLs, preserving escape-terminating whitespace and skipping comments.\n\n## Examples\n\n```js\n// ❌\nconst foo = '\\xa9';\n\n// ✅\nconst foo = '\\xA9';\n```\n\n```js\n// ❌\nconst foo = '\\ud834';\n\n// ✅\nconst foo = '\\uD834';\n```\n\n```js\n// ❌\nconst foo = '\\u{1d306}';\n\n// ✅\nconst foo = '\\u{1D306}';\n```\n\n```js\n// ❌\nconst foo = '\\ca';\n\n// ✅\nconst foo = '\\cA';\n```\n\n## Options\n\nType: `string`\\\nDefault: `'uppercase'`\n\n- `'uppercase'` (default)\n  - Always use escape sequence values with uppercase characters.\n- `'lowercase'`\n  - Always use escape sequence values with lowercase characters.\n\nExample:\n\n```js\n{\n\t'unicorn/escape-case': ['error', 'lowercase']\n}\n```\n\n```js\n// ❌\nconst foo = '\\xA9';\n\n// ✅\nconst foo = '\\xa9';\n```\n\n```js\n// ❌\nconst foo = '\\uD834';\n\n// ✅\nconst foo = '\\ud834';\n```\n\n```js\n// ❌\nconst foo = '\\u{1D306}';\n\n// ✅\nconst foo = '\\u{1d306}';\n```\n\n```js\n// ❌\nconst foo = '\\cA';\n\n// ✅\nconst foo = '\\ca';\n```\n","docs/rules/expiring-todo-comments.md":"# expiring-todo-comments\n\n📝 Add expiration conditions to TODO comments.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule makes it possible to pass arguments to TODO, FIXME and XXX comments to trigger ESLint to report.\n\nFrom [ESLint's documentation](https://eslint.org/docs/latest/rules/no-warning-comments):\n\n> Developers often add comments to code which is not complete or needs review.\n\nTODO comments are useful when a piece of code needs some work. Unfortunately these can be easily forgotten as it's common to forget to track them, leaving dangling tasks to be found at later random moments, or never at all.\n\nWith this rule, a TODO can have a condition right from the beginning to define its lifespan. When the condition is met, ESLint will take care of reporting that there's work to be done.\n\nThis rule will ignore all TODOs without conditions. For more information, read the below [`eslint/no-warning-comments`](#disallow-warning-comments-no-warning-comments) section.\n\nThis rule also supports CSS comments when linting with [`@eslint/css`](https://github.com/eslint/css), HTML comments when linting with [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint), JSONC/JSON5 comments when linting with [`@eslint/json`](https://github.com/eslint/json), HTML comments in Markdown when linting with [`@eslint/markdown`](https://github.com/eslint/markdown), SOML `#` and block comments when linting with [`eslint-soml`](https://github.com/soml-lang/eslint-soml), TOML `#` comments when linting with [`eslint-plugin-toml`](https://github.com/ota-meshi/eslint-plugin-toml), and YAML `#` comments when linting with [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml).\n\nQuick overview of conditions:\n\n- Expire after a **specific date**.\n- Expire when **your package** (package.json) reaches a specific **version**.\n- Expire when a package.json **`engines`** property reaches a specific **version**.\n- Expire when you **install/uninstall** a specific **package**.\n- Expire when a **package** reaches a specific **version**.\n- Expire when a **peer dependency**'s minimum supported **version** reaches a specific **version**.\n\n## Conditions\n\n### Expiry Date\n\nUsing a date as condition, a TODO will only work as long as this date is not met. This is especially useful when you either know when the action should take place or simply want to set boundaries for yourself.\n\nDate expiry checks are disabled by default. Set [`checkDates`](#checkdates) to `true` to enable them.\n\n```js\n// TODO [2019-11-15]: Refactor this code before the sprint ends.\n// TODO (@lubien) [2019-07-18]: When John delivers his code. I can reuse it.\n// TODO [2019-08-10]: I must refactor this for sure before I deliver.\n```\n\nDates are in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601#Dates) and use [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) as timezone.\n\nMultiple dates on the same TODO are not valid and will be reported. There's no point in having two dates as the closest one will always be the one that is reported.\n\n### Package Version\n\nIf you're working on an npm package, you should have a root level package.json with a [`version`](https://docs.npmjs.com/files/package.json#version) field as specified by npm. This condition takes place under this value.\n\nBy assigning a condition to compare a package.json `version`, the TODO will report as soon as the condition is met. It's really useful when the work is related to the version of the package itself such as deprecated APIs.\n\n```js\n// TODO [>=1.0.0]: I should work around this when we reach v1.\n// TODO (@lubien) [>0]: For now this is fine but for a stable version we must refactor.\n// FIXME [>10]: This feature is deprecated and should be removed from the next major version.\n```\n\nMultiple package versions on the same TODO are not valid and will be reported. Just like dates, multiple versions will make no sense as the closest one will be the one to trigger the report.\n\n### Engine Version\n\nIn package.json, you can specify an [`\"engines\"` field](https://docs.npmjs.com/files/package.json#engines) with the Node.js (`node`) versions that your package supports.\n\nWith that in mind, this condition is triggered as soon as package.json's `node` engine reaches the target version. This is particularly useful for maintainers that strive for compatibility but have plans for the future when some feature will be widely available and when support for older versions could be dropped.\n\nImagine you want to use `async`/`await` but for now you support Node.js versions that don't have it. Maybe you're eager to use `import` and `export` but for now you have to support CommonJS?\n\n```js\n// TODO [engine:node@>=8]: We can use async/await now.\n// FIXME [engine:node@>=20.0.0]: Hey, node can use import/export now, we should refactor.\n```\n\nArgument versions should be [semver](https://semver.org/) compatible such as: `1.2.45`, `5.3`, `1`.\n\nOnly the `node` engine is supported by this condition.\n\nSupported comparisons are `>` and `>=`. Comparison must have a `@` before such as `@>` and `@>=`.\n\n### Dependency Presence\n\nAs a Node.js developer, you probably already know about package.json [dependencies](https://docs.npmjs.com/files/package.json#dependencies) and [devDependencies](https://docs.npmjs.com/files/package.json#devdependencies). This condition works based on the presence or absence of dependencies in both fields.\n\nYou may use `+` to trigger when a dependency is added and `-` when a dependency is removed.\n\n```js\n// TODO [-vue-function-api]: When we remove `vue-function-api` we should refactor this.\n// FIXME [+read-pkg]: If we use this package we don't need to use this function below.\n// XXX @lubien [+react, -jquery]: We can use React for this widget instead of jQuery.\n```\n\nSuch conditions are really useful when the code depends upon changes in dependencies that are known to be happening such as `vue-function-api` that will eventually be part of `vue` itself.\n\n### Dependency Version\n\nAnother way to make conditions based on dependencies is to look at versions. This is useful when developers know that changes in future versions of dependencies will impact their code.\n\n```js\n// TODO [vue@>=3]: Refactor to function API when it's stable.\n// FIXME [cerebro@>0.10.0]: This is a quickfix until cerebro fixes this.\n// XXX [popura@>=2.0.0]: This API is deprecated so we should not use it by then.\n```\n\nArgument versions should be [semver](https://semver.org/) compatible such as: `1.2.45`, `5.3`, `1`.\n\nSupported comparisons are `>` and `>=`. Comparison must have a `@` before such as `@>` and `@>=`.\n\n[Package manager catalogs](https://pnpm.io/catalogs) (`catalog:` version references in `package.json`) are not resolved; dependency and peer dependency version checks that use them are reported as unsupported.\n\n### Peer Dependency Version\n\nIf your package declares [`peerDependencies`](https://docs.npmjs.com/cli/configuring-npm/package-json#peerdependencies), you can make conditions based on the **minimum supported version** of a peer dependency. This is useful when you want a TODO to trigger once you bump the lowest version you support, for example to drop a fallback for a deprecated API.\n\n```js\n// TODO [peer:eslint@>=9]: Drop the `CLIEngine` fallback once we require ESLint 9.\n```\n\nThe peer dependency value is a version range (such as `>=8`, `^8 || ^9`), so the comparison is made against the **floor** of that range. For example, with `\"eslint\": \"^8 || ^9\"` the minimum supported version is `8`, so `[peer:eslint@>=9]` will **not** trigger; it triggers only once the floor reaches `9`.\n\nThis condition is separate from the [Dependency Version](#dependency-version) condition, which only checks `dependencies` and `devDependencies`. Use `peer:` when the same package can appear in both with independent versions.\n\nArgument versions should be [semver](https://semver.org/) compatible such as: `1.2.45`, `5.3`, `1`.\n\nSupported comparisons are `>` and `>=`. Comparison must have a `@` before such as `@>` and `@>=`.\n\n### Pre-releases\n\nTODO comments with rules for package.json and dependency versions support the semver pre-release format, such as `1.0.0-my.pre.release.1.2.3`. This means that if your TODO asks for version `>=1.0.0` and you're in `1.0.0-beta`, your TODO will **not** trigger as a pre-release comes first. When the version is at least `1.0.0`, it will properly trigger.\n\nKeep in mind that pre-releases compare by number and alphabetical order. Example: `1.0.0-alpha` < `1.0.0-alpha.1` < `1.0.0-alpha.beta` < `1.0.0-beta` < `1.0.0-beta.2` < `1.0.0-beta.11` < `1.0.0-rc.1` < `1.0.0`.\n\nYou can read more about the semver pre-release format [here](https://semver.org/#spec-item-9) and semver precedence rules [here](https://semver.org/#spec-item-11).\n\n### Combinations\n\nAny combination of rules is possible as long as you separate them by commas. Each condition **triggers an individual report.**\n\n```js\n// TODO [+react, -jquery]: We can use React for this widget instead of jQuery.\n// TODO [2019-07-15, +react]: Refactor this if we install React or if we reach that date.\n// TODO [-vue-function-api, vue@>=3]: Now we should use Vue native function API.\n```\n\n### Block Comments\n\nYou can also use block comments to specify TODOs with conditions. Each line can have its own set of conditions. This is especially useful when you aim for more details.\n\n```js\n/*\n * We should really make this code better.\n * When we support Node.js 12 we can refactor imports.\n * And we also can do [x], [y], [z].\n * TODO [engine:node@>=12]: Use import/export.\n */\n\n/*\n * This code would be so easy if we used `popura` package helpers.\n * When you can, install `popura`, use it and remove dead code.\n * TODO [+popura]: Refactor to use `popura`.\n *\n * You can also use `popura-cli` since we want help on [feature].\n * TODO [+popura-cli]: Document how to use `popura-cli`.\n */\n```\n\n### CSS\n\nWhen used with [`@eslint/css`](https://github.com/eslint/css), this rule can check CSS block comments too.\n\n```css\n/* TODO [2019-11-15]: Remove this fallback. */\n.outdated {\n\tcolor: hotpink;\n}\n```\n\n### HTML\n\nWhen used with [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint), this rule can check HTML comments too.\n\n```html\n<!-- TODO [2019-11-15]: Remove this fallback. -->\n<div class=\"outdated\"></div>\n```\n\n### JSONC / JSON5\n\nWhen used with [`@eslint/json`](https://github.com/eslint/json), this rule can check line comments in `.jsonc` and `.json5` files too.\n\n```jsonc\n// TODO [2019-11-15]: Update this configuration.\n{\n\t\"key\": \"value\"\n}\n```\n\n### Markdown\n\nWhen used with [`@eslint/markdown`](https://github.com/eslint/markdown), this rule can check HTML comments in Markdown files too.\n\n```md\n<!-- TODO [2019-11-15]: Update this section. -->\n\n# Heading\n```\n\n### YAML\n\nWhen used with [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml), this rule can check comments in YAML files too.\n\n```yaml\n# TODO [2019-11-15]: Update this configuration.\nkey: value\n```\n\n## Disallow Warning Comments (no-warning-comments)\n\nThis rule implements [`eslint/no-warning-comments`](https://eslint.org/docs/rules/no-warning-comments).\n\nThe sole difference is that first we check for **valid conditions** to apply this rule. If no valid conditions are met, we fall back to `eslint/no-warning-comments` if [`allowWarningComments`](#allowwarningcomments) is set to `false` (default `true`) and you'll see something like `Unexpected 'todo': 'TODO: …'.`\n\nThe reason behind this is that now that you have a powerful rule to make sure there are no stray TODOs on your code, you should strive for best practices. Don't just add TODO comments and leave them forever. Define conditions to justify the presence of warning comments.\n\nWith that in mind, you **could** disable that ESLint rule in favor of this one as you will get its same behavior and more.\n\nSince by default the option `allowWarningComments` is `true`, both rules can coexist even with different reporting levels. For example, one might want to error when conditions are met, but just warn on TODOs without conditions (See [`allowWarningComments`](#allowwarningcomments) below).\n\n## Legacy Branches\n\nAlthough this rule works just fine when you maintain a `main` branch, it gets trickier when you have legacy branches that happen to have unclosed TODOs.\n\nImagine you maintain a `main` branch at a version such as 10 and always keep working on it and also keep fixing your TODOs. But your package happens to **publish and support** legacy branches such as 8 and 9 for [long term support](https://en.wikipedia.org/wiki/Long-term_support) with code such as security patches, meaning you might have stray TODOs that won't get fixed and will cause your build to break unless you either fix or drop the TODO.\n\n## Conditions Overview\n\n- `[YYYY-MM-DD]` to define a [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) due date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Dates) format.\n- `[>1]` or `[>=2]` to expire at some version (from package.json). No whitespace.\n- `[+package]` or `[-package]` to expire when you add/remove a package.\n- `[package@>1]` or `[package@>=2]` to expire when a package hits some version. No whitespace.\n- `[peer:eslint@>9]` or `[peer:eslint@>=9]` to expire when a peer dependency's minimum supported version reaches some version. No whitespace.\n- `[engine:node@>8]` or `[engine:node@>=8]` to expire when the package bumps to the supported engines. No whitespace.\n\n## Overall Information\n\n- Multiple conditions can be separated by comma:\n  `[YYYY-MM-DD, +foo-package, engine:node@>=8, bar-package@>=2]`.\n- You cannot stack multiple dates or multiple versions of\n  your package on the same TODO.\n- You can use either `TODO`, `FIXME`, or `XXX`. You can change\n  these using options. (See [options.terms](#terms)).\n- TODOs may have any string before arguments. Really useful\n  when you want to highlight more information such as author name\n  like `TODO (lubien) [2019-05-30]` or `TODO @lubien [2019-05-30]`.\n- TODOs may or may not have a colon before the message such as\n  `TODO [...]: message` or `TODO [...] message`.\n- If no proper argument is found, you'll be notified that the TODO is useless (See [`eslint/no-warning-comments`](#disallow-warning-comments-no-warning-comments)).\n- CSS, HTML, JSONC, JSON5, Markdown, SOML, TOML, and YAML comments are supported with their respective ESLint plugins.\n\n## Examples\n\n```js\n// ❌\n// With `checkDates: true`\n// TODO [2000-01-01]: I'll fix this next week.\n// TODO [2000-01-01, 2001-01-01]: Multiple dates won't work.\n\n// TODO [>1]: If your package.json version is > 1.\n// TODO [>=1]: If your package.json version is >= 1.\n// TODO [>1, >2]: Multiple package versions won't work.\n\n// TODO [+already-have-pkg]: Since we already have it, this reports.\n// TODO [-we-dont-have-this-package]: Since we don't have, trigger a report.\n\n// TODO [read-pkg@>1]: When `read-pkg` version is > 1 don't forget to do this.\n// TODO [read-pkg@>=5.1.1]: When `read-pkg` version is >= 5.1.1 don't forget to do that.\n\n// TODO [peer:eslint@>=8]: Whoops, our minimum supported `eslint` is already >= 8.\n\n// TODO [engine:node@>=8]: Whoops, we are already supporting it!\n\n// TODO: Add unicorns.\n```\n\n```js\n// ✅\n// TODO [2200-12-25]: Too long... Can you feel it?\n// FIXME [2200-12-25]: Too long... Can you feel it?\n\n// TODO (lubien) [2200-12-12]: You can add something before the arguments.\n// TODO @lubien [2200-12-12]: You can add something before the arguments.\n// FIXME [2200-12-25] (lubien): You can add something after the arguments, before the colon.\n// TODO [2200-12-12] No colon after argument.\n\n// TODO [+react]: Refactor this when we use React.\n// TODO [-lodash]: If we remove lodash we need to change this.\n\n// TODO [lodash@>10]: Lodash has a new way to do this; when we bump to its version let's use it.\n// TODO [lodash@>=10]: Lodash has a new way to do this; when we bump to its version let's use it.\n\n// TODO [2200-12-25, +popura, lodash@>10]: Combo.\n\n// TODO [peer:eslint@>=99]: When our minimum supported `eslint` reaches v99.\n\n// TODO [engine:node@>12]: When we bump to this Node version we can use import/export.\n\n/*\n * TODO [2200-12-25]: Yet\n * TODO [2200-12-25]: Another\n * TODO [2200-12-25]: Way\n */\n```\n\n## Options\n\n### checkDates\n\nType: `boolean`\\\nDefault: `false`\n\nWhether to check expiration dates.\n\nThis option does not disable date argument validation. For example, TODO comments with multiple dates are still reported as invalid.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: false,\n\t},\n]\n```\n\n### checkDatesOnPullRequests\n\nType: `boolean`\\\nDefault: `false`\n\nWhether to check expiration dates on pull requests.\n\nSometimes developers may send [Pull Requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) at a time when TODO expiry dates are triggered. This means that their code would fail to pass linting, causing a false-positive.\n\nWhen date checks are enabled, this rule will not trigger expiry dates while on Pull Requests by default so that the one responsible for the fix will be the maintainer not the contributor.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: true,\n\t\tcheckDatesOnPullRequests: true,\n\t},\n]\n```\n\n### terms\n\nType: `string[]`\\\nDefault: `['todo', 'fixme', 'xxx']`\n\nAdd or remove TODO verbs.\n\nThe defaults come from the [`eslint/no-warning-comments` rule](https://eslint.org/docs/rules/no-warning-comments#options).\n\nIf you just want to add a verb, make sure to explicitly include the default ones like `['todo', 'fixme', 'xxx', 'mytodo']` or otherwise any default TODO verb will be ignored. Similarly, when you want to remove a verb, leave the others in like `['todo', 'fixme']`.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tterms: [\n\t\t\t'todo',\n\t\t\t'fixme',\n\t\t\t'xxx',\n\t\t],\n\t},\n]\n```\n\n### allowWarningComments\n\nType: `boolean`\\\nDefault: `true`\n\nIgnore TODOs without conditions.\n\nAs mentioned before, the [`eslint/no-warning-comments` rule](#disallow-warning-comments-no-warning-comments) will be triggered when there are no valid conditions on a TODO comment.\n\nThis is helpful if you want to use **both** this rule and the [`eslint/no-warning-comments` rule](#disallow-warning-comments-no-warning-comments), **but want different warning levels**, as it's not possible to set multiple warning levels on the same rule.\n\nIf you want this rule to trigger on stray TODO conditions, you can enable this fallback rule with this option.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tallowWarningComments: false,\n\t},\n]\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nIgnore TODOs matching any of the given regex patterns. This option is only useful if you have `allowWarningComments` set to `false`.\n\nWhen a string is given, it will be interpreted as a regular expression inside of a string.\n\nDon't forget that you must escape special characters in string regexes. If you want to ignore numbers with `\\d` for example, to match `#\\d`, you must use `/#\\d/` or `'#\\\\d'`.\n\nAs an example of this option, if you want this rule to **completely ignore** comments containing references to GitHub issues, you can do so by ignoring `\"#\\\\d+\"`:\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tallowWarningComments: false,\n\t\tignore: [\n\t\t\t'#\\\\d+',\n\t\t\t/issue-\\d+/i,\n\t\t],\n\t},\n]\n```\n\n### date\n\nType: `string` (`date` format)\\\nDefault: `<today>`\n\nFor TODOs with date deadlines, this option makes them trigger only if the deadline is later than the specified date. You could set this to a date in the future to find TODOs that expire soon, or set it far in the past if you want to ignore recently-expired TODOs.\n\nThe format must match [json-schema's date](https://json-schema.org/understanding-json-schema/reference/string.html#dates-and-times).\n\n### examples\n\nFind tech debt that has grown up and gone to college by triggering the rule only for incredibly old TODOs:\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: true,\n\t\tdate: '2000-01-01',\n\t},\n]\n```\n\nPrepare for the future by triggering the rule on known Y3K bugs:\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: true,\n\t\tdate: '3000-01-01',\n\t},\n]\n```\n","docs/rules/explicit-length-check.md":"# explicit-length-check\n\n📝 Enforce explicitly comparing the `length` or `size` property of a value.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nExplicit comparisons make empty and non-empty intent clear instead of relying on the truthiness of a numeric property.\n\nThis rule is fixable, unless it's [unsafe to fix](#unsafe-to-fix-case).\n\nIn Vue templates, checks inside event handler statement bodies or block statements are reported without fixes or suggestions.\n\n## Zero comparisons\n\nEnforce comparison with `=== 0` when checking for zero length.\n\n### Examples\n\n```js\n// ❌\nconst isEmpty = !foo.length;\n\n// ❌\nconst isEmpty = foo.length == 0;\n\n// ❌\nconst isEmpty = foo.length < 1;\n\n// ❌\nconst isEmpty = foo.length <= 0;\n\n// ❌\nconst isEmpty = 0 === foo.length;\n\n// ❌\nconst isEmpty = 0 == foo.length;\n\n// ❌\nconst isEmpty = 1 > foo.length;\n\n// ❌\n// Negative style is disallowed too\nconst isEmpty = !(foo.length > 0);\n\n// ✅\nconst isEmpty = foo.length === 0;\n```\n\n```js\n// ❌\nconst isEmptySet = !foo.size;\n\n// ✅\nconst isEmptySet = foo.size === 0;\n```\n\n```vue\n<template>\n\t<!-- ❌ -->\n\t<div v-if=\"!foo.length\">Vue</div>\n\n\t<!-- ✅ -->\n\t<div v-if=\"foo.length === 0\">Vue</div>\n</template>\n```\n\n## Non-zero comparisons\n\nEnforce comparison with `> 0` when checking for non-zero length.\n\n### Examples\n\n```js\n// ❌\nconst isNotEmpty = foo.length !== 0;\n\n// ❌\nconst isNotEmpty = foo.length != 0;\n\n// ❌\nconst isNotEmpty = foo.length >= 1;\n\n// ❌\nconst isNotEmpty = 0 !== foo.length;\n\n// ❌\nconst isNotEmpty = 0 != foo.length;\n\n// ❌\nconst isNotEmpty = 0 < foo.length;\n\n// ❌\nconst isNotEmpty = 1 <= foo.length;\n\n// ❌\nconst isNotEmpty = Boolean(foo.length);\n\n// ❌\n// Negative style is disallowed too\nconst isNotEmpty = !(foo.length === 0);\n\n// ✅\nconst isNotEmpty = foo.length > 0;\n```\n\n```js\n// ❌\nif (foo.length || bar.length) {}\n\n// ✅\nif (foo.length > 0 || bar.length > 0) {}\n```\n\n```js\n// ❌\nconst unicorn = foo.length ? 1 : 2;\n\n// ✅\nconst unicorn = foo.length > 0 ? 1 : 2;\n```\n\n```js\n// ❌\nwhile (foo.length) {}\n\n// ✅\nwhile (foo.length > 0) {}\n```\n\n```js\n// ❌\ndo {} while (foo.length);\n\n// ✅\ndo {} while (foo.length > 0);\n```\n\n```js\n// ❌\nfor (; foo.length; ) {};\n\n// ✅\nfor (; foo.length > 0; ) {};\n```\n\n### Options\n\nYou can define your preferred way of checking non-zero length by providing a `non-zero` option (`greater-than` by default):\n\n```js\n{\n\t'unicorn/explicit-length-check': [\n\t\t'error',\n\t\t{\n\t\t\t'non-zero': 'not-equal'\n\t\t}\n\t]\n}\n```\n\nThe `non-zero` option can be configured with one of the following:\n\n- `greater-than` (default)\n  - Enforces non-zero to be checked with: `foo.length > 0`\n- `not-equal`\n  - Enforces non-zero to be checked with: `foo.length !== 0`\n\nThis rule does not support Yoda-style comparisons like `0 < foo.length`. If you use [`eslint/yoda`](https://eslint.org/docs/latest/rules/yoda), configure it to allow non-Yoda style for relational comparisons.\n\n## Unsafe to fix case\n\n`.length` check inside some expressions are not safe to fix.\n\nExample:\n\n```js\nconst bothNotEmpty = (a, b) => a.length && b.length;\n\nif (bothNotEmpty(foo, bar)) {}\n```\n\nIn this case, the `bothNotEmpty` function returns a `number`, but it will most likely be used as a `boolean`. The rule will still report this as an error, but without an auto-fix. You can apply a [suggestion](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions) in your editor, which will fix it to:\n\n```js\nconst bothNotEmpty = (a, b) => a.length > 0 && b.length > 0;\n\nif (bothNotEmpty(foo, bar)) {}\n```\n\n`!foo.length` used as the left side of a comparison is also unsafe to fix due to operator precedence.\n\n```js\n// ❌\nif (!foo.length > 0) {}\n```\n\nThe rule is smart enough to know some `LogicalExpression`s are safe to fix, like when it's inside `if`, `while`, etc.\n","docs/rules/explicit-timer-delay.md":"# explicit-timer-delay\n\n📝 Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen using [`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) or [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval), the `delay` parameter is optional and defaults to `0`. This rule allows you to enforce whether the `delay` argument should always be explicitly provided or omitted when it's `0`.\n\n## Examples\n\n```js\n// ❌\nsetTimeout(() => console.log('Hello'));\n\n// ✅\nsetTimeout(() => console.log('Hello'), 0);\n```\n\n```js\n// ❌\nsetInterval(callback);\n\n// ✅\nsetInterval(callback, 0);\n```\n\n```js\n// ❌\nwindow.setTimeout(() => console.log('Hello'));\n\n// ✅\nwindow.setTimeout(() => console.log('Hello'), 0);\n```\n\n```js\n// ❌\nglobalThis.setInterval(callback);\n\n// ✅\nglobalThis.setInterval(callback, 0);\n```\n\n```js\n// ✅\nsetTimeout(() => console.log('Hello'), 1000);\nsetInterval(callback, 100);\n```\n\n## Options\n\nType: `string`\\\nDefault: `'always'`\n\n- `'always'` (default)\n  - Require explicit `delay` argument for clarity.\n- `'never'`\n  - Disallow explicit `0` delay, prefer implicit default. Non-zero delays are still allowed.\n\n### `'never'`\n\n```js\n{\n\t'unicorn/explicit-timer-delay': ['error', 'never']\n}\n```\n\n```js\n// ❌\nsetTimeout(() => console.log('Hello'), 0);\n\n// ✅\nsetTimeout(() => console.log('Hello'));\n```\n\n```js\n// ❌\nsetInterval(callback, 0);\n\n// ✅\nsetInterval(callback);\n```\n\n```js\n// ❌\nwindow.setTimeout(() => console.log('Hello'), 0);\n\n// ✅\nwindow.setTimeout(() => console.log('Hello'));\n```\n\n```js\n// ❌\nglobalThis.setInterval(callback, 0);\n\n// ✅\nglobalThis.setInterval(callback);\n```\n\n```js\n// ✅\nsetTimeout(() => console.log('Hello'), 1000);\nglobalThis.setInterval(callback, 100);\n```\n","docs/rules/filename-case.md":"# filename-case\n\n📝 Enforce a case style for filenames and directory names.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces filenames and directory names of linted files to use a certain case style and lowercase file extension. The default is `kebabCase`.\n\nConsistent paths make files predictable to find and import, including on case-sensitive filesystems.\n\nBecause this rule only inspects the path, it applies to files of any language, not just JavaScript, as long as they are linted with the matching ESLint language plugin (for example [`@eslint/css`](https://github.com/eslint/css) or [`@eslint/markdown`](https://github.com/eslint/markdown)).\n\nNamed virtual files created by processors are ignored to avoid duplicate reports for one physical file.\n\nDirectory names are checked only when the file is inside the current working directory. Files outside the current working directory only have their filename checked.\n\nConventional lowercase entrypoint filenames `index.js`, `index.mjs`, `index.cjs`, `index.ts`, `index.tsx`, and `index.vue` are intentionally ignored, including when `pascalCase` is selected. Their parent directories are still checked.\n\nCharacters other than `a-z`, `A-Z`, `0-9`, `-`, and `_` are ignored for casing and kept as-is in suggested names.\n\nThe case check ignores path segments starting with `$`, as they are commonly used for route parameters.\n\nSet the `checkDirectories` option to `false` to only check filenames.\n\n## Cases\n\n### `kebabCase`\n\n- `foo-bar.js`\n- `foo-bar.test.js`\n- `foo-bar.test-utils.js`\n\n### `camelCase`\n\n- `fooBar.js`\n- `fooBar.test.js`\n- `fooBar.testUtils.js`\n\n### `camelCaseWithAcronyms`\n\n- `innerHTML.js`\n- `getDOMRangeRect.js`\n- `apiURL.js`\n\nThis case style is still lower camel case. Leading acronyms are lowercased, for example `HTMLParser.js` should be `htmlParser.js`.\n\n### `snakeCase`\n\n- `foo_bar.js`\n- `foo_bar.test.js`\n- `foo_bar.test_utils.js`\n\n### `pascalCase`\n\n- `FooBar.js`\n- `FAQPage.js`\n- `FooBar.Test.js`\n- `FooBar.TestUtils.js`\n\n## Options\n\n### case\n\nType: `'camelCase' | 'camelCaseWithAcronyms' | 'snakeCase' | 'kebabCase' | 'pascalCase'`\n\nYou can set the `case` option like this:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'kebabCase',\n\t},\n]\n```\n\n### cases\n\nType: `{camelCase?: boolean, camelCaseWithAcronyms?: boolean, snakeCase?: boolean, kebabCase?: boolean, pascalCase?: boolean}`\n\nYou can set the `cases` option to allow multiple cases:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcases: {\n\t\t\tcamelCase: true,\n\t\t\tpascalCase: true,\n\t\t},\n\t},\n]\n```\n\nFor React projects, allow both kebab-case and PascalCase:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcases: {\n\t\t\tkebabCase: true,\n\t\t\tpascalCase: true,\n\t\t},\n\t},\n]\n```\n\nTo enforce PascalCase only for TypeScript and TSX files, use ESLint's `files` config:\n\n```js\nimport typescriptEslintParser from '@typescript-eslint/parser';\nimport {defineConfig} from 'eslint/config';\nimport unicorn from 'eslint-plugin-unicorn';\n\nexport default defineConfig([\n\t{\n\t\tplugins: {\n\t\t\tunicorn,\n\t\t},\n\t\trules: {\n\t\t\t'unicorn/filename-case': [\n\t\t\t\t'error',\n\t\t\t\t{\n\t\t\t\t\tcase: 'kebabCase',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\t{\n\t\tfiles: ['**/*.{ts,tsx}'],\n\t\tlanguageOptions: {\n\t\t\tparser: typescriptEslintParser,\n\t\t\tparserOptions: {\n\t\t\t\tecmaFeatures: {\n\t\t\t\t\tjsx: true,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\trules: {\n\t\t\t'unicorn/filename-case': [\n\t\t\t\t'error',\n\t\t\t\t{\n\t\t\t\t\tcase: 'pascalCase',\n\t\t\t\t\tcheckDirectories: false,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]);\n```\n\nThe override disables directory checking because rule options apply to both filenames and directory names.\n\nThe rule intentionally does not detect JSX syntax or React component exports. Non-component files can contain JSX too, like entrypoints, route files, tests, and `index.js`.\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nPath segments to ignore. If any path segment matches, the file is ignored.\n\nWhen a string is given, it's interpreted as a regular expression.\n\nSometimes you may have non-standard filenames or directory names in a project. This option lets you ignore those files or directories.\n\nFor example:\n\n- Vendor packages that are copied into the project.\n- Conventionally named files such as `README.md`.\n- Some tools may require special names for some files.\n- Ignore a directory and everything in it.\n\nDon't forget that you must escape special characters that you don't want to be interpreted as part of the regex, for example, if you have `[` in the actual path segment. For example, to match `[id].js`, use `/^\\[id]\\.js$/` or `'^\\\\[id]\\\\.js$'`.\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'kebabCase',\n\t\tignore: [\n\t\t\t'^FOOBAR\\\\.js$',\n\t\t\t'^vendor$',\n\t\t\t'^(B|b)az',\n\t\t\t'\\\\.SOMETHING\\\\.js$',\n\t\t\t/^fixtures$/i,\n\t\t],\n\t},\n]\n```\n\n### checkDirectories\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to check directory names. Filenames are always checked.\n\n### directoryRoots\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nDirectory roots below which directory names are checked. The matched root and its ancestors are skipped. Strings match exact `/`-separated paths relative to ESLint's current working directory. Regular expressions match the same paths; anchor them to avoid unintended deeper matches. The deepest match is used.\n\nFor example, check PascalCase directory names below multiple source roots:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'pascalCase',\n\t\tdirectoryRoots: [\n\t\t\t'app/javascript',\n\t\t\t/^packages\\/[^/]+\\/src$/u,\n\t\t],\n\t},\n]\n```\n\n### multipleFileExtensions\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to treat additional, `.`-separated parts of a filename as parts of the extension rather than parts of the filename.\n\nNote that the parts of the filename treated as the extension will not have the filename case enforced.\n\nThis only affects filenames. When `checkDirectories` is enabled, directory names are checked as full path segments.\n\nFor example:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'pascalCase',\n\t},\n]\n\n// Results\n✅ FooBar.Test.js\n✅ FooBar.TestUtils.js\n✅ FooBar.testUtils.js\n✅ FooBar.test.js\n✅ FooBar.test-utils.js\n✅ FooBar.test_utils.js\n```\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'pascalCase',\n\t\tmultipleFileExtensions: false,\n\t},\n]\n\n// Results\n✅ FooBar.Test.js\n✅ FooBar.TestUtils.js\n❌ FooBar.testUtils.js\n❌ FooBar.test.js\n❌ FooBar.test-utils.js\n❌ FooBar.test_utils.js\n```\n","docs/rules/id-match.md":"# id-match\n\n📝 Require identifiers to match a specified regular expression.\n\n🚫 Disabled by default.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule is the same as the built-in ESLint [`id-match`](https://eslint.org/docs/latest/rules/id-match) rule, but with an additional `checkNamedSpecifiers` option.\n\nEnforcing an identifier pattern prevents names from drifting from a project's naming convention while keeping that convention configurable.\n\n## Replacement for ESLint `id-match`\n\nThis rule replaces ESLint's built-in `id-match` rule, which Unicorn presets disable when this rule is enabled.\n\n## Examples\n\n```js\n/* eslint unicorn/id-match: [\"error\", \"^[a-z]+$\"] */\n\n// ❌\nconst foo$ = 1;\n\n// ✅\nconst foo = 1;\n```\n\n## CSS and HTML\n\nIn CSS, the rule checks class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media. Dotted layer segments are checked separately. CSS escapes are decoded, and leading `--` is excluded when matching custom-property and custom-media names. Built-in value keywords and `animation` shorthand values are skipped.\n\nIn HTML, it checks `id` and individual `class` names after decoding character references, retaining any leading `--`. Empty or templated values are skipped. Character references make diagnostics span the whole attribute value. JavaScript-only options do not apply to CSS or HTML. Names have no autofix because references elsewhere may need updating.\n\n## Options\n\nThis rule supports the same options as ESLint `id-match`.\n\n### `properties`\n\nSet `properties` to `true` to check object and member property names.\n\n### `classFields`\n\nSet `classFields` to `true` to check class field names.\n\n### `onlyDeclarations`\n\nSet `onlyDeclarations` to `true` to only check declared identifiers.\n\n### `ignoreDestructuring`\n\nSet `ignoreDestructuring` to `true` to ignore identifiers in destructuring patterns.\n\n### `checkNamedSpecifiers`\n\nSet `checkNamedSpecifiers` to `false` to ignore named import specifiers and external named export specifiers:\n\n```js\n/* eslint unicorn/id-match: [\"error\", \"^[a-z]+$\", {\"checkNamedSpecifiers\": false}] */\n\n// ✅\nimport {foo$} from 'module';\n\n// ✅\nexport {foo$} from 'module';\n```\n\nOnly named import specifiers and external named export specifiers are ignored. Default imports, namespace imports, namespace re-exports, local export specifiers, and later references to imported bindings are still checked:\n\n```js\n/* eslint unicorn/id-match: [\"error\", \"^[a-z]+$\", {\"checkNamedSpecifiers\": false}] */\n\n// ❌\nimport foo$ from 'module';\n\n// ❌\nimport * as foo$ from 'module';\n\n// ❌\nexport * as foo$ from 'module';\n\n// ❌\nconst foo = 1;\nexport {foo as bar$};\n\n// ✅\nimport {bar$} from 'module';\n\n// ❌\nconst foo = bar$;\n```\n","docs/rules/import-style.md":"# import-style\n\n📝 Enforce specific import styles per module.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nSometimes a module contains unrelated functions, like `util`, thus it is a good practice to enforce destructuring or named imports here. Other times, in modules like `path`, it is good to use default import as they have similar functions, all likely to be utilized.\n\nThis rule applies to modules listed in the `styles` option and the default styles below. Other imports are not affected.\n\nThis rule defines 4 import styles:\n\n- `unassigned` - `import 'foo'` or `require('foo')`\n- `default` - `import path from 'path'` or `const path = require('path')`\n- `namespace` - `import * as path from 'path'` or `const path = require('path')`\n- `named` - `import {inspect} from 'util'` or `const {inspect} = require('util')`\n\n## Examples\n\n```js\n// ❌\nconst util = require('node:util');\n\n// ✅\nconst {promisify} = require('node:util');\n```\n\n```js\n// ❌\nimport util from 'node:util';\n\n// ❌\nimport * as util from 'node:util';\n\n// ✅\nimport {promisify} from 'node:util';\n```\n\n```js\n// ❌\nimport * as path from 'node:path';\n\n// ✅\nimport path from 'node:path';\n```\n\n## Options\n\n### styles\n\nType: `object`\n\nYou can extend default import styles per module by passing the `styles` option.\n\nDefault options per module are:\n\n- `chalk` - `default` only\n- `path` - `default` only\n- `util` - `named` only\n\nImports with the `node:` protocol are matched as if the protocol were omitted. For example, `node:util` uses the same style as `util`. Configure these modules by their bare name, like `util` or `path`.\n\nThe example below:\n\n- Disables any restrictions on the `util` module imports.\n- Allows `named` import (leaving `default` allowed too) from the `path` module (by default only `default` import of `path` is allowed).\n\n```js\n'unicorn/import-style': [\n\t'error',\n\t{\n\t\tstyles: {\n\t\t\tutil: false,\n\t\t\tpath: {\n\t\t\t\tnamed: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\nDo not set all styles to `false` for a module. To disallow a module entirely, use the [`no-restricted-imports`](https://eslint.org/docs/latest/rules/no-restricted-imports) rule instead.\n\n### extendDefaultStyles\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"extendDefaultStyles\": false` to override the default `styles` option completely.\n\n### checkImport\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkImport\": false` to disable linting of static import statements (like `import ... from 'foo'` or `import 'foo'`) completely.\n\n### checkDynamicImport\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkDynamicImport\": false` to disable linting of dynamic import statements (like `await import('foo')`) completely.\n\n### checkExportFrom\n\nType: `boolean`\\\nDefault: `false`\n\nPass `\"checkExportFrom\": true` to enable linting of export-from statements (like `export ... from 'foo'`).\n\n### checkRequire\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkRequire\": false` to disable linting of `require` calls completely.\n","docs/rules/indent.md":"# indent\n\n📝 Enforce consistent indentation in JSON and CSS.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce leading indentation in JSON, JSONC, and JSON5 ([`@eslint/json`](https://github.com/eslint/json)) and CSS ([`@eslint/css`](https://github.com/eslint/css)). JSON checks nesting depth; CSS checks indentation style only.\n\nJavaScript and TypeScript are excluded because their statements and expressions need more detailed indentation rules. Use [`@stylistic/indent`](https://eslint.style/rules/indent) for those languages.\n\n## Options\n\n### `indent`\n\nType: `'tab' | integer`\\\nDefault: `'tab'`\n\nUse tabs, or a positive integer to set the number of spaces per indentation unit. Mixed tabs and spaces are rejected.\n\n```js\n{\n\t'unicorn/indent': [\n\t\t'error',\n\t\t{\n\t\t\tindent: 2,\n\t\t},\n\t],\n}\n```\n\n### `tabWidth`\n\nType: `integer`\\\nDefault: `4`\n\nA positive integer tab stop width for CSS conversion, whether converting to tabs or spaces. Ignored for JSON.\n\n## Examples\n\n### JSON\n\nEach open object or array adds one level. A line starting with `}` or `]` uses one level less; only the first closing delimiter determines that line's indentation. Top-level content is unindented.\n\nFor `{indent: 2}`:\n\n```json\n{\n  \"items\": [\n    true\n  ]\n}\n```\n\nStrings and comments do not affect depth. JSON5 indentation whitespace, including non-breaking spaces, is replaced.\n\n### CSS\n\nAccepts any number of tabs in tab mode, or multiples of `indent` spaces in space mode. **Nesting depth is not checked**, so unindented lines are valid anywhere.\n\nFor `{indent: 2}`, both examples pass:\n\n```css\na {\n  color: red;\n}\n\nb {\ncolor: blue;\n}\n```\n\nFixes expand tabs using tab stops, then round width up to a whole indentation unit. With defaults, four spaces become one tab, five become two tabs, and a space followed by a tab becomes one tab. With `{indent: 2, tabWidth: 4}`, a tab followed by a space becomes six spaces.\n\nOnly ASCII spaces and tabs are treated as indentation. Unicode identifier characters, including non-breaking spaces, are preserved.\n\n## Preserved content\n\nPreserves inline spacing, trailing whitespace, line endings, and non-whitespace token contents. Ignores blank lines and continuation lines inside multiline tokens and comments. Indentation before comment openers is checked.\n","docs/rules/isolated-functions.md":"# isolated-functions\n\n📝 Prevent usage of variables from outside the scope of isolated functions.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nSome functions need to be isolated from their surrounding scope due to execution context constraints. For example, functions passed to [`makeSynchronous()`](https://github.com/sindresorhus/make-synchronous) are executed in a worker or subprocess and cannot access variables from outside their scope. This rule helps identify when functions are using external variables that may cause runtime errors.\n\nCommon scenarios where functions must be isolated:\n\n- Functions passed to `makeSynchronous()` (executed in a worker)\n- Functions passed to `workerize()`\n- Functions passed to `page.evaluate()` in Puppeteer or Playwright style code\n- Functions that will be serialized via `Function.prototype.toString()`\n- Server actions or other remote execution contexts\n- Functions with specific JSDoc annotations\n\nBy default, this rule allows ES globals like `Array` and `Map`, and ESLint-resolved global variables from configuration or `/* global */` comments like `console` and `fetch`, in isolated functions, but prevents usage of variables from the surrounding scope.\n\n## Examples\n\n```js\n/* global fetch, console */\nimport makeSynchronous from 'make-synchronous';\n\nconst url = 'https://example.com';\n\nconst getText = makeSynchronous(async () => {\n\tconst response = await fetch(url); // ❌ 'url' is not defined in isolated function scope\n\treturn response.text();\n});\n\n// ✅ Define all variables within isolated function's scope\nconst getText = makeSynchronous(async () => {\n\tconst url = 'https://example.com'; // Variable defined within function scope\n\tconst response = await fetch(url);\n\treturn response.text();\n});\n\n// ✅ Alternative: Pass as parameter\nconst getText = makeSynchronous(async (url) => { // Variable passed as parameter\n\tconst response = await fetch(url);\n\treturn response.text();\n});\n\nconsole.log(getText('https://example.com'));\n```\n\n```js\nconst foo = 'hi';\n\n/** @isolated */\nfunction abc() {\n\treturn foo.slice(); // ❌ 'foo' is not defined in isolated function scope\n}\n\nconst object = {\n\t/** @isolated */\n\tmethod() {\n\t\treturn this.foo; // ❌ 'this' depends on external object state\n\t},\n};\n\n// ✅\n/** @isolated */\nfunction abc() {\n\tconst foo = 'hi'; // Variable defined within function scope\n\treturn foo.slice();\n}\n```\n\n## Options\n\nType: `object`\n\n### functions\n\nType: `string[]`\\\nDefault: `['makeSynchronous', 'workerize']`\n\nArray of function names that create isolated execution contexts. Functions passed as arguments to these functions will be considered isolated.\n\nThe rule also detects these common isolated execution APIs by default:\n\n- `browser.execute(fn)`\n- `page.evaluate(fn)`\n- `chrome.scripting.executeScript({func: () => {}})`\n- `browser.scripting.executeScript({func: () => {}})`\n\nGeneric names like `serialize`, `isolate`, and `memoize` are not enabled by default. Add project-specific serializer names to `functions` when they should be treated as isolated.\n\nOther `evaluate` calls are not enabled by default. Use `selectors` to opt into project-specific APIs that do not use the variable name `page`.\n\n### selectors\n\nType: `string[]`\\\nDefault: `[]`\n\nArray of [ESLint selectors](https://eslint.org/docs/developer-guide/selectors) to identify isolated functions. Useful for custom naming conventions or framework-specific patterns.\n\nSelectors must match the function node that should be treated as isolated. To isolate functions passed to a matching call expression, use ESLint selector syntax to select the function argument:\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tselectors: [\n\t\t\t\t'FunctionDeclaration[id.name=/lambdaHandler.*/]',\n\t\t\t\t'CallExpression[callee.property.name=/CodemodScript/] > :function'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### comments\n\nType: `string[]`\\\nDefault: `['@isolated']`\n\nArray of comment strings that mark functions as isolated. Functions with inline, block, or JSDoc comments tagged with these strings will be considered isolated. (Definition of \"tagged\": either the comment consists solely of the tag, or starts with it, and has an explanation following a hyphen, like `// @isolated - this function will be stringified`).\n\nTagged comments also apply to object methods, object properties whose value is a function expression or arrow function, and class methods. Isolated functions cannot use `this` or `super`; pass required state as parameters instead.\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tcomments: [\n\t\t\t\t'@isolated',\n\t\t\t\t'@remote'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### overrideGlobals\n\nType: `object`\\\nDefault: `{}`\n\nOverrides how specific global variables are handled. An empty object means no overrides; ES globals and ESLint-resolved globals from configuration or `/* global */` comments still apply. When specified as an object, each key is a global variable name and the value controls its behavior:\n\n- `'readonly'`: Global variable is allowed but cannot be written to\n- `'writable'`: Global variable is allowed and can be read/written\n- `'off'`: Global variable is not allowed\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\toverrideGlobals: {\n\t\t\t\tconsole: 'writable',     // Allowed and writable\n\t\t\t\tfetch: 'readonly',       // Allowed but readonly\n\t\t\t\tprocess: 'off'           // Not allowed\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n## Configuration examples\n\n### Custom function names\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tfunctions: [\n\t\t\t\t'makeSynchronous',\n\t\t\t\t'workerize',\n\t\t\t\t'createWorker',\n\t\t\t\t'serializeFunction'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### Lambda function naming convention\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tselectors: [\n\t\t\t\t'FunctionDeclaration[id.name=/lambdaHandler.*/]'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n```js\nconst foo = 'hi';\n\nfunction lambdaHandlerFoo() { // ❌ Will be flagged as isolated\n\treturn foo.slice();\n}\n\nfunction someOtherFunction() { // ✅ Not flagged\n\treturn foo.slice();\n}\n\ncreateLambda({\n\tname: 'fooLambda',\n\tcode: lambdaHandlerFoo.toString(), // Function will be serialized\n});\n```\n\n### Configured globals\n\n```js\n/* global console, fetch */\n\nmakeSynchronous(async () => {\n\tconsole.log('Starting...'); // ✅ Allowed if console is configured as a global\n\tconst response = await fetch('https://api.example.com'); // ✅ Allowed if fetch is configured as a global\n\treturn response.text();\n});\n```\n\n### Overriding specific globals\n\n`overrideGlobals` only overrides the listed names. It does not replace ES globals or ESLint-resolved globals from configuration or `/* global */` comments.\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\toverrideGlobals: {\n\t\t\t\tconsole: 'writable',     // Allowed and writable\n\t\t\t\tfetch: 'readonly',       // Allowed but readonly\n\t\t\t\tURL: 'readonly'          // Allowed but readonly\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n```js\n// ✅ All globals used are ES globals, ESLint-resolved globals, or explicitly overridden\nmakeSynchronous(async () => {\n\tconsole.log('Starting...'); // ✅ Allowed global\n\tconst response = await fetch('https://api.example.com'); // ✅ Allowed global\n\tconst url = new URL(response.url); // ✅ Allowed global\n\treturn response.text();\n});\n\nmakeSynchronous(async () => {\n\tconst response = await fetch('https://api.example.com', {\n\t\theaders: {\n\t\t\t'Authorization': `Bearer ${process.env.API_TOKEN}` // ❌ 'process' is not configured as an ESLint global or overrideGlobals entry\n\t\t}\n\t});\n\n\tconst url = new URL(response.url);\n\n\treturn response.text();\n});\n\n// ❌ Attempting to write to readonly global\nmakeSynchronous(async () => {\n\tfetch = null; // ❌ 'fetch' is readonly\n\tconsole.log('Starting...');\n});\n```\n\n### Predefined global variables\n\nTo enable a predefined set of globals, use the [`globals` package](https://npmjs.com/package/globals) similarly to how you would use it in `languageOptions` (see [ESLint docs on globals](https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables)):\n\n```js\nimport {defineConfig} from 'eslint/config';\nimport unicorn from 'eslint-plugin-unicorn';\nimport globals from 'globals';\n\nexport default defineConfig([\n\t{\n\t\tplugins: {\n\t\t\tunicorn,\n\t\t},\n\t\tlanguageOptions: {\n\t\t\tglobals: {\n\t\t\t\t...globals.builtin,\n\t\t\t\t...globals.applescript,\n\t\t\t\t...globals.greasemonkey,\n\t\t\t},\n\t\t},\n\t\trules: {\n\t\t\t'unicorn/isolated-functions': [\n\t\t\t\t'error',\n\t\t\t],\n\t\t},\n\t},\n]);\n```\n","docs/rules/iteration-fallback-style.md":"# iteration-fallback-style\n\n📝 Enforce a consistent style for optional loop sources.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce a consistent style for optional loop sources. A guard skips the loop without creating an empty collection, while a fallback keeps the loop compact. The `guard` style is the default.\n\nThe rule checks direct `for…of` and `for await…of` loops that use empty array fallbacks or matching guards, loops over `Object.keys()`, `Object.values()`, or `Object.entries()` that use empty object fallbacks or matching guards, and `for…in` loops with empty object fallbacks or matching guards.\n\n## Examples\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'guard'] */\n\n// ❌\nfor (const item of items || []) {\n\tuse(item);\n}\n\n// ✅\nif (items) {\n\tfor (const item of items) {\n\t\tuse(item);\n\t}\n}\n```\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'guard'] */\n\n// ❌\nfor (const [key, value] of Object.entries(options.config || {})) {\n\tuse(key, value);\n}\n\n// ✅\nif (options.config) {\n\tfor (const [key, value] of Object.entries(options.config)) {\n\t\tuse(key, value);\n\t}\n}\n```\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'fallback'] */\n\n// ❌\nif (items) {\n\tfor (const item of items) {\n\t\tuse(item);\n\t}\n}\n\n// ✅\nfor (const item of items || []) {\n\tuse(item);\n}\n```\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'fallback'] */\n\n// ❌\nif (options.config) {\n\tfor (const [key, value] of Object.entries(options.config)) {\n\t\tuse(key, value);\n\t}\n}\n\n// ✅\nfor (const [key, value] of Object.entries(options.config || {})) {\n\tuse(key, value);\n}\n```\n\n## Options\n\nType: `string`\\\nDefault: `'guard'`\n\n### `guard`\n\nPrefer an `if` guard over an empty fallback.\n\n### `fallback`\n\nPrefer an empty fallback over an `if` guard.\n\nTruthiness guards correspond to `||` fallbacks, while `source != null` guards correspond to `??` fallbacks.\n\nOnly direct loop guards and fallbacks are checked. Autofixes are limited to simple synchronous `for…of` loops with reference sources; `for await…of` and `for…in` are reported but not fixed. Getters, Proxies, `document.all`, and enumerable `Object.prototype` properties are not accounted for.\n","docs/rules/key-name-casing.md":"# key-name-casing\n\n📝 Enforce a case style for data keys.\n\n🚫 Disabled by default.\n\n<!-- end auto-generated rule header -->\n\nEnforce a consistent case style for decoded keys in JSON, JSONC, JSON5, SOML, TOML, and YAML. This includes unquoted JSON5 keys, YAML string keys (except plain `<<` merge keys), and TOML key segments, including table names. Non-string YAML keys, tagged, anchored, and alias keys, and string values are skipped.\n\nRenaming keys can break consumers in other files, so the rule has no fixes or suggestions.\n\n## Examples\n\n```jsonc\n// ❌\n{\"user_name\": 1, \"nested\": {\"OtherKey\": 2}}\n\n// ✅\n{\"userName\": 1, \"nested\": {\"otherKey\": 2}}\n```\n\nThe rule also reports YAML `user-name: 1` and TOML `[user_settings]` with the default `camelCase` style.\n\n## Options\n\nType: `object`\n\nEach enabled case is accepted. `camelCase` is enabled by default; set it to `false` when choosing another case exclusively. If all cases are disabled, no keys are checked.\n\n| Option | Default | Example |\n| --- | --- | --- |\n| `camelCase` | `true` | `userName` |\n| `PascalCase` | `false` | `UserName` |\n| `SCREAMING_SNAKE_CASE` | `false` | `USER_NAME` |\n| `'kebab-case'` | `false` | `user-name` |\n| `snake_case` | `false` | `user_name` |\n\nCase styles use canonical conversions from `change-case`. Acronyms are normalized, so `userId` is camelCase while `userID` is not. Empty keys and keys containing whitespace or punctuation fail unless explicitly ignored.\n\n```js\n'unicorn/key-name-casing': ['error', {\n\tcamelCase: false,\n\tsnake_case: true,\n\tSCREAMING_SNAKE_CASE: true,\n}]\n```\n\n### ignore\n\nType: `string[]`\\\nDefault: `[]`\n\nRegular expression patterns matching decoded key names to ignore. Patterns are not automatically anchored. Use `^` and `$` to match a complete name.\n\n```js\n'unicorn/key-name-casing': ['error', {\n\tignore: ['^\\\\$schema$', '^x-'],\n}]\n```\n","docs/rules/logical-assignment-operators.md":"# logical-assignment-operators\n\n📝 Require or disallow logical assignment operator shorthand.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule is the same as the built-in ESLint [`logical-assignment-operators`](https://eslint.org/docs/latest/rules/logical-assignment-operators) rule, but when `enforceForIfStatements` is enabled, falsy `if` assignments are reported with suggestions for both `||=` and `??=` instead of being autofixed.\n\nConsistently choosing logical-assignment shorthand or an explicit assignment or conditional makes updates easier to scan and avoids mixing the same pattern in different forms.\n\n## Replacement for ESLint `logical-assignment-operators`\n\nThis rule replaces ESLint's built-in `logical-assignment-operators` rule, which Unicorn presets disable when this rule is enabled.\n\n## Examples\n\n```js\n/* eslint unicorn/logical-assignment-operators: [\"error\", \"always\", {\"enforceForIfStatements\": true}] */\n\n// ❌\nif (!foo) {\n\tfoo = bar;\n}\n\n// ✅\nfoo ||= bar;\n\n// ✅\nfoo ??= bar;\n```\n\nComputed properties are supported too:\n\n```js\n/* eslint unicorn/logical-assignment-operators: [\"error\", \"always\", {\"enforceForIfStatements\": true}] */\n\n// ❌\nif (!object[key]) {\n\tobject[key] = [];\n}\n\n// ✅\nobject[key] ||= [];\n\n// ✅ When the intent is to replace only null or undefined values\nobject[key] ??= [];\n```\n\nProperty checks such as `key in object`, `object.hasOwnProperty(key)`, `Object.hasOwn(object, key)`, and `Object.keys(object).includes(key)` are not reported. They check for a property rather than a nullish value. For example, an `Object.hasOwn()` guard preserves an own property set to `undefined` and does not treat an inherited `constructor` as an own property. Replacing that guard with `??=` would change both behaviors.\n\n## Options\n\nThis rule supports the same options as ESLint `logical-assignment-operators`.\n","docs/rules/max-nested-calls.md":"# max-nested-calls\n\n📝 Limit the depth of nested calls.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nDeeply nested calls make code hard to read. Extract intermediate results to named variables instead.\n\nThis rule counts calls and constructor calls passed into other calls or constructors. Fluent receiver chains and JSX wrappers are ignored.\n\n## Examples\n\n```js\n// ❌\nfoo(bar(baz(qux())));\n\n// ✅\nconst value = baz(qux());\nfoo(bar(value));\n```\n\n```js\n// ✅\nquery().filter().map().toArray();\n```\n\n## Options\n\n### max\n\nType: `integer`\\\nDefault: `3`\n\nThe maximum allowed nested call depth.\n\n```js\n/* eslint unicorn/max-nested-calls: [\"error\", {\"max\": 4}] */\n// ✅\nfoo(bar(baz(qux())));\n```\n","docs/rules/name-replacements.md":"# name-replacements\n\n📝 Enforce replacements for variable, property, and filenames.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUsing clear names results in more readable code. Code is written only once, but read many times.\n\nThis rule enforces replacements for names, including variables, properties, imports, and filenames. The default replacements focus on common abbreviations, but the rule can also be used to replace terms, disallow words, etc. See the [`replacements`](#replacements) and [`extendDefaultReplacements`](#extenddefaultreplacements) options.\n\nYou can find the default replacements [here](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/rules/shared/name-replacements.js).\n\nThis rule is automatically fixable only for variable names with exactly one replacement defined. Ambiguous variable names and checked property names can be manually fixed with editor suggestions when the rename is local to source text. Filename reports and exported-name property reports do not provide editor suggestions.\n\nParameter names do not provide autofixes or editor suggestions when the function has an attached JSDoc `@param` comment, as those name references are not normal variable references and would otherwise be left stale. TypeScript parameter properties also do not provide autofixes or editor suggestions, as the corresponding class property references are not part of the parameter variable's references. TypeScript type predicate and assertion signature parameter references are updated when the parameter is renamed.\n\nTypeScript enum members are not checked, as a member access like `Foo.err` is not a reference to the member and would not be renamed with it.\n\n## React\n\nReact projects commonly use abbreviation families like `props`, `ref`, `prevState`, and route `params`. The `replacements` option disables matching those words both as complete identifiers and as parts of longer identifiers, for example `someRef`.\n\nUse an ESLint `files` override if you only want to allow those conventions in React files:\n\n```js\n{\n\tfiles: ['**/*.{jsx,tsx}'],\n\trules: {\n\t\t'unicorn/name-replacements': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\treplacements: {\n\t\t\t\t\tparam: false,\n\t\t\t\t\tparams: false,\n\t\t\t\t\tprev: false,\n\t\t\t\t\tprop: false,\n\t\t\t\t\tprops: false,\n\t\t\t\t\tref: false,\n\t\t\t\t\trefs: false,\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n}\n```\n\n## Examples\n\n```js\n// ❌\nconst e = new Error();\n\n// ✅\nconst error = new Error();\n```\n\n```js\n// ❌\nconst e = document.createEvent('Event');\n\n// ✅\nconst event = document.createEvent('Event');\n```\n\n```js\n// ❌\nclass Btn {}\n\n// ✅\nclass Button {}\n```\n\n```js\n// ✅\n// Property is not checked by default\nconst levels = {\n\terr: 0\n};\n```\n\n```js\n// ✅\n// Property is not checked by default\nthis.evt = 'click';\n```\n\n## Data keys, CSS, and HTML\n\nWith `checkProperties: true`, the rule checks JSON object keys, YAML string keys, TOML key segments (including table names), and SOML keys. It skips YAML non-string, tagged, anchored, and alias keys, plus string values.\n\nWith `checkVariables` (enabled by default), it checks CSS class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media, plus HTML `id` and individual `class` names. Built-in CSS property names and value keywords, and `animation` shorthand values are skipped. CSS escapes and HTML character references are decoded; templated HTML values are skipped.\n\nIgnore patterns match full decoded names, including `--`. Data and CSS/HTML diagnostics have no fixes or suggestions because names may be referenced elsewhere. `checkFilenames` also applies to data, CSS, and HTML files.\n\n## Options\n\nType: `object`\n\n### replacements\n\nType: `object`\n\nYou can extend default replacements by passing the `replacements` option.\n\nUse this to configure discouraged terms and their replacements. To allow a specific full identifier, use [`allowList`](#allowlist) instead.\n\nLowercase replacements will match both camelcase and pascalcase identifiers. For example, `err` will match both `err` and `Err`. `errCb` will match both `errCb` and `ErrCb`.\n\nLowercase replacements will match both complete identifiers and separate words inside identifiers. For example, `cmd` will match all of `cmd`, `createCmd` and `CmdFactory`.\n\nCamelcase replacements will only match complete identifiers. For example `errCb` will only match `errCb` and `ErrCb`. It will not match `fooErrCb` or `errCbFoo`.\n\nThe example below:\n\n- disables the default `e` → `event` replacement (leaving `e` → `error` enabled),\n- disables `res` replacement completely (both `res` → `response` and `res` → `result` from defaults are disabled),\n- adds a custom `usr` → `user` replacement,\n- adds a custom `errCb` → `handleError` replacement.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\te: {\n\t\t\t\tevent: false,\n\t\t\t},\n\t\t\tres: false,\n\t\t\tusr: {\n\t\t\t\tuser: true,\n\t\t\t},\n\t\t\terrCb: {\n\t\t\t\thandleError: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"extendDefaultReplacements\": false` to override the default `replacements` completely.\n\nThe example below disables all the default replacements and enables a custom `usr` → `user` one.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\textendDefaultReplacements: false,\n\t\treplacements: {\n\t\t\tusr: {\n\t\t\t\tuser: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\nDefaults can also include terminology preferences that are not abbreviations. Use custom replacements for project-specific preferences:\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\tpage: {\n\t\t\t\tscreen: true,\n\t\t\t},\n\t\t\tpages: {\n\t\t\t\tscreens: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\n### allowList\n\nType: `object`\n\nYou can extend the default allowList by passing the `allowList` option.\n\nUnlike the `replacements` option, `allowList` matches full identifier names case-sensitively.\n\nFor example, if you want to report `props` → `properties` (enabled by default), but allow `getInitialProps`, you could use the following configuration.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\tallowList: {\n\t\t\tgetInitialProps: true,\n\t\t},\n\t},\n]\n```\n\nFor example, `allowList: {elementRef: true}` allows `elementRef` while still reporting `ref`.\n\n### extendDefaultAllowList\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"extendDefaultAllowList\": false` to override the default `allowList` completely.\n\n### checkDefaultAndNamespaceImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in default or namespace import, **but only for internal modules**.\n- `true` - Check variables declared in default or namespace import.\n- `false` - Don't check variables declared in default or namespace import.\n\nBy default, the following code will be reported:\n\n```js\nimport * as err from './err';\n```\n\n```js\nimport err from '/err';\n```\n\nWith this set to `true`, the following code will be reported:\n\n```js\nimport tempWrite from 'temp-write';\n```\n\n```js\nimport * as err from 'err';\n```\n\n### checkShorthandImports\n\nType: `'internal'` | `boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in shorthand import, **but only for internal modules**.\n- `true` - Check variables declared in shorthand import.\n- `false` - Don't check variables declared in default shorthand import.\n\nBy default, the following code will be reported:\n\n```js\nimport {prop} from './foo';\n```\n\nWith this set to `true`, the following code will be reported:\n\n```js\nimport {prop} from 'ramda';\n```\n\n### checkShorthandProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `\"checkShorthandProperties\": true` to check variables declared as shorthand properties in object destructuring.\n\nWith this set to `true` the following code will be reported.\n\n```js\nconst {err} = foo;\n```\n\n```js\nfunction f({err}) {}\n```\n\n### checkProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `\"checkProperties\": true` to enable checking property names.\n\n### checkVariables\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkVariables\": false` to disable checking variable names.\n\n### checkFilenames\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkFilenames\": false` to disable checking filenames.\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nThis option lets you specify a regex pattern for matches to ignore.\n\nWhen a string is given, it's interpreted as a regular expression inside a string.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'\\\\.fixtures$',\n\t\t\t/^ignore/i,\n\t\t],\n\t},\n]\n```\n\nWhen checking filenames, only the basename is tested. For example, with a file named `foo.fixtures.js`, `ignore: [/\\.fixtures$/]` would pass and `ignore: [/\\.fixtures\\.js/]` would fail.\n","docs/rules/new-for-builtins.md":"# new-for-builtins\n\n📝 Enforce correct use of `new` for builtin constructors.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nMany builtin constructors can be called with or without `new`, but `new` should be preferred for consistency with constructors that require it. This rule also reports selected builtin namespace objects that are not callable or constructible.\n\nFor non-callable top-level namespace objects covered by ESLint core, like `Math`, `JSON`, `Reflect`, `Atomics`, `Intl`, and `Temporal`, use [`no-obj-calls`](https://eslint.org/docs/latest/rules/no-obj-calls).\n\nEnforces the use of `new` for the following builtins:\n\n- [`Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n- [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)\n- [`AsyncDisposableStack`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncDisposableStack)\n- [`BigInt64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array)\n- [`BigUint64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array)\n- [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)\n- [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`DisposableStack`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DisposableStack)\n- [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)\n- [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError)\n- [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError)\n- [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array)\n- [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array)\n- [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array)\n- [`Function`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)\n- [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array)\n- [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array)\n- [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array)\n- [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)\n- [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError)\n- [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError)\n- [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)\n- [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)\n- [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet)\n- [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n- [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n- [`SuppressedError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SuppressedError)\n- [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError)\n- [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError)\n- [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)\n- [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array)\n- [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array)\n- [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray)\n- [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)\n- [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer)\n- [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy)\n- [`WeakRef`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef)\n- [`FinalizationRegistry`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry)\n- [`Intl.Collator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator)\n- [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)\n- [`Intl.DisplayNames`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames)\n- [`Intl.DurationFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat)\n- [`Intl.ListFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat)\n- [`Intl.Locale`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale)\n- [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat)\n- [`Intl.PluralRules`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules)\n- [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat)\n- [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)\n- [`Temporal.Duration`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration)\n- [`Temporal.Instant`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant)\n- [`Temporal.PlainDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate)\n- [`Temporal.PlainDateTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime)\n- [`Temporal.PlainMonthDay`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay)\n- [`Temporal.PlainTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime)\n- [`Temporal.PlainYearMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth)\n- [`Temporal.ZonedDateTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime)\n- [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module)\n- [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Instance)\n- [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Memory)\n- [`WebAssembly.Table`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Table)\n- [`WebAssembly.Global`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Global)\n- [`WebAssembly.Tag`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Tag)\n- [`WebAssembly.Exception`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Exception)\n- [`WebAssembly.CompileError`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/CompileError)\n- [`WebAssembly.LinkError`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/LinkError)\n- [`WebAssembly.RuntimeError`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/RuntimeError)\n\nDisallows the use of `new` for the following builtins:\n\n- [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`Boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)\n- [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)\n\n> These should not use `new` as that would create object wrappers for the primitive values, which is not what you want. However, without `new` they can be useful for coercing a value to that type.\n\nThis rule is fixable, except `new String()`, `new Number()`, and `new Boolean()`, which [return wrapped objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#String_primitives_and_String_objects). `RegExp(regex)` returns `regex` itself, while `new RegExp(regex)` returns a copy with `lastIndex` reset, which is not preserved by the fix. Optional chains that would require adding `new` are ignored, as `new` cannot be optional. Reports for builtin namespace objects are not fixable.\n\nDisallows calling or constructing the following builtin namespace objects:\n\n- [`Temporal.Now`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now)\n- [`WebAssembly`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface)\n- [`WebAssembly.JSTag`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface)\n\n## Examples\n\n```js\n// ❌\nconst list = Array(10);\n\n// ✅\nconst list = new Array(10);\n```\n\n```js\n// ❌\nconst now = Date();\n\n// ✅\nconst now = String(new Date());\n```\n\n```js\n// ❌\nconst map = Map([\n\t['foo', 'bar']\n]);\n\n// ✅\nconst map = new Map([\n\t['foo', 'bar']\n]);\n```\n","docs/rules/no-abusive-eslint-disable.md":"# no-abusive-eslint-disable\n\n📝 Enforce specifying rules to disable in `eslint-disable` comments.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule makes you specify the rules you want to disable when using `eslint-disable`, `eslint-disable-line` or `eslint-disable-next-line` comments.\n\nBecause it inspects the disable directives themselves, it applies to files of any language that supports them, not just JavaScript, when linted with the matching ESLint language plugin (for example [`@eslint/css`](https://github.com/eslint/css) or [`@eslint/markdown`](https://github.com/eslint/markdown)).\n\nIf you want to disable an ESLint rule in a file or on a specific line, you can add a comment.\n\nOn a single line:\n\n```js\nconst message = 'foo';\nconsole.log(message); // eslint-disable-line no-console\n\n// eslint-disable-next-line no-console\nconsole.log(message);\n```\n\nOn the whole (rest of the) file:\n\n```js\n/* eslint-disable no-console */\nconst message = 'foo';\nconsole.log(message);\n```\n\nYou don't have to specify any rules (like `no-console` in the examples above), but you should, as you might otherwise hide useful errors.\n\n```js\n/* eslint-disable */\nconsole.log(message); // `message` is not defined, but it won't be reported\n```\n\nThis rule enforces specifying the rules to disable. If you want to disable ESLint on a file altogether, you should ignore it through [`.eslintignore`](https://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories) for ESLint or through the [`ignores` property](https://github.com/xojs/xo#ignores) in `package.json` for `XO`.\n\n## Examples\n\n```js\n// ❌\n/* eslint-disable */\nconsole.log(message);\n\n// ✅\n/* eslint-disable no-console */\nconsole.log(message);\n```\n\n```js\n// ❌\nconsole.log(message); // eslint-disable-line\n\n// ✅\nconsole.log(message); // eslint-disable-line no-console\n```\n\n```js\n// ❌\n// eslint-disable-next-line\nconsole.log(message);\n\n// ✅\n// eslint-disable-next-line no-console\nconsole.log(message);\n```\n","docs/rules/no-accessor-recursion.md":"# no-accessor-recursion\n\n📝 Disallow recursive access to `this` within getters and setters.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule prevents recursive access to `this` within getter and setter methods in objects and classes, avoiding infinite recursion and stack overflow errors.\n\n## Examples\n\n```js\n// ❌\nconst foo = {\n\tget bar() {\n\t\treturn this.bar;\n\t}\n};\n\n// ✅\nconst foo = {\n\tget bar() {\n\t\treturn this.baz;\n\t}\n};\n```\n\n```js\n// ❌\nclass Foo {\n\tget bar() {\n\t\treturn this.bar;\n\t}\n}\n\n// ✅\nclass Foo {\n\tget bar() {\n\t\treturn this.baz;\n\t}\n}\n```\n\n```js\n// ❌\nconst foo = {\n\tset bar(value) {\n\t\tthis.bar = value;\n\t}\n};\n\n// ✅\nconst foo = {\n\tset bar(value) {\n\t\tthis._bar = value;\n\t}\n};\n```\n\n```js\n// ❌\nclass Foo {\n\tset bar(value) {\n\t\tthis.bar = value;\n\t}\n}\n\n// ✅\nclass Foo {\n\tset bar(value) {\n\t\tthis._bar = value;\n\t}\n}\n```\n","docs/rules/no-accidental-bitwise-operator.md":"# no-accidental-bitwise-operator\n\n📝 Disallow bitwise operators where a logical operator was likely intended.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nBitwise operators (`&`, `|`, `|=`) are rarely used in everyday code, and when they show up in boolean-like contexts they are almost always a typo for the logical operators (`&&`, `||`, `||=`).\n\nThe bug is easy to miss and hard to debug:\n\n- Bitwise operators do not [short-circuit](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND#short-circuit_evaluation), so `if (object & object.property)` evaluates `object.property` even when `object` is `null` or `undefined`, throwing a `TypeError`.\n- `options | {}` coerces both sides to integers, silently producing `options | 0` instead of falling back to the default object.\n\nThis rule only targets the high-signal patterns where a logical operator was clearly intended, so it does not flag legitimate bitwise math like `flags & MASK` or `value | 0`. Because switching the operator changes runtime behavior, the fix is offered as a suggestion rather than applied automatically.\n\nThis is more targeted than the built-in [`no-bitwise`](https://eslint.org/docs/latest/rules/no-bitwise) rule, which disallows all bitwise operators. See also [`prefer-math-trunc`](./prefer-math-trunc.md), which covers the `value | 0` truncation idiom.\n\n## Examples\n\n```js\n// ❌\nif (object & object.property) {\n\t// …\n}\n\n// ✅\nif (object && object.property) {\n\t// …\n}\n```\n\n```js\n// ❌\noptions = options | {};\n\n// ✅\noptions = options || {};\n```\n\n```js\n// ❌\ninput |= '';\n\n// ✅\ninput ||= '';\n```\n\n```js\n// ✅ Not flagged: legitimate bitwise math\nconst masked = flags & MASK;\nconst truncated = value | 0;\n```\n","docs/rules/no-anonymous-default-export.md":"# no-anonymous-default-export\n\n📝 Disallow anonymous functions and classes as the default export.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nNaming default exports improves codebase searchability by ensuring consistent identifier use for a module's default export, both where it's declared and where it's imported.\n\n## Examples\n\n```js\n// ❌\nexport default class {}\n\n// ✅\nexport default class Foo {}\n```\n\n```js\n// ❌\nexport default function () {}\n\n// ✅\nexport default function foo() {}\n```\n\n```js\n// ❌\nexport default () => {};\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// ❌\nmodule.exports = class {};\n\n// ✅\nmodule.exports = class Foo {};\n```\n\n```js\n// ❌\nmodule.exports = function () {};\n\n// ✅\nmodule.exports = function foo() {};\n```\n\n```js\n// ❌\nmodule.exports = () => {};\n\n// ✅\nconst foo = () => {};\nmodule.exports = foo;\n```\n","docs/rules/no-array-callback-reference.md":"# no-array-callback-reference\n\n📝 Prevent passing a function reference directly to iterator methods.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPassing functions to iterator methods can cause issues when the function is changed without realizing that the iterator passes 2 more parameters to it. **This also applies when using TypeScript,** albeit only if the function accepts the same parameter type used by the iterator method.\n\nThis rule intentionally reports locally declared callbacks too. Use an inline wrapper when you want to make the callback arguments explicit.\n\nType predicate callbacks are allowed for `.every()`, `.filter()`, `.find()`, and `.findLast()` because wrapping them can fail to preserve TypeScript's predicate overload narrowing.\n\nA receiver known to be neither an array nor a typed array, such as a `Set` or a locally declared class with a same-named method, is ignored. A locally declared type is recognized from its annotation alone, while a receiver whose type comes from another module needs [type information](https://typescript-eslint.io/getting-started/typed-linting/). Unknown receivers are still reported, so use the `ignore` option or an inline disable for non-array APIs that intentionally share array method names.\n\nSuppose you have a `unicorn` module:\n\n```js\nconst unicorn = x => x + 1;\n\nexport default unicorn;\n```\n\nYou can then use it like this:\n\n```js\nimport unicorn from 'unicorn';\n\n[1, 2, 3].map(unicorn);\n//=> [2, 3, 4]\n```\n\nThe `unicorn` module now does a minor version that adds another argument:\n\n```js\nconst unicorn = (x, y) => x + (y ? y : 1);\n\nexport default unicorn;\n```\n\nYour code will now return something different and probably break for users because it is now passing the index of the item as second argument.\n\n```js\nimport unicorn from 'unicorn';\n\n[1, 2, 3].map(unicorn);\n//=> [2, 3, 5]\n```\n\nThis rule helps safely call the function with the expected number of parameters:\n\n```js\nimport unicorn from 'unicorn';\n\n[1, 2, 3].map(x => unicorn(x));\n//=> [2, 3, 4]\n```\n\n## Examples\n\n```js\n// ❌\nconst foo = array.map(callback);\n\n// ✅\nconst foo = array.map(element => callback(element));\n```\n\n```js\n// ✅\nconst foo = array.map(Boolean);\n```\n\n```js\n// ❌\narray.forEach(callback);\n\n// ✅\narray.forEach(element => {\n\tcallback(element);\n});\n```\n\n```js\n// ❌\nconst foo = array.every(callback);\n\n// ✅\nconst foo = array.every(element => callback(element));\n```\n\n```js\n// ❌\nconst foo = array.filter(callback);\n\n// ✅\nconst foo = array.filter(element => callback(element));\n```\n\n```js\n// ✅\nconst foo = array.filter(Boolean);\n```\n\n```js\n// ❌\nconst foo = array.find(callback);\n\n// ✅\nconst foo = array.find(element => callback(element));\n```\n\n```js\n// ❌\nconst index = array.findIndex(callback);\n\n// ✅\nconst index = array.findIndex(element => callback(element));\n```\n\n```js\n// ❌\nconst foo = array.some(callback);\n\n// ✅\nconst foo = array.some(element => callback(element));\n```\n\n```js\n// ❌\nconst foo = array.reduce(callback, 0);\n\n// ✅\nconst foo = array.reduce(\n\t(accumulator, element) => accumulator + callback(element),\n\t0\n);\n```\n\n```js\n// ❌\nconst foo = array.reduceRight(callback, []);\n\n// ✅\nconst foo = array.reduceRight(\n\t(accumulator, element) => [\n\t\t...accumulator,\n\t\tcallback(element)\n\t],\n\t[]\n);\n```\n\n```js\n// ❌\nconst foo = array.flatMap(callback);\n\n// ✅\nconst foo = array.flatMap(element => callback(element));\n```\n\nA call expression is left alone. Hoisting it into a binding would change how many times it runs, so the rewrite is a manual edit rather than something the rule can offer:\n\n```js\n// ✅ Not reported\narray.forEach(someFunction({foo: 'bar'}));\n```\n\n```js\n// A manual rewrite, if you want the call to happen once\nconst callback = someFunction({foo: 'bar'});\n\narray.forEach(element => {\n\tcallback(element);\n});\n```\n\n```js\n// ❌\narray.forEach(callback, thisArgument);\n\n// ✅\narray.forEach(function (element) {\n\tcallback(element, this);\n}, thisArgument);\n```\n\n```js\n// ✅\nfunction readFile(filename) {\n\treturn fs.readFile(filename, 'utf8');\n}\n\nPromise.map(filenames, readFile);\n```\n\n## Options\n\nType: `object`\n\n### ignore\n\nType: `string[]`\n\nCallees to ignore. The callee is matched against the object the iterator method is called on, so `\"Angular\"` ignores all `Angular.<method>(…)` calls.\n\n`Promise`, `React.Children`, `Children`, `lodash`, `underscore`, `_`, `Async`, `async`, `this`, `$`, and `jQuery` are always ignored.\n\nExample:\n\n```js\n{\n\t'unicorn/no-array-callback-reference': [\n\t\t'error',\n\t\t{\n\t\t\tignore: [\n\t\t\t\t'Angular',\n\t\t\t\t'P'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n```js\n/* eslint unicorn/no-array-callback-reference: [\"error\", {\"ignore\": [\"Angular\"]}] */\nAngular.forEach(list, fn); // Passes\n```\n","docs/rules/no-array-concat-in-loop.md":"# no-array-concat-in-loop\n\n📝 Disallow array accumulation with `Array#concat()` in loops.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\n`Array#concat()` creates a new array every time it is called. When an accumulator is reassigned with `.concat()` on every loop iteration, each iteration copies everything accumulated so far, which can make the loop quadratic in the total number of accumulated items.\n\nUse `Array#push()` inside the loop when each chunk is an array, or collect the nested arrays and flatten them once outside the loop.\n\nThis rule intentionally only reports local `let` and `var` variables initialized to an empty array literal. It does not try to infer arbitrary array-like values or custom `.concat()` methods.\n\nThis rule does not provide an autofix. Replacing `.concat()` with `.push()` can change observable behavior when the old array is aliased, and `.concat()` has argument-spreading semantics that are not always equivalent to `push(...value)`.\n\n## Examples\n\n```js\n// ❌\nlet result = [];\n\nfor (const chunk of chunks) {\n\tresult = result.concat(chunk);\n}\n```\n\n```js\n// ✅\nconst result = [];\n\nfor (const chunk of chunks) {\n\tresult.push(...chunk);\n}\n```\n\n```js\n// ✅\nconst result = chunks.flat();\n```\n\n```js\n// ✅\nlet result = [];\n\nfor (const chunk of chunks) {\n\tresult = other.concat(chunk);\n}\n```\n","docs/rules/no-array-fill-with-reference-type.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-fill-with-reference-type.md -->","docs/rules/no-array-from-fill.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-from-fill.md -->","docs/rules/no-array-front-mutation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-front-mutation.md -->","docs/rules/no-array-method-this-argument.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-method-this-argument.md -->","docs/rules/no-array-reduce.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-reduce.md -->","docs/rules/no-array-reverse.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-reverse.md -->","docs/rules/no-array-sort-for-min-max.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-sort-for-min-max.md -->","docs/rules/no-array-sort.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-sort.md -->","docs/rules/no-array-splice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-splice.md -->","docs/rules/no-asterisk-prefix-in-documentation-comments.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-asterisk-prefix-in-documentation-comments.md -->","docs/rules/no-async-iterator-callback.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-async-iterator-callback.md -->","docs/rules/no-async-promise-finally.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-async-promise-finally.md -->","docs/rules/no-await-expression-member.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-await-expression-member.md -->","docs/rules/no-await-in-promise-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-await-in-promise-methods.md -->","docs/rules/no-barrel-files.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-barrel-files.md -->","docs/rules/no-blob-to-file.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-blob-to-file.md -->","docs/rules/no-boolean-sort-comparator.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-boolean-sort-comparator.md -->","docs/rules/no-break-in-nested-loop.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-break-in-nested-loop.md -->","docs/rules/no-canvas-to-image.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-canvas-to-image.md -->","docs/rules/no-chained-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-chained-comparison.md -->","docs/rules/no-collection-bracket-access.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-collection-bracket-access.md -->","docs/rules/no-computed-property-existence-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-computed-property-existence-check.md -->","docs/rules/no-conflicting-constraints.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-conflicting-constraints.md -->","docs/rules/no-confusing-array-splice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-confusing-array-splice.md -->","docs/rules/no-confusing-array-with.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-confusing-array-with.md -->","docs/rules/no-console-spaces.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-console-spaces.md -->","docs/rules/no-constant-zero-expression.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-constant-zero-expression.md -->","docs/rules/no-declarations-before-early-exit.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-declarations-before-early-exit.md -->","docs/rules/no-document-cookie.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-document-cookie.md -->","docs/rules/no-double-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-double-comparison.md -->","docs/rules/no-duplicate-if-branches.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-if-branches.md -->","docs/rules/no-duplicate-logical-operands.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-logical-operands.md -->","docs/rules/no-duplicate-loops.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-loops.md -->","docs/rules/no-duplicate-set-values.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-set-values.md -->","docs/rules/no-empty-file.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-empty-file.md -->","docs/rules/no-empty-link-text.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-empty-link-text.md -->","docs/rules/no-error-property-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-error-property-assignment.md -->","docs/rules/no-exports-in-scripts.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-exports-in-scripts.md -->","docs/rules/no-for-each.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-for-each.md -->","docs/rules/no-for-loop.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-for-loop.md -->","docs/rules/no-global-object-property-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-global-object-property-assignment.md -->","docs/rules/no-immediate-mutation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-immediate-mutation.md -->","docs/rules/no-impossible-length-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-impossible-length-comparison.md -->","docs/rules/no-incomplete-accessor-override.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-incomplete-accessor-override.md -->","docs/rules/no-incorrect-query-selector.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-incorrect-query-selector.md -->","docs/rules/no-incorrect-template-string-interpolation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-incorrect-template-string-interpolation.md -->","docs/rules/no-ineffective-csp-directives.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-ineffective-csp-directives.md -->","docs/rules/no-instanceof-builtins.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-instanceof-builtins.md -->","docs/rules/no-invalid-argument-count.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-argument-count.md -->","docs/rules/no-invalid-boolean-attribute-value.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-boolean-attribute-value.md -->","docs/rules/no-invalid-character-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-character-comparison.md -->","docs/rules/no-invalid-dom-token.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-dom-token.md -->","docs/rules/no-invalid-fetch-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-fetch-options.md -->","docs/rules/no-invalid-file-input-accept.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-file-input-accept.md -->","docs/rules/no-invalid-integrity.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-integrity.md -->","docs/rules/no-invalid-intl-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-intl-options.md -->","docs/rules/no-invalid-property-descriptor.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-property-descriptor.md -->","docs/rules/no-invalid-remove-event-listener.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-remove-event-listener.md -->","docs/rules/no-invalid-response-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-response-options.md -->","docs/rules/no-invalid-style-set-property.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-style-set-property.md -->","docs/rules/no-invalid-temporal-arithmetic.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-temporal-arithmetic.md -->","docs/rules/no-invalid-url-protocol-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-url-protocol-comparison.md -->","docs/rules/no-invalid-well-known-symbol-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-well-known-symbol-methods.md -->","docs/rules/no-javascript-url.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-javascript-url.md -->","docs/rules/no-keyword-prefix.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-keyword-prefix.md -->","docs/rules/no-late-current-target-access.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-late-current-target-access.md -->","docs/rules/no-late-event-control.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-late-event-control.md -->","docs/rules/no-leading-empty-lines.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-leading-empty-lines.md -->","docs/rules/no-lonely-if.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-lonely-if.md -->","docs/rules/no-loop-iterable-mutation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-loop-iterable-mutation.md -->","docs/rules/no-loss-of-precision.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-loss-of-precision.md -->","docs/rules/no-magic-array-flat-depth.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-magic-array-flat-depth.md -->","docs/rules/no-manually-wrapped-comments.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-manually-wrapped-comments.md -->","docs/rules/no-mismatched-map-key.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-mismatched-map-key.md -->","docs/rules/no-misrefactored-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-misrefactored-assignment.md -->","docs/rules/no-missing-local-resource.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-missing-local-resource.md -->","docs/rules/no-multiple-promise-resolver-calls.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-multiple-promise-resolver-calls.md -->","docs/rules/no-named-default.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-named-default.md -->","docs/rules/no-negated-array-predicate.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negated-array-predicate.md -->","docs/rules/no-negated-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negated-comparison.md -->","docs/rules/no-negated-condition.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negated-condition.md -->","docs/rules/no-negation-in-equality-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negation-in-equality-check.md -->","docs/rules/no-nested-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-nested-ternary.md -->","docs/rules/no-new-array.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-new-array.md -->","docs/rules/no-new-buffer.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-new-buffer.md -->","docs/rules/no-non-function-verb-prefix.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-non-function-verb-prefix.md -->","docs/rules/no-nonstandard-builtin-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-nonstandard-builtin-properties.md -->","docs/rules/no-null.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-null.md -->","docs/rules/no-object-as-default-parameter.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-object-as-default-parameter.md -->","docs/rules/no-object-methods-with-collections.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-object-methods-with-collections.md -->","docs/rules/no-optional-chaining-on-undeclared-variable.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-optional-chaining-on-undeclared-variable.md -->","docs/rules/no-prevent-default-in-passive-listener.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-prevent-default-in-passive-listener.md -->","docs/rules/no-process-exit.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-process-exit.md -->","docs/rules/no-redundant-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-redundant-comparison.md -->","docs/rules/no-repeated-call-wrappers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-repeated-call-wrappers.md -->","docs/rules/no-return-array-push.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-return-array-push.md -->","docs/rules/no-selector-as-dom-name.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-selector-as-dom-name.md -->","docs/rules/no-shorthand-property-overrides.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-shorthand-property-overrides.md -->","docs/rules/no-single-promise-in-promise-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-single-promise-in-promise-methods.md -->","docs/rules/no-static-only-class.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-static-only-class.md -->","docs/rules/no-subtraction-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-subtraction-comparison.md -->","docs/rules/no-thenable.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-thenable.md -->","docs/rules/no-this-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-this-assignment.md -->","docs/rules/no-this-outside-of-class.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-this-outside-of-class.md -->","docs/rules/no-top-level-assignment-in-function.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-top-level-assignment-in-function.md -->","docs/rules/no-top-level-side-effects.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-top-level-side-effects.md -->","docs/rules/no-transition-all.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-transition-all.md -->","docs/rules/no-typeof-undefined.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-typeof-undefined.md -->","docs/rules/no-uncalled-method.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-uncalled-method.md -->","docs/rules/no-undeclared-class-members.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-undeclared-class-members.md -->","docs/rules/no-unnecessary-array-flat-depth.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-array-flat-depth.md -->","docs/rules/no-unnecessary-array-flat-map.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-array-flat-map.md -->","docs/rules/no-unnecessary-array-splice-count.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-array-splice-count.md -->","docs/rules/no-unnecessary-await.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-await.md -->","docs/rules/no-unnecessary-boolean-comparison.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-boolean-comparison.md -->","docs/rules/no-unnecessary-default-arguments.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-default-arguments.md -->","docs/rules/no-unnecessary-fetch-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-fetch-options.md -->","docs/rules/no-unnecessary-global-this.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-global-this.md -->","docs/rules/no-unnecessary-nested-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-nested-ternary.md -->","docs/rules/no-unnecessary-parameters.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-parameters.md -->","docs/rules/no-unnecessary-polyfills.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-polyfills.md -->","docs/rules/no-unnecessary-slice-end.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-slice-end.md -->","docs/rules/no-unnecessary-splice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-splice.md -->","docs/rules/no-unnecessary-string-trim.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-string-trim.md -->","docs/rules/no-unreadable-array-destructuring.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-array-destructuring.md -->","docs/rules/no-unreadable-for-of-expression.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-for-of-expression.md -->","docs/rules/no-unreadable-iife.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-iife.md -->","docs/rules/no-unreadable-new-expression.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-new-expression.md -->","docs/rules/no-unreadable-object-destructuring.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-object-destructuring.md -->","docs/rules/no-unsafe-buffer-conversion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-buffer-conversion.md -->","docs/rules/no-unsafe-dom-html.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-dom-html.md -->","docs/rules/no-unsafe-json-serialization.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-json-serialization.md -->","docs/rules/no-unsafe-promise-all-settled-values.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-promise-all-settled-values.md -->","docs/rules/no-unsafe-property-key.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-property-key.md -->","docs/rules/no-unsafe-sqlite-interpolation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-sqlite-interpolation.md -->","docs/rules/no-unsafe-string-replacement.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-string-replacement.md -->","docs/rules/no-unused-builtin-method-return.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unused-builtin-method-return.md -->","docs/rules/no-unused-iterator-helper.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unused-iterator-helper.md -->","docs/rules/no-unused-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unused-properties.md -->","docs/rules/no-url-in-search-params.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-url-in-search-params.md -->","docs/rules/no-useless-boolean-cast.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-boolean-cast.md -->","docs/rules/no-useless-coercion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-coercion.md -->","docs/rules/no-useless-collection-argument.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-collection-argument.md -->","docs/rules/no-useless-compound-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-compound-assignment.md -->","docs/rules/no-useless-concat.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-concat.md -->","docs/rules/no-useless-continue.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-continue.md -->","docs/rules/no-useless-delete-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-delete-check.md -->","docs/rules/no-useless-else.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-else.md -->","docs/rules/no-useless-error-capture-stack-trace.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-error-capture-stack-trace.md -->","docs/rules/no-useless-fallback-in-spread.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-fallback-in-spread.md -->","docs/rules/no-useless-iterator-to-array.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-iterator-to-array.md -->","docs/rules/no-useless-length-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-length-check.md -->","docs/rules/no-useless-logical-operand.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-logical-operand.md -->","docs/rules/no-useless-override.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-override.md -->","docs/rules/no-useless-promise-resolve-reject.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-promise-resolve-reject.md -->","docs/rules/no-useless-re-export.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-re-export.md -->","docs/rules/no-useless-recursion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-recursion.md -->","docs/rules/no-useless-set-construction.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-set-construction.md -->","docs/rules/no-useless-spread.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-spread.md -->","docs/rules/no-useless-switch-case.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-switch-case.md -->","docs/rules/no-useless-template-literals.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-template-literals.md -->","docs/rules/no-useless-undefined.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-undefined.md -->","docs/rules/no-using-resource-escape.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-using-resource-escape.md -->","docs/rules/no-xor-as-exponentiation.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-xor-as-exponentiation.md -->","docs/rules/no-zero-fractions.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-zero-fractions.md -->","docs/rules/number-literal-case.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fnumber-literal-case.md -->","docs/rules/numeric-separators-style.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fnumeric-separators-style.md -->","docs/rules/operator-assignment.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Foperator-assignment.md -->","docs/rules/prefer-abort-signal-any.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-abort-signal-any.md -->","docs/rules/prefer-abort-signal-timeout.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-abort-signal-timeout.md -->","docs/rules/prefer-add-event-listener-options.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-add-event-listener-options.md -->","docs/rules/prefer-add-event-listener.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-add-event-listener.md -->","docs/rules/prefer-aggregate-error.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-aggregate-error.md -->","docs/rules/prefer-array-find.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-find.md -->","docs/rules/prefer-array-flat-map.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-flat-map.md -->","docs/rules/prefer-array-flat.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-flat.md -->","docs/rules/prefer-array-from-async.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-from-async.md -->","docs/rules/prefer-array-from-map.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-from-map.md -->","docs/rules/prefer-array-from-range.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-from-range.md -->","docs/rules/prefer-array-index-of.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-index-of.md -->","docs/rules/prefer-array-iterable-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-iterable-methods.md -->","docs/rules/prefer-array-last-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-last-methods.md -->","docs/rules/prefer-array-slice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-slice.md -->","docs/rules/prefer-array-some.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-some.md -->","docs/rules/prefer-at.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-at.md -->","docs/rules/prefer-await.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-await.md -->","docs/rules/prefer-bigint-literals.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-bigint-literals.md -->","docs/rules/prefer-blob-reading-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-blob-reading-methods.md -->","docs/rules/prefer-block-statement-over-iife.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-block-statement-over-iife.md -->","docs/rules/prefer-boolean-return.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-boolean-return.md -->","docs/rules/prefer-class-fields.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-class-fields.md -->","docs/rules/prefer-classlist-toggle.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-classlist-toggle.md -->","docs/rules/prefer-code-point.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-code-point.md -->","docs/rules/prefer-combined-guards.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-combined-guards.md -->","docs/rules/prefer-continue.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-continue.md -->","docs/rules/prefer-date-now.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-date-now.md -->","docs/rules/prefer-default-parameters.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-default-parameters.md -->","docs/rules/prefer-direct-iteration.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-direct-iteration.md -->","docs/rules/prefer-dispose.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dispose.md -->","docs/rules/prefer-dom-node-append.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-append.md -->","docs/rules/prefer-dom-node-html-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-html-methods.md -->","docs/rules/prefer-dom-node-remove.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-remove.md -->","docs/rules/prefer-dom-node-replace-children.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-replace-children.md -->","docs/rules/prefer-dom-node-text-content.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-text-content.md -->","docs/rules/prefer-early-return.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-early-return.md -->","docs/rules/prefer-else-if.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-else-if.md -->","docs/rules/prefer-error-is-error.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-error-is-error.md -->","docs/rules/prefer-escaped-irregular-whitespace.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-escaped-irregular-whitespace.md -->","docs/rules/prefer-event-target.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-event-target.md -->","docs/rules/prefer-export-from.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-export-from.md -->","docs/rules/prefer-flat-math-min-max.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-flat-math-min-max.md -->","docs/rules/prefer-get-or-insert-computed.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-get-or-insert-computed.md -->","docs/rules/prefer-global-number-constants.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-global-number-constants.md -->","docs/rules/prefer-global-this.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-global-this.md -->","docs/rules/prefer-group-by.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-group-by.md -->","docs/rules/prefer-has-check.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-has-check.md -->","docs/rules/prefer-hoisting-branch-code.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-hoisting-branch-code.md -->","docs/rules/prefer-https.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-https.md -->","docs/rules/prefer-identifier-import-export-specifiers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-identifier-import-export-specifiers.md -->","docs/rules/prefer-import-meta-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-import-meta-properties.md -->","docs/rules/prefer-includes-over-repeated-comparisons.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-includes-over-repeated-comparisons.md -->","docs/rules/prefer-includes.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-includes.md -->","docs/rules/prefer-iterable-in-constructor.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterable-in-constructor.md -->","docs/rules/prefer-iterator-concat.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-concat.md -->","docs/rules/prefer-iterator-helpers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-helpers.md -->","docs/rules/prefer-iterator-to-array-at-end.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-to-array-at-end.md -->","docs/rules/prefer-iterator-to-array.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-to-array.md -->","docs/rules/prefer-iterator-zip.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-zip.md -->","docs/rules/prefer-json-import.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-json-import.md -->","docs/rules/prefer-keyboard-event-key.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-keyboard-event-key.md -->","docs/rules/prefer-literal-ascii.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-literal-ascii.md -->","docs/rules/prefer-location-assign.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-location-assign.md -->","docs/rules/prefer-logical-operator-over-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-logical-operator-over-ternary.md -->","docs/rules/prefer-map-from-entries.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-map-from-entries.md -->","docs/rules/prefer-math-abs.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-abs.md -->","docs/rules/prefer-math-constants.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-constants.md -->","docs/rules/prefer-math-min-max.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-min-max.md -->","docs/rules/prefer-math-trunc.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-trunc.md -->","docs/rules/prefer-minimal-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-minimal-ternary.md -->","docs/rules/prefer-modern-dom-apis.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-modern-dom-apis.md -->","docs/rules/prefer-modern-math-apis.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-modern-math-apis.md -->","docs/rules/prefer-module.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-module.md -->","docs/rules/prefer-native-coercion-functions.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-native-coercion-functions.md -->","docs/rules/prefer-negative-index.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-negative-index.md -->","docs/rules/prefer-node-protocol.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-node-protocol.md -->","docs/rules/prefer-number-coercion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-number-coercion.md -->","docs/rules/prefer-number-is-safe-integer.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-number-is-safe-integer.md -->","docs/rules/prefer-number-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-number-properties.md -->","docs/rules/prefer-object-define-properties.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-define-properties.md -->","docs/rules/prefer-object-destructuring-defaults.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-destructuring-defaults.md -->","docs/rules/prefer-object-from-entries.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-from-entries.md -->","docs/rules/prefer-object-iterable-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-iterable-methods.md -->","docs/rules/prefer-observer-apis.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-observer-apis.md -->","docs/rules/prefer-optional-catch-binding.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-optional-catch-binding.md -->","docs/rules/prefer-path2d.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-path2d.md -->","docs/rules/prefer-private-class-fields.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-private-class-fields.md -->","docs/rules/prefer-promise-static-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-promise-static-methods.md -->","docs/rules/prefer-promise-try.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-promise-try.md -->","docs/rules/prefer-promise-with-resolvers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-promise-with-resolvers.md -->","docs/rules/prefer-prototype-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-prototype-methods.md -->","docs/rules/prefer-query-selector.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-query-selector.md -->","docs/rules/prefer-queue-microtask.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-queue-microtask.md -->","docs/rules/prefer-reflect-apply.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-reflect-apply.md -->","docs/rules/prefer-regexp-escape.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-regexp-escape.md -->","docs/rules/prefer-regexp-test.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-regexp-test.md -->","docs/rules/prefer-response-static-json.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-response-static-json.md -->","docs/rules/prefer-scoped-selector.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-scoped-selector.md -->","docs/rules/prefer-set-has.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-set-has.md -->","docs/rules/prefer-set-methods.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-set-methods.md -->","docs/rules/prefer-set-size.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-set-size.md -->","docs/rules/prefer-short-arrow-method.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-short-arrow-method.md -->","docs/rules/prefer-short-escape-sequences.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-short-escape-sequences.md -->","docs/rules/prefer-simple-condition-first.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-simple-condition-first.md -->","docs/rules/prefer-simple-sort-comparator.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-simple-sort-comparator.md -->","docs/rules/prefer-simplified-conditions.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-simplified-conditions.md -->","docs/rules/prefer-single-array-predicate.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-array-predicate.md -->","docs/rules/prefer-single-call.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-call.md -->","docs/rules/prefer-single-object-destructuring.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-object-destructuring.md -->","docs/rules/prefer-single-replace.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-replace.md -->","docs/rules/prefer-smaller-scope.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-smaller-scope.md -->","docs/rules/prefer-split-limit.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-split-limit.md -->","docs/rules/prefer-spread.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-spread.md -->","docs/rules/prefer-string-match-all.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-match-all.md -->","docs/rules/prefer-string-pad-start-end.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-pad-start-end.md -->","docs/rules/prefer-string-raw.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-raw.md -->","docs/rules/prefer-string-repeat.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-repeat.md -->","docs/rules/prefer-string-replace-all.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-replace-all.md -->","docs/rules/prefer-string-slice.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-slice.md -->","docs/rules/prefer-string-starts-ends-with.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-starts-ends-with.md -->","docs/rules/prefer-string-trim-start-end.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-trim-start-end.md -->","docs/rules/prefer-structured-clone.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-structured-clone.md -->","docs/rules/prefer-switch.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-switch.md -->","docs/rules/prefer-temporal-conversion.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-temporal-conversion.md -->","docs/rules/prefer-temporal.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-temporal.md -->","docs/rules/prefer-ternary.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-ternary.md -->","docs/rules/prefer-then-catch.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-then-catch.md -->","docs/rules/prefer-toggle-attribute.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-toggle-attribute.md -->","docs/rules/prefer-top-level-await.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-top-level-await.md -->","docs/rules/prefer-type-error.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-type-error.md -->","docs/rules/prefer-type-literal-last.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-type-literal-last.md -->","docs/rules/prefer-uint8array-base64.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-uint8array-base64.md -->","docs/rules/prefer-uint8array-hex.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-uint8array-hex.md -->","docs/rules/prefer-unary-minus.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-unary-minus.md -->","docs/rules/prefer-unicode-code-point-escapes.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-unicode-code-point-escapes.md -->","docs/rules/prefer-url-can-parse.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-url-can-parse.md -->","docs/rules/prefer-url-href.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-url-href.md -->","docs/rules/prefer-url-search-parameters.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-url-search-parameters.md -->","docs/rules/prefer-while-loop-condition.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-while-loop-condition.md -->","docs/rules/relative-url-style.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frelative-url-style.md -->","docs/rules/require-array-join-separator.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-array-join-separator.md -->","docs/rules/require-array-sort-compare.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-array-sort-compare.md -->","docs/rules/require-css-escape.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-css-escape.md -->","docs/rules/require-frontmatter-fields.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-frontmatter-fields.md -->","docs/rules/require-module-attributes.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-module-attributes.md -->","docs/rules/require-module-specifiers.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-module-specifiers.md -->","docs/rules/require-number-to-fixed-digits-argument.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-number-to-fixed-digits-argument.md -->","docs/rules/require-passive-events.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-passive-events.md -->","docs/rules/require-post-message-target-origin.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-post-message-target-origin.md -->","docs/rules/require-proxy-trap-boolean-return.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-proxy-trap-boolean-return.md -->","docs/rules/require-text-decoder-streaming.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-text-decoder-streaming.md -->","docs/rules/single-line-block-comment-style.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fsingle-line-block-comment-style.md -->","docs/rules/string-content.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fstring-content.md -->","docs/rules/switch-case-braces.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fswitch-case-braces.md -->","docs/rules/switch-case-break-position.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fswitch-case-break-position.md -->","docs/rules/template-indent.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Ftemplate-indent.md -->","docs/rules/text-encoding-identifier-case.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Ftext-encoding-identifier-case.md -->","docs/rules/throw-new-error.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fthrow-new-error.md -->","docs/rules/try-complexity.md":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Ftry-complexity.md -->"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Agents\n\n## Philosophy\n\nKeep rules simple. Target common patterns, skip rare edge cases rather than overcomplicating the rule.\n\n### Out of scope\n\nThese constructs are intentionally unsupported. Do not add machinery to handle them:\n\n- **`Array` subclasses** — Receiver checks treat `new Foo()` as non-array, so `class Foo extends Array {}` is missed. Do not add class heritage resolution for this. (`Error` subclasses are different: `createTypeCheckers` resolves class heritage by default.)\n- **Shadowed built-ins** — Receiver checks may recognize built-ins by name without resolving scope. Do not add scope resolution for shadowed constructors.\n- **BigInt typed-array chains** — Only direct constructors, static `.from()`/`.of()`, and explicit types are recognized. Do not add flow analysis for method chains.\n\n## Rule anatomy\n\nRules export a default config object with `create` and `meta`. The `create` function uses `context.on(NodeType, listener)` to register visitors (this is the Unicorn-specific API, not standard ESLint). See the [ESLint custom rules guide](https://eslint.org/docs/latest/extend/custom-rules) for the underlying API.\n\nKey differences from standard ESLint:\n\n- Use `context.on('NodeType', listener)` and `context.onExit('NodeType', listener)` instead of returning a visitor object.\n- Listeners return or yield problem objects (`{node, messageId, fix, suggest, data}`) directly. The adapter calls `context.report()` for you.\n- Fix functions receive `(fixer, {abort})`. Call `abort()` to bail out of an unfixable case.\n\n```js\nconst MESSAGE_ID = 'rule-name';\n\nconst messages = {\n\t[MESSAGE_ID]: 'Error message with {{placeholder}}.',\n};\n\n/** @param {import('eslint').Rule.RuleContext} context */\nconst create = context => {\n\tcontext.on('CallExpression', node => {\n\t\treturn {\n\t\t\tnode,\n\t\t\tmessageId: MESSAGE_ID,\n\t\t\tdata: {placeholder: 'value'},\n\t\t\tfix: fixer => fixer.replaceText(node, 'replacement'),\n\t\t};\n\t});\n};\n\n/** @type {import('eslint').Rule.RuleModule} */\nconst config = {\n\tcreate,\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Enforce …',\n\t\t\trecommended: true, // 'unopinionated' (safest, in both presets), true (in recommended only), or false (opt-in)\n\t\t},\n\t\tfixable: 'code', // or omit; add hasSuggestions: true for suggestions\n\t\tschema: [],\n\t\tdefaultOptions: [{option: 'default'}], // merged automatically\n\t\tmessages,\n\t},\n};\nexport default config;\n```\n\nOptions are accessed via `context.options[0]`. Use `meta.defaultOptions` for defaults (no manual merging).\n\n### `recommended` config level\n\n`meta.docs.recommended` picks the preset that enables the rule. `'unopinionated'` does NOT mean \"too opinionated\" — it means the opposite:\n\n- **`'unopinionated'`** — Uncontroversial; in both `unopinionated` and `recommended` (the former is a subset). Safest bucket and the default for new rules.\n- **`true`** — A more opinionated call, still on by default. In `recommended` only.\n- **`false`** — Off by default, only in `all`. For niche or opt-in rules.\n\n| `recommended` | `unopinionated` | `recommended` config | `all` |\n|---|---|---|---|\n| `'unopinionated'` | on | on | on |\n| `true` | off | on | on |\n| `false` (or omitted) | off | off | on |\n\nSo a rule too opinionated or niche for broad use is `false`, never `'unopinionated'`. If unsure which level fits, share your recommendation and ask.\n\nName boolean options in the positive `check*` form (for example, `checkProperties`), never the negated `ignore*`/`skip*` form, so option naming stays consistent across rules. This does not apply to array/pattern options like `ignore` (a list of patterns to ignore), which follow ESLint's own conventions.\n\n### Helper naming\n\nName helpers after what they return or do:\n\n- `is*`/`has*`/`should*`/`can*`/`needs*` must return booleans. Prefer explicit `false` over `undefined` in predicate helpers.\n- `get*Problem` returns one problem object or `undefined`; `get*Problems` returns/yields multiple problem objects.\n- `report*` should call `context.report()` directly.\n- Avoid `check*` for private helpers. Reserve `check*` for public boolean options, like `checkProperties`.\n- Do not combine reporting/yielding with a predicate return. Split into a problem builder and a boolean at the call site.\n\n## Rule languages\n\nEvery new rule should declare the official [`meta.languages`](https://eslint.org/docs/latest/extend/custom-rules#rule-languages) field, in `\"plugin/language\"` form, one per line: `['js/js']` for JavaScript/TypeScript-only rules (most), or the languages it supports (for example `['js/js', 'css/css']`, or `['*']` for any file type).\n\nAvailable identifiers:\n\n- `js/js` — JavaScript and TypeScript\n- `css/css` — [`@eslint/css`](https://github.com/eslint/css)\n- `json/json`, `json/jsonc`, `json/json5` — [`@eslint/json`](https://github.com/eslint/json)\n- `markdown/commonmark`, `markdown/gfm` — [`@eslint/markdown`](https://github.com/eslint/markdown)\n- `html/html` — [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint)\n- `toml/toml`: [`eslint-plugin-toml`](https://github.com/ota-meshi/eslint-plugin-toml)\n- `yml/yaml` — [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml)\n\nMost rules visit JavaScript AST nodes, so `js/js` is all they can support. But when a rule's logic is language-agnostic (filename, raw text, comments, or disable directives), support as many languages as is feasible. Root node types differ per language (`Program` for JS/TS, HTML, TOML, and YAML, `StyleSheet` for CSS, `Document` for JSON, `root` for Markdown), so use `onRoot(context, listener)` to run on every root and `getComments(context)` for cross-language comments (both from `rules/utils/`). For reference, see `prefer-https` (`['*']`, raw-text scan) and `no-empty-file` (per-language root handlers).\n\nCSS-only rules (`['css/css']`) belong in [`eslint-cssicorn`](https://github.com/sindresorhus/eslint-cssicorn), not here.\n\n### TOML\n\n- The `Program` body always contains a `TOMLTopLevelTable`, even in empty files. Its `body` contains key/value pairs and table declarations; an empty named table counts as content.\n- `TOMLValue` nodes distinguish strings, integers, floats, and dates/times through `kind`. Read numeric source text to preserve precision and signs; skip `inf` and `nan` when grouping digits. Do not convert `1.0` to `1`, which changes the TOML type.\n- The parser exposes `#` comments as `Block` nodes. Use `getComments(context)` and preserve `#` when fixing comments. `sourceCode.parserServices?.isTOML` identifies TOML.\n- Basic strings and basic quoted keys interpret escapes; literal strings do not. `escape-case` demonstrates escape-preserving edits. `string-content` checks decoded string values only, leaves keys unchanged, and writes double-quoted basic strings. Its serializer uses `JSON.stringify()` plus DEL escaping and skips fixes for unpaired surrogates.\n- Use `languages.toml` from `test/utils/test.js` in snapshot cases. For regular rule-tester tests, use `language: languages.toml.language` and `plugins: languages.toml.plugins`. Test fixes and suggestions with the TOML parser, including literal/multiline strings and comments.\n\n## Reusable utilities\n\n`../eslint-node-test` adapts its infrastructure (rule adapter, snapshot test harness, doc generation) from this plugin. When changing shared patterns here (rule anatomy, testing conventions, autofix rules), consider whether the equivalent should be ported over there.\n\n`../eslint-cssicorn` shares CSS rule utilities with this plugin (for example, `rules/shared/css-shorthand-properties.js`). Keep them in sync: when you change a CSS utility in one plugin, make the same change in the other.\n\nBefore writing helpers, check these directories:\n\n- **`rules/ast/`** - AST node type checks: `isMethodCall`, `isCallExpression`, `isMemberExpression`, `isFunction`, `isStringLiteral`, etc.\n- **`rules/utils/`** - General utilities: `needsSemicolon`, parenthesis helpers (`shouldAddParenthesesToMemberExpressionObject`, etc.), `isNodeMatches`, `getCallExpressionTokens`, `isSameReference`, `getReferences`, etc.\n- **`rules/fix/`** - Fixer helpers: `removeArgument`, `removeMethodCall`, `replaceArgument`, `replaceReferenceIdentifier`, `removeParentheses`, `replaceTemplateElement`, `switchCallExpressionToNewExpression`, etc.\n- **`rules/shared/`** - Shared rule logic for rules that share patterns (e.g., `simple-array-search-rule.js`).\n\nImport from the barrel `index.js` in each directory (e.g., `import {isMethodCall} from './ast/index.js'`).\n\nWhen matching a string's value, use `getStaticStringValue()` so quoted strings and untagged template literals without expressions behave the same. Check against `undefined` when empty strings are supported. Keep `isStringLiteral()` and literal node checks for syntax-specific behavior, such as quotes, escapes, directives, and static import/export sources. Audit fixers separately: template nodes have no `.value` or `.raw`, and generated quoted strings must escape the decoded value.\n\nAlso check `../eslint-node-test/rules/ast/`, `../eslint-node-test/rules/utils/`, and `../eslint-node-test/rules/fix/` — some helpers there were adapted from here and may have picked up fixes or edge cases worth porting back.\n\nWhen at least two rules need the same non-trivial logic, put it in a shared utility (`rules/utils/` for general helpers, `rules/shared/` for shared rule logic) and use it from each rule instead of duplicating it. This also applies when you write logic that an existing rule already has: extract it from that rule and use it in both. Keep trivial or rule-specific helpers local.\n\nAlso use `@eslint-community/eslint-utils` for helpers like `findVariable`, `getStaticValue`, `hasSideEffect`, `getPropertyName`, and token predicates (`isCommaToken`, `isSemicolonToken`, etc.).\n\nMost commonly used utilities:\n\n- **`isMethodCall`** - The most used helper. Check if a node is a method call matching specific criteria.\n- **`isParenthesized`**, **`getParenthesizedRange`** (from `rules/utils/`) - Handle extra parentheses around nodes.\n- **`needsSemicolon`** - Check if a semicolon is needed before a replacement.\n- **`isValueNotUsable`** - Check if a call expression's return value is unused (safe to change behavior).\n- **`hasSideEffect`** (from `@eslint-community/eslint-utils`) - Check if a node has side effects, important for safe autofixes.\n- **`findVariable`** (from `@eslint-community/eslint-utils`) - Resolve a variable's scope binding.\n- **`getStaticValue`** (from `@eslint-community/eslint-utils`) - Get a node's static value at lint time.\n- **`fixSpaceAroundKeyword`**, **`removeMethodCall`**, **`removeArgument`** - Common fix helpers.\n\n## Code path analysis\n\nUse [ESLint's code path analysis API](https://eslint.org/docs/latest/extend/code-path-analysis) when a rule needs to know whether control flow always exits a branch or function body (e.g., via `return`, `throw`, `break`, `continue`, exhaustive `switch`, infinite loop). CPA is more accurate than manual AST walking because it handles complex constructs like `try`/`catch`/`finally`, labeled breaks, and unreachable code after infinite loops.\n\nWhen to use CPA instead of manual AST walking:\n\n- **Checking if an `if` branch always exits** — Use `trackBranchExits` from `rules/utils/`. It registers CPA event listeners and returns a predicate `(branch) => boolean`. Query it after the `IfStatement` has exited (use `context.onExit`). Used by `no-useless-else`, `no-declarations-before-early-exit`, `prefer-else-if`.\n- **Checking if a function body always exits** — Track segments per code path using `onCodePathStart`/`onCodePathEnd`/`onCodePathSegmentStart`/`onCodePathSegmentEnd`/`onUnreachableCodePathSegmentStart`/`onUnreachableCodePathSegmentEnd`. Snapshot segment reachability at `BlockStatement:exit` for function bodies (before code path segments end). See `require-proxy-trap-boolean-return` for the pattern.\n\nKey implementation notes:\n\n- Use a **per-code-path segment stack** (`segmentSetStack`) so nested functions don't pollute the enclosing path's state.\n- When checking CPA data from a parent node, use `context.onExit` (not `context.on`) so inner code paths have been fully analyzed.\n- At `onCodePathEnd`, all segments have already ended, so `currentSegments()` is empty. Snapshot reachability at the AST node exit (e.g., `BlockStatement:exit`) instead.\n- `trackBranchExits` uses a `prevSegments`-based check: a branch \"falls through\" if any post-if merge segment has a `prevSegment` in the branch's terminal segment set.\n\nWhen NOT to use CPA:\n\n- Simple last-statement checks (e.g., \"does the last statement return?\") — just check `node.type`.\n- Collecting return statements or associating them with functions — a simple function stack or AST walk is fine.\n- Fixer logic that only needs to know \"return or throw\" in the last position — no CPA needed.\n\n## Auto-generated files\n\n- **`rules/index.js`** is auto-generated. Never edit it by hand. Run `npm run create-rules-index-file` to regenerate after adding or removing rules.\n- **Non-JavaScript language table** in `readme.md` is generated from `meta.languages`. Run `npm run fix:non-js-languages` after changing language support; add new language columns in `scripts/create-non-js-languages-list.js`.\n- **Doc headers** in `docs/rules/<rule>.md` (everything above `<!-- end auto-generated rule header -->`) are auto-generated by `eslint-doc-generator`. Do not edit them. Run `npm run fix:eslint-docs` to update.\n\nOn rebase, `rules/index.js` and the `readme.md` rules table almost always conflict because other rules were added meanwhile. Don't hand-resolve `rules/index.js` — take either side, then run `npm run create-rules-index-file`. For `readme.md`, keep both rows and re-sort the table alphabetically.\n\n## Documentation\n\nKeep rule documentation succinct, especially sections about limitations and caveats. Focus on practical information users need to understand and use the rule.\n\nDo not use Markdown tables in rule documentation. Use prose, lists, or code examples instead.\n\nUse JavaScript syntax for configuration examples, not JSON-style quoted keys and strings, unless the example is specifically JSON.\n\nFor rule documentation examples, prefer one failing (`// ❌`) example followed by one corresponding passing (`// ✅`) example in each code block whenever possible. Use separate blocks for distinct cases instead of grouping all failing and passing examples together.\n\n## Testing\n\nTests should be comprehensive with many edge cases, but no duplicate coverage. Add lots of focused edge-case tests for matching and fixes/suggestions. Add tests for edge cases the rule intentionally ignores to document the behavior.\n\nTests use the built-in `node:test` runner. Prefer `test.snapshot()` which auto-generates snapshots for errors, fixes, and suggestions:\n\n```js\nimport {getTester} from './utils/test.js';\nconst {test} = getTester(import.meta);\n\ntest.snapshot({\n\tvalid: ['validCode'],\n\tinvalid: ['invalidCode'],\n});\n```\n\nOther test modes: `test.typescript()` and `test.vue()` set the parser for all cases in the block. For individual TypeScript cases within a normal `test.snapshot()`, use `{code, parser: parsers.typescript}` instead. Import `parsers` from `./utils/test.js`.\n\n- **Never run integration tests** (`test/integration/test.js`). They are too slow for development.\n- **While developing, only run targeted tests**: `node --test test/rule-name.js`. Do not run `npm test` or the full suite until all changes are complete.\n- **Only run the full test suite (`npm test`) once at the very end** to confirm everything passes.\n- **For new rules, run dogfooding before pushing**: `npm run run-rules-on-codebase`. Re-run it after each fix — fixes to rule logic often surface new violations elsewhere. Delete any scratch files first (e.g. in `.ai-temporary/`), or the dogfooding run lints them too.\n- Create or update snapshots: `node --test --test-update-snapshots test/rule-name.js`. A new snapshot case fails until you do this. Snapshots are saved in `test/snapshots/rule-name.js.snapshot`.\n- Focus a single case: wrap with `test.only('code')` or `test.only({code, options})`, and run with `node --test --test-only test/rule-name.js` (remove before committing). Never update snapshots while `only` is used: the update rewrites the whole snapshot file, so the snapshots of the skipped cases are deleted.\n- Use `t.assert.*` inside tests, with the strict methods (`strictEqual`, `deepStrictEqual`), because `t.assert` is loose mode. Helpers outside tests import `node:assert/strict`.\n- For non-snapshot tests, use `test()` with explicit `errors` and `output`\n\n### Edge cases to test\n\nInclude test cases for these when relevant to the rule:\n\n- **TypeScript** - Type assertions (`foo as Bar`, `<Bar>foo`), non-null assertions (`foo!`), `satisfies`, generics. Verify both matching and fixer/suggestion output, including optional chaining behavior and ASI protection when the output can start with `(` or `[`. Use `{code, parser: parsers.typescript}`. For rules that use type information (e.g. `isBoolean`, `parserServices.getTypeAtLocation`), test three tiers where it makes sense: plain JS, TS with only type annotations (syntax-only, via `parsers.typescript`), and TS with full type info (via the `typeAware` helper with `projectService: {allowDefaultProject: ['*.ts']}`). See `test/no-unsafe-property-key.js` for the `typeAware` pattern.\n- **JSX** - JSX expressions and fragments, if the rule targets patterns that can appear in JSX.\n- **Comments** - Inline and block comments inside the targeted node, to verify fixes don't drop them.\n- **Parenthesized expressions** - Extra parentheses around the target: `(foo).bar()`.\n- **Nested/chained** - The pattern appearing inside other expressions or chained calls.\n- **Computed properties** - `obj[method]()` vs `obj.method()`.\n- **Tagged templates** - `` tag`string` ``.\n- **Template literals without expressions** - Test quoted and backtick forms wherever matching depends on a string's value, including mixed forms, escaped values, and empty strings. Test interpolated and tagged templates separately; they are not static strings.\n- **Optional chaining** - `foo?.bar()`, `foo?.bar?.baz`.\n- **Spread** - `[...foo]`, `{...foo}`, `fn(...args)`.\n- **Destructuring** - The pattern inside destructuring assignments or parameters.\n- **Return value used vs unused** - `const x = foo.bar()` vs `foo.bar()` as a statement. Some fixes are only safe when the return value is unused (see `isValueNotUsable`).\n\n## Linting\n\nCI lints with **ESLint**, not `xo` — a clean `npx xo` run does not mean CI passes.\n\nRun `npm run fix` (or `npm run fix:js` for JS only) — it auto-fixes and reports whatever remains. Prefer it over hand-fixing errors one at a time.\n\nLint enforces single quotes (`avoidEscape: false`, no template literals). Don't write backtick strings in test cases unless you need interpolation — `--fix` can't convert a backtick string that contains a `'`, so you'd have to fix it by hand.\n\n## Autofix\n\nAlways try to provide an autofix if it cannot change runtime behavior. If an autofix could change runtime behavior, try to provide a suggestion instead.\n\nDo not complicate autofixes to handle shadowed built-in globals like `Number`, `Math`, `parseInt`, or `parseFloat`. Treat that as unsupported unless the rule already has a simple, local scope-safety check for another reason.\n\nDo not complicate autofixes to preserve Proxy or accessor side effects. Treat that as unsupported.\n\nDo not block reports, suggestions, or autofixes only to preserve sparse array holes. Treat array holes as unsupported.\n\nDo not turn all of a rule's autofixes into suggestions because of a rare evaluation-order case. These cases are unsupported: temporal dead zone reads, `valueOf`/`toString` coercion order, and when a side-effect-free expression is evaluated. Keep the autofix for the common pure form (for example `new Set([...x])`, `array.some(x => x === value)`, or a pure inline callback). Use a suggestion only when a real side effect can change the result, such as a call, assignment, update, `await`, `yield`, or a callback that is not proven pure. When a fix changes evaluation order, add a test that proves the most common form of the pattern is still autofixed.\n\nWhen writing fix functions:\n\n1. **Comments** - Keep reporting unless comments affect rule semantics; let ESLint handle disable directives. Withhold edits that remove or move comments using `getCommentSafeProblem()` or `abort()`. Preserve safe token edits.\n2. **Parentheses** - Replacing `foo` in `foo.bar()` with a complex expression may need wrapping: `(a + b).bar()`. Use helpers from `rules/utils/` like `shouldAddParenthesesToMemberExpressionObject`.\n3. **Semicolons** - If a fix makes a statement start with `[` or `(`, check `needsSemicolon()` and prepend `;` if needed.\n4. **Spacing** - Replacing `{foo}` with an identifier may merge tokens: `const{foo}` becomes `constfoo`. Add spaces when a symbol-boundary becomes a letter-boundary.\n5. **Generator fixes** - Use `* fix(fixer) { yield ... }` for multi-step fixes.\n6. **Suggestions** - Use `suggest` array with `messageId` and `fix` when autofix could change runtime behavior. Set `hasSuggestions: true` in meta.\n7. **Indentation and line endings** - ESLint inserts fix text verbatim and does not re-indent it. Never hardcode `\\t` or `\\n` when building new lines. Use the helpers in `rules/utils/`: `getLineIndent(node, context)` for the indentation of the line a node is on, `getIndentUnit(context)` for one level of the file's indentation, `getLinebreak(context)` for the file's line ending, and `reindentText(text, sourceIndent, targetIndent)` to move multi-line text to another indentation. Test fixes with space-indented and CRLF input, not only tabs and LF.\n\n## Rule naming\n\nUse a clear prefix that signals intent (see [ESLint built-in rules](https://eslint.org/docs/latest/rules/) for inspiration):\n\n- **`no-`** - Disallow something: `no-array-reduce`, `no-await-in-promise-methods`\n- **`prefer-`** - Suggest a better alternative: `prefer-array-flat-map`, `prefer-set-has`\n- **`require-`** - Mandate something is present: `require-array-join-separator`\n- **`consistent-`** - Enforce a single consistent style: `consistent-destructuring`\n- **No prefix** - Enforce a specific pattern: `error-message`, `filename-case`, `throw-new-error`\n\nName after the target construct, not the fix. Be specific: `no-array-method-this-argument` not `no-this-argument`.\n\n## Creating a new rule\n\n1. Run `npm run create-rule` to scaffold the rule file, test file, and doc file. This also regenerates `rules/index.js` and updates doc headers.\n2. Write tests in `test/<rule>.js` before implementing the rule.\n3. Implement the rule in `rules/<rule>.js`.\n4. Write documentation in `docs/rules/<rule>.md` (below the auto-generated header).\n5. Run `node --test --test-update-snapshots test/<rule>.js` to create the snapshots, review them, then run `node --test test/<rule>.js` to verify tests pass.\n6. Before pushing, run lint (`npm run lint:js`, which runs `eslint` — see [Linting](#linting)), dogfooding (`npm run run-rules-on-codebase`), and then `npm test`. If dogfooding finds intentional internal patterns, disable the rule in `eslint.dogfooding.config.js` instead of adding repo-specific heuristics.\n\n## Commit message format\n\nFollow these conventions:\n\n- **New rule**: `` Add `rule-name` rule ``\n- **Fix/improve existing rule**: `` `rule-name`: Short description ``\n- **General fix**: `Fix short description`\n- **Add option to rule**: `` `rule-name`: Add `optionName` option ``\n- **Drop a rule**: `` Drop `rule-name` rule ``\n\nAlways use backticks around rule names and option names in commit messages.\n","isInternal":false,"tokens":5694,"sizeBytes":23727},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"AGENTS.md","isInternal":false,"tokens":3,"sizeBytes":9},{"name":"better-dom-traversing.md","path":"docs/rules/better-dom-traversing.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/better-dom-traversing.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# better-dom-traversing\n\n📝 Prefer better DOM traversal APIs.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPrefer more readable and robust DOM traversal APIs.\n\nUse named first-child properties instead of positional access, selectors instead of positional child traversal, `.closest()` instead of repeated parent traversal, and merged `.querySelector()` calls when static selectors can be combined.\n\nThis rule is syntax-based and reports common DOM traversal patterns. Suggestions are intentionally manual because the replacement can change behavior in some cases, such as `undefined` versus `null` for empty child collections, exact-depth parent traversal versus selector-based ancestor lookup, or chained `querySelector()` calls that only search inside the first matching element.\n\n`props.children` access is ignored because it is component data, not DOM traversal.\n\n## Examples\n\n```js\n// ❌\nelement.childNodes[0];\n\n// ✅\nelement.firstChild;\n```\n\n```js\n// ❌\nelement.children[0];\n\n// ✅\nelement.firstElementChild;\n```\n\n```js\n// ❌\nelement.children[2];\n\n// ✅\nelement.querySelector(':scope selector');\n```\n\n```js\n// ❌\nelement.parentElement.parentElement;\n\n// ✅\nelement.closest('selector');\n```\n\n```js\n// ❌\nelement.querySelector('a').querySelector('b');\n\n// ✅\nelement.querySelector(':scope a b');\n```\n","isInternal":false,"tokens":368,"sizeBytes":1689},{"name":"catch-error-name.md","path":"docs/rules/catch-error-name.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/catch-error-name.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# catch-error-name\n\n📝 Enforce a specific parameter name in catch clauses.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent name for caught errors across:\n\n- `try/catch` clauses\n- `.catch(…)` Promise handlers\n- `.then(…, rejectionHandler)` Promise handlers\n\nUsing one recognizable name makes error handlers easier to scan and avoids renaming the same concept across callback styles.\n\nThe desired parameter name is [configurable](#name), but defaults to `error`.\n\nThe following names are ignored:\n\n- `_`, but only if the error is not used.\n- Descriptive names, for example, `fsError` or `authError`.\n- Names matching [`options.ignore`](#ignore).\n\n## Examples\n\n```js\n// ❌\ntry {} catch (badName) {}\n\n// ✅\ntry {} catch (error) {}\n```\n\n```js\n// ❌\npromise.catch(badName => {});\n\n// ✅\npromise.catch(error => {});\n```\n\n```js\n// ❌\npromise.then(undefined, badName => {});\n\n// ✅\npromise.then(undefined, error => {});\n```\n\n```js\n// ❌\ntry {} catch (_) {\n\tconsole.log(_);\n}\n\n// ✅\n// Underscore is allowed when the error is not used\ntry {} catch (_) {\n\t// error is not used\n}\n```\n\n```js\n// ✅\n// Descriptive name is allowed\ntry {} catch (fsError) {}\n```\n\n```js\n// ✅\n// `error_` is allowed because of shadowed variables\ntry {} catch (error_) {\n\tconst error = new Error('🦄');\n}\n```\n\n## Options\n\n### name\n\nType: `string`\\\nDefault: `'error'`\n\nYou can set the `name` option like this:\n\n```js\n'unicorn/catch-error-name': [\n\t'error',\n\t{\n\t\tname: 'exception',\n\t},\n]\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nThis option lets you specify a regex pattern for matches to ignore.\n\nWhen a string is given, it's interpreted as a regular expression inside a string.\n\n```js\n'unicorn/catch-error-name': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'^error\\\\d*$',\n\t\t\t/^ignore/i,\n\t\t],\n\t},\n]\n```\n\nWith `^unicorn$`, this would fail:\n\n```js\ntry {} catch (pony) {}\n```\n\nAnd this would pass:\n\n```js\ntry {} catch (unicorn) {}\n```\n\n## Tip\n\nIn order to avoid shadowing in nested catch clauses, the auto-fix rule appends underscores to the identifier name.\n","isInternal":false,"tokens":686,"sizeBytes":2559},{"name":"class-reference-in-static-methods.md","path":"docs/rules/class-reference-in-static-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/class-reference-in-static-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# class-reference-in-static-methods\n\n📝 Enforce consistent class references in static methods.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces either dynamic static dispatch with `this` and `super`, or direct references with class names.\n\nChoosing one style makes it clear whether a static method is intended to follow subclass dispatch or stay tied to a specific class.\n\nBy default, it prefers `this` and `super`.\n\n## Examples\n\n```js\n// ❌\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tFoo.qux();\n\t\tBar.qux();\n\t}\n}\n\n// ✅\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tthis.qux();\n\t\tsuper.qux();\n\t}\n}\n```\n\nWith `{preferThis: false, preferSuper: false}`:\n\n```js\n// ❌\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tthis.qux();\n\t\tsuper.qux();\n\t}\n}\n\n// ✅\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tFoo.qux();\n\t\tBar.qux();\n\t}\n}\n```\n\n## Options\n\nType: `object`\n\n### preferThis\n\nType: `boolean`\\\nDefault: `true`\n\nPrefer `this` over the current class name in static methods.\n\n### preferSuper\n\nType: `boolean`\\\nDefault: `true`\n\nPrefer `super` over the superclass name in static methods.\n","isInternal":false,"tokens":408,"sizeBytes":1567},{"name":"comma-spacing.md","path":"docs/rules/comma-spacing.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/comma-spacing.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# comma-spacing\n\n📝 Enforce consistent spacing before and after commas in JSON and SOML.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces no whitespace before commas and exactly one ASCII space after commas on the same line in JSON, JSONC, and JSON5 using [`@eslint/json`](https://github.com/eslint/json), and in SOML using [`eslint-soml`](https://github.com/soml-lang/eslint-soml).\n\nPreserves line breaks and surrounding whitespace, including comma-first layouts. Ignores spacing after trailing commas directly before `]` or `}`, but still checks spacing before them.\n\nChecks spacing between commas and adjacent comments, preserving comment contents and whitespace beyond them. For example, `[1,/* comment */]` becomes `[1, /* comment */]`. Commas inside strings and comments are ignored.\n\nThis rule has no options and does not support `eslint-plugin-jsonc` languages.\n\nFor JavaScript and TypeScript, use [`@stylistic/comma-spacing`](https://eslint.style/rules/comma-spacing), which allows multiple spaces after commas.\n\n## Examples\n\n### Incorrect\n\n```json\n[1 ,2,  3]\n```\n\n```json\n{\"first\": 1,\"second\": 2}\n```\n\n### Correct\n\n```json\n[1, 2, 3]\n```\n\n```json\n{\"first\": 1, \"second\": 2}\n```\n\n```jsonc\n[1, /* Keep comment */2]\n```\n\n```json5\n[1, 2,]\n```\n","isInternal":false,"tokens":379,"sizeBytes":1496},{"name":"comment-content.md","path":"docs/rules/comment-content.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/comment-content.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# comment-content\n\n📝 Enforce better comment content.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces curated replacements in comments. It is useful for common name, brand, and acronym casing corrections such as `nodejs` → `Node.js`, and for project-specific prose preferences.\n\nThis rule is not a spellchecker. It only checks known replacement patterns.\n\nIt only reports one replacement per comment at a time.\n\nIt focuses on prose-like comment text and skips obvious non-prose regions such as code snippets, including commented-out multi-line code, links, paths, structured data, and command examples.\n\nText inside backticks is ignored, including fenced code blocks in block comments. Use backticks for literal commands and identifiers.\n\n```js\n// ✅\n// Run `git config --list`.\n```\n\nIn JSDoc comments, it skips structured tag syntax such as parameter names, type expressions, and symbol references, while continuing to check prose in tag descriptions.\n\n## Examples\n\n```js\n// ❌\n// nodejs uses javascript.\n\n// ✅\n// Node.js uses JavaScript.\n```\n\n```js\n// ❌\n// See the github issue.\n\n// ✅\n// See the GitHub issue.\n```\n\n```js\n// ❌\n// The application stores png files.\n\n// ✅\n// The app stores PNG files.\n```\n\n## Options\n\nType: `object`\n\n### checkUniformCase\n\nType: `boolean`\\\nDefault: `true`\n\nBy default, the rule re-cases matching tokens regardless of their case, including all-lowercase (`json`) and all-uppercase (`JSON`) ones.\n\nPass `checkUniformCase: false` to only correct tokens that already mix upper- and lower-case, such as `Github` → `GitHub`. All-lowercase and all-uppercase tokens are then left alone, as their casing is often intentional. Replacements that change the actual letters (such as `application` → `app`, or your own typo fixes) still apply regardless of case.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\tcheckUniformCase: false,\n\t},\n]\n```\n\n### replacements\n\nType: `object`\n\nYou can extend the default replacements by passing the `replacements` option.\n\nThe key is treated as a regex. By default, custom replacements are case-sensitive.\n\nDefault replacement patterns treat Unicode letters, marks, numbers, and underscores as part of a word. Custom patterns are used exactly as written.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\t'\\\\bteh\\\\b': 'the',\n\t\t\t'\\\\bto do\\\\b': {\n\t\t\t\treplacement: 'TODO',\n\t\t\t\tcaseSensitive: false,\n\t\t\t},\n\t\t\t'\\\\bnode\\\\.?js\\\\b': false,\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `extendDefaultReplacements: false` to override the default replacements completely.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\textendDefaultReplacements: false,\n\t\treplacements: {\n\t\t\t'\\\\bteh\\\\b': 'the',\n\t\t},\n\t},\n]\n```\n","isInternal":false,"tokens":729,"sizeBytes":2999},{"name":"consistent-arrow-return-style.md","path":"docs/rules/consistent-arrow-return-style.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-arrow-return-style.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-arrow-return-style\n\n📝 Enforce a consistent return style for multiline arrow function bodies.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUse concise bodies when the expression fits on one line and an explicit `return` when it spans multiple lines. A line break between `=>` and a single-line expression is ignored.\n\nOnly blocks with a single `return` and a single-line argument are converted. Blocks with other statements, bare returns, or multiline return expressions are ignored.\n\nFixes are omitted when reindenting could change string, template literal, or JSX text, or when removing the block could change how the following token is parsed.\n\nThis rule is an alternative to [`arrow-body-style`](https://eslint.org/docs/latest/rules/arrow-body-style). Do not enable both rules together.\n\n## Examples\n\n```js\n// ❌\nconst getValue = () => getValueFromServer(\n\turl,\n\toptions,\n);\n\n// ✅\nconst getValue = () => {\n\treturn getValueFromServer(\n\t\turl,\n\t\toptions,\n\t);\n};\n\n// ❌\nconst getValue = () => {\n\treturn value;\n};\n\n// ✅\nconst getValue = () => value;\n\n// ❌\nconst getObject = () => ({\n\tvalue,\n});\n\n// ✅\nconst getObject = () => {\n\treturn {\n\t\tvalue,\n\t};\n};\n\n// ❌ No fix: contains a comment.\nconst getValue = () => /* Keep this comment. */\n\tgetValueFromServer(\n\t\turl,\n\t\toptions,\n\t);\n```\n","isInternal":false,"tokens":359,"sizeBytes":1550},{"name":"consistent-assert.md","path":"docs/rules/consistent-assert.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-assert.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-assert\n\n📝 Enforce consistent assertion style with `node:assert`.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPrefer `assert.ok()` over `assert()` for its explicit intent and better readability. It aligns with other assert methods, ensuring consistency and making code easier to maintain and understand.\n\n## Examples\n\n```js\nimport assert from 'node:assert/strict';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n\n```js\nimport assert from 'node:assert';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n\n```js\nimport {strict as assert} from 'node:assert';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n","isInternal":false,"tokens":383,"sizeBytes":1454},{"name":"consistent-boolean-name.md","path":"docs/rules/consistent-boolean-name.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-boolean-name.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-boolean-name\n\n📝 Enforce consistent naming for boolean names.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nBy default, this rule checks boolean variables, parameters, and functions. Object, class, and TypeScript property and method names are ignored unless enabled with their respective options.\n\nEach `check*` option accepts one of these modes:\n\n- `always`: require prefixes for booleans and reject misleading prefixes on non-booleans.\n- `prohibit`: only reject misleading prefixes on non-booleans.\n- `never`: skip the occurrence entirely.\n\nBoolean names should start with a prefix that makes the boolean meaning clear.\n\nNames that start with a boolean prefix should also refer to booleans or boolean-returning functions. Unknown values are ignored.\n\nFunctions and callable type annotations returning `boolean`, `Promise<boolean>`, `PromiseLike<boolean>`, or unions of these are considered boolean-returning, whether or not the function is `async`.\n\nGetters returning promises are treated as non-boolean values.\n\nWhen type information is unavailable, a type annotation is needed to require prefixes for promise-returning functions.\n\nConfigured wrapper bindings may use boolean prefixes when a configured property or method provides a boolean-like value. This applies only to variables and parameters that are not reassigned.\n\nReports for property and method names, and reports for non-boolean values using boolean prefixes, do not provide rename suggestions.\n\nThe default prefixes are:\n\n- `is`\n- `are`\n- `has`\n- `have`\n- `can`\n- `should`\n- `was`\n- `were`\n- `does`\n- `did`\n- `will`\n- `requires`\n\nThe `do` prefix is excluded because it also starts action names like `doWork()`, which would then be reserved for boolean-like values. Use `doesChecksPass` instead of `doChecksPass`, or `didChecksPass` for a past result; identifiers need not follow English grammar. To allow `do`, set `prefixes: {do: true}`.\n\nThe plural prefixes (`are`, `have`, `were`) allow names for boolean collections, like `areFilesValid`.\n\nThe prefix must be a distinct word part. `isReady`, `is_ready`, and `IS_READY` are allowed, but `island` is not considered to have the `is` prefix.\n\nReact hook function bindings are checked after the required `use` prefix. For example, `useIsReady` is treated as a boolean hook name, while `useReady` is not. `ignore` patterns still match the original source name, like `useReady`.\n\nReact refs initialized with a boolean-like value may use boolean prefixes when the binding name ends in `Ref` or `Reference`, such as `isMountedRef`, `hasConsentRef`, or `hasConsentReference`. The suffix identifies the binding as a ref object. The binding must not be reassigned after initialization.\n\nDirect Vue `ref()` calls with boolean-like values and `computed()` calls with synchronous getters returning booleans may use boolean prefixes, such as `isBranch` or `hasDepartment`. The binding must not be reassigned after initialization. For refs returned by other calls, such as composables returning `ShallowRef<boolean>`, use type-aware [`wrappers`](#wrappers) with `{Ref: 'value'}`, which also covers `ComputedRef`.\n\nThis rule intentionally does not check destructuring bindings, imports, class names, or catch parameters.\n\nTypeScript type annotation checks resolve local type aliases and callable interfaces, including generic type parameters, but not qualified or namespaced type references.\n\nJSDoc `@type`, `@param`, and `@returns` annotations are supported without TypeScript configuration. Rename suggestions update matching `@param` names. Inference is best effort; advanced types, typedefs, and imports are not resolved.\n\nWithout TypeScript type information, nested generic alias resolution is best effort. Some finite nested instantiations may be treated as unknown.\n\nThis rule is only automatically fixable when a non-global, non-exported, non-ambient variable binding can be safely renamed to the first enabled prefix without adding a collision suffix. Other safe rename candidates are still provided as editor suggestions.\n\n## Examples\n\n```js\n// ❌\nconst completed = true;\n\n// ✅\nconst isCompleted = true;\n```\n\n```js\n// ❌\nconst hasName = 'Sindre';\n\n// ✅\nconst name = 'Sindre';\n```\n\n```js\n// ❌\nfunction hasTitle() {\n\treturn 'Unicorn';\n}\n\n// ✅\nfunction getTitle() {\n\treturn 'Unicorn';\n}\n```\n\n```js\n// ❌\nconst completed = progress === 100;\n\n// ✅\nconst hasCompleted = progress === 100;\n```\n\n```js\n// ❌\nconst completed = Boolean(value);\n\n// ✅\nconst isCompleted = Boolean(value);\n```\n\n```js\n// ❌\nfunction download(showProgress = false) {}\n\n// ✅\nfunction download(shouldShowProgress = false) {}\n```\n\n```js\n// ❌\n/** @param {boolean} showProgress */\nfunction download(showProgress) {}\n\n// ✅\n/** @param {boolean} shouldShowProgress */\nfunction download(shouldShowProgress) {}\n```\n\n```ts\n// ❌\nconst completed: boolean = true;\n\n// ✅\nconst isCompleted: boolean = true;\n```\n\n```js\n// ❌\nfunction completed() {\n\treturn true;\n}\n\n// ✅\nfunction isCompleted() {\n\treturn true;\n}\n```\n\n```ts\n// ❌\nfunction download(showProgress: boolean) {}\n\n// ✅\nfunction download(shouldShowProgress: boolean) {}\n```\n\n```js\n// ✅\n// Object fields are ignored unless `checkFields` is set to a mode other than `never`.\n// Methods and getters use `checkMethods`. Setter names are ignored because setters do not return values.\nconst task = {\n\tcompleted: progress === 100,\n};\n```\n\n## Options\n\n### checkVariables\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check variable names.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tcheckVariables: 'prohibit',\n\t},\n]\n```\n\nWith `checkVariables: 'prohibit'`, this would fail:\n\n```js\nconst hasName = 'Sindre';\n```\n\nAnd these would pass:\n\n```js\nconst completed = true;\nconst isCompleted = true;\n```\n\n### checkArguments\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check parameter names, including TypeScript constructor parameter properties. Setter parameters are ignored because their names are positional. For example, `checkArguments: 'never'` allows both forms:\n\n```js\nfunction download(showProgress = false) {}\nfunction download(shouldShowProgress = false) {}\n```\n\n### checkFunctions\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check function names.\n\n### checkMethods\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'never'`\n\nHow to check object and class methods, getters, and TypeScript method signatures. Setter names are ignored because setters do not return values.\n\n### checkFields\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'never'`\n\nHow to check object properties, class fields, TypeScript property signatures, and TypeScript constructor parameter properties. Constructor parameter properties are checked as both arguments and fields.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tcheckMethods: 'always',\n\t\tcheckFields: 'never',\n\t},\n]\n```\n\nWith the above config, this would fail:\n\n```js\nclass Task {\n\thasTitle() {\n\t\treturn 'Unicorn';\n\t}\n}\n```\n\nAnd this would pass:\n\n```js\nclass Task {\n\tcompleted = true;\n\tisCompleted() {\n\t\treturn true;\n\t}\n}\n```\n\n### prefixes\n\nType: `Record<string, boolean>`\\\nDefault:\n\n```js\n{\n\tis: true,\n\tare: true,\n\thas: true,\n\thave: true,\n\tcan: true,\n\tshould: true,\n\twas: true,\n\twere: true,\n\tdoes: true,\n\tdid: true,\n\twill: true,\n\trequires: true,\n}\n```\n\nThe `prefixes` option is merged with the defaults. Set a prefix to `true` to allow it for boolean names and reserve it for boolean-like values. Set a prefix to `false` to disable it in both directions.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tprefixes: {\n\t\t\tneeds: true,\n\t\t\tdid: false,\n\t\t},\n\t},\n]\n```\n\nWith the above config, this would pass:\n\n```js\nconst needsUpdate = true;\n```\n\nAnd this would fail:\n\n```js\nconst didUpdate = true;\n```\n\n### wrappers\n\nType: `Record<string, string>`\\\nDefault: `{}`\n\nMap unqualified TypeScript wrapper type names to the property or method that provides a boolean-like value. Same-named types share configuration. Derived types, intersections, and constrained type parameters are supported. Members may provide `boolean`, `Promise<boolean>`, or `PromiseLike<boolean>`; nullable results are accepted. Requires TypeScript type information.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\twrappers: {\n\t\t\tStorageItem: 'get',\n\t\t},\n\t},\n]\n```\n\nWith the above configuration, this would pass:\n\n```ts\ninterface StorageItem<Base, Return = Base | undefined> {\n\tget(): Promise<Return>;\n}\n\ndeclare const isUnicorn: StorageItem<unknown, boolean>;\n```\n\nBut this would still fail because `get()` returns a string:\n\n```ts\ninterface StorageItem<Base, Return = Base | undefined> {\n\tget(): Promise<Return>;\n}\n\ndeclare const isUnicorn: StorageItem<unknown, string>;\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nNames matching any of these patterns are not checked. Strings are treated as regular expressions, so they match anywhere in the name unless anchored with `^` and `$`.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'value',\n\t\t\t'^completed$',\n\t\t],\n\t},\n]\n```\n\nWith the above config, these would pass:\n\n```js\nconst value = true;\nconst completed = true;\n```\n","isInternal":false,"tokens":2351,"sizeBytes":9814},{"name":"consistent-class-member-order.md","path":"docs/rules/consistent-class-member-order.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-class-member-order.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-class-member-order\n\n📝 Enforce consistent class member order.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n\nA predictable member order makes classes faster to scan and keeps related static, instance, field, and method members together.\n\nThis rule enforces the following class member order:\n\n1. Static fields\n2. Static blocks\n3. Static methods\n4. Private instance fields\n5. Public instance fields\n6. Constructors\n7. Private instance methods\n8. Public instance methods\n\nStatic members are grouped by `static` before privacy, so `static #foo` belongs with other static fields or methods.\n\nTypeScript `protected` members follow the same order as public members.\n\nThis rule does not autofix because fields and static blocks run in declaration order, and method order is observable through property reflection.\n\nIt may offer a manual suggestion for simple class bodies without comments, decorators, computed keys, or unsupported members. The suggestion is not offered when it would move a static field across a static block. It can still move instance fields past each other, which changes the order their initializers run in, so check fields whose initializers have side effects or read other fields.\n\nThis rule is intentionally simple. It only enforces group order and will not add options for sorting within groups, newline handling, or more detailed member categories. Use a dedicated sorting rule if you need that.\n\n## Options\n\nType: `object`\n\n### order\n\nType: `string[]`\n\nDefault:\n\n```js\n[\n\t'static-field',\n\t'static-block',\n\t'static-method',\n\t'private-field',\n\t'public-field',\n\t'constructor',\n\t'private-method',\n\t'public-method',\n]\n```\n\nThe array must contain each group exactly once.\n\n## Examples\n\n```js\n// ❌\nclass Foo {\n\tconstructor() {}\n\t#privateField = 1;\n\tpublicField = 1;\n}\n```\n\n```js\n// ✅\nclass Foo {\n\tstatic staticField = 1;\n\t#privateField = 1;\n\tpublicField = 1;\n\n\tconstructor() {}\n}\n```\n\n```js\n// ❌\nclass Foo {\n\tpublicMethod() {}\n\t#privateMethod() {}\n}\n```\n\n```js\n// ✅\nclass Foo {\n\tstatic staticMethod() {}\n\t#privateMethod() {}\n\tpublicMethod() {}\n}\n```\n","isInternal":false,"tokens":578,"sizeBytes":2487},{"name":"consistent-compound-words.md","path":"docs/rules/consistent-compound-words.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-compound-words.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-compound-words\n\n📝 Enforce consistent spelling of compound words in identifiers.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nCompound words should be treated as one word when applying identifier casing conventions.\n\nTreating the same compound word consistently prevents equivalent concepts from being cased differently across identifiers.\n\nThis rule uses a conservative curated list of common compound-word mistakes in code identifiers. It is not a spellchecker or a prose style rule.\n\n## Examples\n\n```js\n// ❌\nconst passWord = 'secret';\n\n// ✅\nconst password = 'secret';\n```\n\n```js\n// ❌\nconst isInViewPort = true;\n\n// ✅\nconst isInViewport = true;\n```\n\n```js\n// ❌\nfunction unSubscribe() {}\n\n// ✅\nfunction unsubscribe() {}\n```\n\n## Intentionally not checked\n\nIn JavaScript, this rule does not check string keys, computed properties, property reads, JSX attributes, or export aliases. These are often external API surfaces where preserving the exact spelling is more important than normalizing identifier style.\n\nIt also intentionally excludes ambiguous or common API spellings such as `fileName`, `setUp`, `lookUp`, and `newLine`. These can be natural identifiers when the words keep separate meaning, for example a newly created line instead of the newline character.\n\n## Data keys, CSS, and HTML\n\nWith `checkProperties: true`, the rule checks JSON object keys, YAML string keys, TOML key segments (including table names), and SOML keys. It skips YAML non-string, tagged, anchored, and alias keys, plus string values.\n\nWith `checkVariables` (enabled by default), it checks CSS class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media, plus HTML `id` and individual `class` names. Built-in CSS property names and value keywords, and `animation` shorthand values are skipped. CSS escapes and HTML character references are decoded; templated HTML values are skipped.\n\nFor example, `backGround`, `back-ground`, and `back_ground` are flagged in favor of `background`. Allow-list entries match the full decoded name, including `--`. Data and CSS/HTML diagnostics have no fixes or suggestions because names may be referenced elsewhere.\n\n## Options\n\nType: `object`\n\n### replacements\n\nType: `object`\n\nYou can extend default replacements by passing the `replacements` option.\n\n```js\n'unicorn/consistent-compound-words': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\tfooBar: 'foobar',\n\t\t\tpassWord: false,\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `extendDefaultReplacements: false` to override the default `replacements` completely.\n\n### allowList\n\nType: `object`\n\nUse `allowList` to skip full identifier names case-sensitively. Values must be `true`.\n\n```js\n'unicorn/consistent-compound-words': [\n\t'error',\n\t{\n\t\tallowList: {\n\t\t\tlegacyUserName: true,\n\t\t},\n\t},\n]\n```\n\n### checkVariables\n\nType: `boolean`\\\nDefault: `true`\n\nPass `checkVariables: false` to disable checking variable names.\n\n### checkProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `checkProperties: true` to check property definitions and property writes.\n\n### checkDefaultAndNamespaceImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in default or namespace imports, but only for internal modules.\n- `true` - Check variables declared in default or namespace imports.\n- `false` - Don't check variables declared in default or namespace imports.\n\n### checkShorthandImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in shorthand imports, but only for internal modules.\n- `true` - Check variables declared in shorthand imports.\n- `false` - Don't check variables declared in shorthand imports.\n\n### checkShorthandProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `checkShorthandProperties: true` to check variables declared as shorthand properties in object patterns.\n","isInternal":false,"tokens":1017,"sizeBytes":4464},{"name":"consistent-conditional-object-spread.md","path":"docs/rules/consistent-conditional-object-spread.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-conditional-object-spread.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-conditional-object-spread\n\n📝 Enforce consistent conditional object spread style.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen conditionally spreading properties into an object literal, pick one style consistently.\n\nBy default, this rule prefers `&&` because it avoids an unnecessary empty object branch.\n\n## Examples\n\n```js\n// ❌\nconst object = {...(condition ? {property} : {})};\n\n// ✅\nconst object = {...(condition && {property})};\n```\n\nAn `undefined` or `null` fallback branch spreads nothing, so it is treated the same as an empty object:\n\n```js\n// ❌\nconst object = {...(condition ? {property} : undefined)};\n\n// ✅\nconst object = {...(condition && {property})};\n```\n\nWith the default `'logical'` style, a boolean cast of the condition is also reported, because every falsy value spreads nothing:\n\n```js\n// ❌\nconst object = {...(!!condition && {property})};\n\n// ❌\nconst object = {...(Boolean(condition) && {property})};\n\n// ✅\nconst object = {...(condition && {property})};\n\n// ❌\nconst object = {...(!!first && !!second && {property})};\n\n// ✅\nconst object = {...(first && second && {property})};\n```\n\n> [!NOTE]\n> In TypeScript, a condition of type `unknown` needs the boolean cast, because TypeScript does not allow spreading `unknown`. Use an `// eslint-disable-next-line` comment in that case.\n\nWith the `'ternary'` option:\n\n```js\n// eslint unicorn/consistent-conditional-object-spread: [\"error\", \"ternary\"]\n\n// ❌\nconst object = {...(condition && {property})};\n\n// ✅\nconst object = {...(condition ? {property} : {})};\n```\n\n## Options\n\nType: `string`\\\nDefault: `'logical'`\n\nAvailable options:\n\n- `'logical'` - Prefer `...(condition && object)`, without a boolean cast of `condition`.\n- `'ternary'` - Prefer `...(condition ? object : {})`.\n","isInternal":false,"tokens":569,"sizeBytes":2277},{"name":"consistent-date-clone.md","path":"docs/rules/consistent-date-clone.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-date-clone.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-date-clone\n\n📝 Prefer passing `Date` directly to the constructor when cloning.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThe [`Date` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date) can clone a `Date` object directly when passed as an argument. This is simpler and more efficient than extracting the timestamp with `.getTime()`.\n\n> Note: This approach requires ES2015 (ES6) or later. In older environments, `new Date(date)` converts to a string first, but modern JavaScript handles this correctly.\n\n## Examples\n\n```js\n// ❌\nnew Date(date.getTime());\n\n// ✅\nnew Date(date);\n```\n\n```js\n// ❌\nconst cloned = new Date(originalDate.getTime());\n\n// ✅\nconst cloned = new Date(originalDate);\n```\n\n```js\n// ✅\n// When you need just the timestamp value\nconst timestamp = date.getTime();\n```\n","isInternal":false,"tokens":299,"sizeBytes":1248},{"name":"consistent-destructuring.md","path":"docs/rules/consistent-destructuring.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-destructuring.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-destructuring\n\n📝 Use destructured variables over properties.\n\n🚫 Disabled by default.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces the use of already destructured variables over accessing the same direct, non-computed identifier property again. Previous destructurings are easily missed which leads to an inconsistent code style.\n\nThis rule is partly fixable. It does not suggest adding new properties to existing destructuring patterns, as that could read properties earlier than before.\n\nThere is no option to ignore specific sources or properties. Properties without a corresponding destructured variable are ignored by design.\n\n## Examples\n\n```js\n// ❌\nconst {a} = foo;\nconsole.log(foo.a);\n\n// ✅\nconst {a} = foo;\nconsole.log(a);\n\n// ✅\nconsole.log(foo.a, foo.b);\n```\n\n```js\n// ✅\nconst {a} = foo;\nconsole.log(a, foo.b);\n```\n\n```js\n// ✅\nconst {\n\ta: {b},\n} = foo;\nconsole.log(foo.a.c);\n```\n\n```js\n// ❌\nconst {bar} = foo;\nconst {a} = foo.bar;\n\n// ✅\nconst {bar} = foo;\nconst {a} = bar;\n```\n\n```js\n// ✅\nconst {a} = foo;\nconsole.log(a, foo.b());\n```\n\n```js\n// ✅\nconst {a} = foo.bar;\nconsole.log(foo.bar.a);\n```\n\nA destructured value is a snapshot. A direct call such as `update(foo)` or `foo.update()` between the destructuring and the property access could have changed the object, so that access is not reported. This is best-effort: a call in a nested function, a method call on `this`, and a call later in a loop body (which runs again before the next access) are not taken into account.\n\n```js\n// ✅\nconst {a} = foo;\nupdate(foo);\nconsole.log(foo.a);\n```\n","isInternal":false,"tokens":464,"sizeBytes":1801},{"name":"consistent-empty-array-spread.md","path":"docs/rules/consistent-empty-array-spread.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-empty-array-spread.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-empty-array-spread\n\n📝 Prefer consistent types when spreading a ternary in an array literal.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen spreading a ternary in an array, we can use both `[]` and `''` as fallbacks, but it's better to have consistent types in both branches.\n\n## Examples\n\n```js\n// ❌\nconst array = [\n\ta,\n\t...(foo ? [b, c] : ''),\n];\n\n// ❌\nconst array = [\n\ta,\n\t...(foo ? 'bc' : []),\n];\n\n// ✅\nconst array = [\n\ta,\n\t...(foo ? [b, c] : []),\n];\n\n// ✅\nconst array = [\n\ta,\n\t...(foo ? 'bc' : ''),\n];\n```\n","isInternal":false,"tokens":286,"sizeBytes":1030},{"name":"consistent-existence-index-check.md","path":"docs/rules/consistent-existence-index-check.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-existence-index-check.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-existence-index-check\n\n📝 Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.\n\nPrefer using `index === -1` to check if an element does not exist and `index !== -1` to check if an element does exist.\n\nThe value `-1` is the sentinel returned by these methods when no match is found, so comparing it directly with `===` or `!==` makes the check read as a not-found sentinel check instead of a numeric range check.\n\nSimilar to the [`explicit-length-check`](explicit-length-check.md) rule.\n\n## Examples\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index >= 0) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index > -1) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = foo.lastIndexOf('bar');\n\n// ❌\nif (index >= 0) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = array.findIndex(element => element > 10);\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n\n```js\nconst index = array.findLastIndex(element => element > 10);\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n","isInternal":false,"tokens":503,"sizeBytes":1802},{"name":"consistent-export-decorator-position.md","path":"docs/rules/consistent-export-decorator-position.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-export-decorator-position.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-export-decorator-position\n\n📝 Enforce consistent decorator position on exported classes.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nDecorators can be placed before or after `export` and `export default` on class declarations. Pick one style for consistency.\n\nThis rule requires a parser that supports decorators, such as `@typescript-eslint/parser`.\n\n## Examples\n\n```js\n// eslint unicorn/consistent-export-decorator-position: error\n\n// ❌\nexport default @decorator class Foo {}\n\n// ❌\n@decorator export default class Foo {}\n\n// ✅\n@decorator\nexport default class Foo {}\n```\n\n### `before`\n\n```js\n// eslint unicorn/consistent-export-decorator-position: [\"error\", \"before\"]\n\n// ❌\n@decorator\nexport default class Foo {}\n\n// ✅\n@decorator export default class Foo {}\n```\n\n### `after`\n\n```js\n// eslint unicorn/consistent-export-decorator-position: [\"error\", \"after\"]\n\n// ❌\n@decorator\nexport default class Foo {}\n\n// ✅\nexport default @decorator class Foo {}\n```\n\n## Options\n\nType: `string`\\\nDefault: `'above'`\n\nAvailable options:\n\n- `'above'` - Require decorators on the line above the export.\n- `'before'` - Require decorators before `export` on the same line.\n- `'after'` - Require decorators after `export` or `export default`.\n","isInternal":false,"tokens":394,"sizeBytes":1638},{"name":"consistent-function-scoping.md","path":"docs/rules/consistent-function-scoping.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-function-scoping.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-function-scoping\n\n📝 Move function definitions to the highest possible scope.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nA function definition should be placed as close to the top-level scope as possible without breaking its captured values. This improves readability, [directly improves performance](https://stackoverflow.com/a/81329/207247) and allows JavaScript engines to [better optimize performance](https://ponyfoo.com/articles/javascript-performance-pitfalls-v8#optimization-limit).\n\n## Examples\n\n```js\n// ❌\nexport function doFoo(foo) {\n\t// Does not capture anything from the scope, can be moved to the outer scope\n\tfunction doBar(bar) {\n\t\treturn bar === 'bar';\n\t}\n\n\treturn doBar;\n}\n```\n\n```js\n// ✅\nfunction doBar(bar) {\n\treturn bar === 'bar';\n}\n\nexport function doFoo(foo) {\n\treturn doBar;\n}\n```\n\n```js\n// ❌\nfunction doFoo() {\n\t// Does not capture anything from the scope, can be moved to the outer scope\n\treturn bar => bar === 'bar';\n}\n```\n\n```js\n// ✅\nconst doBar = bar => bar === 'bar';\n\nfunction doFoo() {\n\treturn doBar;\n}\n```\n\n```js\n// Arrow functions in return statements are also flagged\n// ❌\nexport function someAction() {\n\treturn dispatch => dispatch({type: 'SOME_TYPE'});\n}\n```\n\n```js\n// Arrow functions in return statements are also flagged\n// ✅\nconst handleDispatch = dispatch => dispatch({type: 'SOME_TYPE'});\n\nexport function someAction() {\n\treturn handleDispatch;\n}\n```\n\n```js\n// ❌\nfunction doFoo(foo) {\n\tconst doBar = bar => {\n\t\treturn bar === 'bar';\n\t};\n}\n```\n\n```js\n// ✅\nconst doBar = bar => {\n\treturn bar === 'bar';\n};\n\nfunction doFoo(foo) {}\n```\n\n```js\n// ✅\nexport function doFoo(foo) {\n\tfunction doBar(bar) {\n\t\treturn bar === 'bar' && foo.doBar(bar);\n\t}\n\n\treturn doBar;\n}\n\nconst doBar = bar => bar === 'bar';\n\nexport function doFoo() {\n\treturn doBar;\n}\n```\n\n## Options\n\n### checkArrowFunctions\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkArrowFunctions\": false` to disable linting of arrow functions.\n\n## Limitations\n\nThis rule does not detect or remove extraneous code blocks inside of functions:\n\n```js\nfunction doFoo(foo) {\n\t{\n\t\tfunction doBar(bar) {\n\t\t\treturn bar;\n\t\t}\n\t}\n\n\treturn foo;\n}\n```\n\n[Immediately invoked function expressions (IIFE)](https://en.wikipedia.org/wiki/Immediately_invoked_function_expression) are ignored:\n\n```js\n(function () {\n\tfunction doFoo(bar) {\n\t\treturn bar;\n\t}\n})();\n```\n\n[Built-in Hooks in React](https://reactjs.org/docs/hooks-reference.html) are ignored:\n\n```js\nuseEffect(() => {\n\tasync function getItems() {}\n\n\tgetItems();\n}, [])\n```\n\nFunctions inside `jest.mock()` factories are ignored because Jest restricts those factories from referencing out-of-scope variables:\n\n```js\njest.mock('module', () => {\n\tfunction createMock() {\n\t\treturn 'mock';\n\t}\n\n\treturn createMock;\n});\n```\n\nFunctions inside Vitest's `vi.mock()` and `vi.hoisted()` factories are also ignored because those factories run before the module's top-level code:\n\n```js\nconst mocks = vi.hoisted(() => {\n\tconst createMock = () => 'mock';\n\treturn {createMock};\n});\n\nvi.mock('module', () => {\n\tconst createMock = () => 'mock';\n\treturn {createMock};\n});\n```\n","isInternal":false,"tokens":876,"sizeBytes":3471},{"name":"consistent-function-style.md","path":"docs/rules/consistent-function-style.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-function-style.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-function-style\n\n📝 Enforce function syntax by role.\n\n🚫 Disabled by default.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce function syntax by role.\n\nChoosing syntax by function role keeps declarations consistent and makes callbacks, methods, and standalone functions easier to distinguish.\n\nBy default, this rule reports nothing. Configure the roles you want to enforce.\n\nThis rule does not autofix. Function declarations, function expressions, arrow functions, and object methods are not always semantic equivalents, so `--fix` would be too risky for a style rule.\n\nThe rule offers editor suggestions only for simple callback conversions between anonymous function expressions and arrow functions. Suggestions are skipped when the callback contains comments, `this`, `arguments`, `super`, `new.target`, direct `eval()`, generators, named function expressions, or TypeScript type parameters.\n\n## Examples\n\n```js\n// eslint unicorn/consistent-function-style: ['error', {namedFunctions: 'declaration'}]\n\n// ❌\nconst parse = value => value;\n\n// ✅\nfunction parse(value) {\n\treturn value;\n}\n```\n\n```js\n// ✅ Reassigned variables are ignored by default.\nlet transform = value => value;\n\nif (debug) {\n\ttransform = wrap(transform);\n}\n```\n\n```js\n// ✅ Callbacks are ignored by default.\nitems.map(item => item.id);\n```\n\n```js\n// eslint unicorn/consistent-function-style: ['error', {namedFunctions: 'arrow-function'}]\n\n// ❌\nfunction parse(value) {\n\treturn JSON.parse(value);\n}\n\n// ✅\nconst parse = value => JSON.parse(value);\nexport default parse;\n```\n\n## Options\n\nType: `object`\n\nDefault:\n\n```js\n{\n\tdefault: 'ignore',\n\tnamedFunctions: 'ignore',\n\tnamedExports: 'ignore',\n\tcallbacks: 'ignore',\n\tobjectProperties: 'ignore',\n\treassignedVariables: 'ignore',\n\ttypedVariables: 'ignore',\n}\n```\n\nEach option chooses the expected style for a role.\n\nWhen multiple roles apply, the most specific role wins. Roles are checked in this order:\n\n```js\ndefaultExport\ntypedVariables\nreassignedVariables\nnamedExports\ncallbacks\nobjectProperties\nnamedFunctions\ndefault\n```\n\n### `default`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nFallback style for functions that do not match a more specific role.\n\n### `defaultExport`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for functions written directly inside `export default`. When omitted, named default-exported function declarations use the `namedFunctions` option, other named function expressions use the `default` option, and anonymous default exports are ignored. Explicitly setting `'ignore'` also suppresses syntax reports for direct default-exported functions. Exported identifiers such as `export default parse` are not followed.\n\n### `namedFunctions`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for function declarations and named variable functions.\n\n### `namedExports`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for inline named function exports, such as `export function foo() {}` and `export const foo = () => {}`. Export specifier lists like `export {foo}` are ignored.\n\n### `callbacks`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for inline functions passed as call or constructor arguments.\n\n### `objectProperties`\n\nAllowed values: `'method'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for object literal function properties.\n\n### `reassignedVariables`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for variable functions whose binding is reassigned after initialization.\n\n### `typedVariables`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for TypeScript variable functions with an explicit type annotation.\n\n## Limitations\n\nThe rule ignores anonymous default exports when `defaultExport` is omitted or set to `'ignore'`, export specifier lists, IIFEs, accessors, class methods, class fields, destructuring and parameter defaults, TypeScript overload declarations, and generators when the expected style is `'arrow-function'`. When `defaultExport` is configured to a non-`ignore` style, anonymous default-exported functions are checked for syntax but are still handled separately by [`no-anonymous-default-export`](./no-anonymous-default-export.md) for naming. When both rules are enabled, an anonymous default can therefore produce two reports: one for its syntax and one for its missing name. Most reports do not have suggestions, because the safe rewrite surface is intentionally narrow.\n","isInternal":false,"tokens":1026,"sizeBytes":4886},{"name":"consistent-json-file-read.md","path":"docs/rules/consistent-json-file-read.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-json-file-read.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-json-file-read\n\n📝 Enforce consistent JSON file reads before `JSON.parse()`.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen reading and parsing a JSON file, consistently read it using the configured style. By default, the rule prefers reading it as a string.\n\nThe default keeps the code compatible with TypeScript, where [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) accepts a string.\n\nThe rule only checks and fixes direct no-option reads and option objects where `encoding` is the only property. Reads with additional options are left unchanged to avoid dropping options.\n\n## Examples\n\n```js\n// ❌\nconst packageJson = JSON.parse(await fs.readFile('./package.json'));\n\n// ❌\nconst promise = fs.readFile('./package.json');\nconst packageJson = JSON.parse(await promise);\n\n// ✅\nconst packageJson = JSON.parse(await fs.readFile('./package.json', 'utf8'));\n```\n\n```js\n// ✅\nconst promise = fs.readFile('./package.json', {encoding: 'utf8', signal});\nconst packageJson = JSON.parse(await promise);\n```\n\n## Options\n\nType: `'string' | 'buffer'`\n\nDefault: `'string'`\n\n### `buffer`\n\nPrefer reading JSON files as buffers.\n\n```js\n// eslint unicorn/consistent-json-file-read: [\"error\", \"buffer\"]\n\n// ❌\nconst packageJson = JSON.parse(await fs.readFile('./package.json', 'utf8'));\n\n// ✅\nconst packageJson = JSON.parse(await fs.readFile('./package.json'));\n```\n","isInternal":false,"tokens":452,"sizeBytes":1929},{"name":"consistent-optional-chaining.md","path":"docs/rules/consistent-optional-chaining.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-optional-chaining.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-optional-chaining\n\n📝 Enforce consistent optional chaining for same-base member access.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n\nEnforce consistent optional chaining for same-base member access in logical expressions.\n\nUsing optional chaining consistently for the same base makes nullish behavior easier to see and avoids visually similar expressions that handle missing values differently.\n\nThis rule intentionally handles only direct member access on both sides of `&&` or `||`. It does not rewrite broad truthiness checks like `foo && foo.bar` to `foo?.bar`, because that can change runtime values.\n\n## Examples\n\n```js\n// ❌\nfoo?.bar || foo.baz;\n\n// ✅\nfoo?.bar || foo?.baz;\n```\n\n```js\n// ❌\nfoo.bar || foo?.baz;\n\n// ✅\nfoo.bar || foo.baz;\n```\n\n```js\n// ❌\nfoo?.bar && foo?.baz;\n\n// ✅\nfoo?.bar && foo.baz;\n```\n\n```js\n// ❌\nfoo.bar && foo?.baz;\n\n// ✅\nfoo.bar && foo.baz;\n```\n","isInternal":false,"tokens":302,"sizeBytes":1203},{"name":"consistent-template-literal-escape.md","path":"docs/rules/consistent-template-literal-escape.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-template-literal-escape.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-template-literal-escape\n\n📝 Enforce consistent style for escaping `${` in template literals.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen you need to include a literal `${` in a template literal (without it being interpreted as the start of an interpolation), there are multiple ways to escape it. This rule enforces using `\\${` (escaping the dollar sign) for consistency, as it's the most intuitive and clearest approach.\n\n## Escaping methods\n\n- `\\${` — escape the dollar sign ✅ (recommended)\n- `$\\{` — escape the opening brace (works, but inconsistent)\n- `\\$\\{` — escape both (redundant)\n\n## Examples\n\n```js\n// ❌ - Escaping the brace is inconsistent\nconst template = `$\\{variableName}`;\n\n// ❌ - Escaping both is redundant\nconst template = `\\$\\{variableName}`;\n\n// ✅ - Escape the dollar sign\nconst template = `\\${variableName}`;\n```\n\n```js\n// ✅ - Common use case: template strings for users\nconst message = `Use \\${variable} in your code`;\n\n// ✅ - JavaScript regex pattern\nconst regex = `/\\${pattern}/g`;\n```\n\n```js\n// ✅ - Normal variable interpolation still works\nconst name = 'Alice';\nconst greeting = `Hello ${name}, use \\${variable} for templates`;\n// → \"Hello Alice, use ${variable} for templates\"\n```\n","isInternal":false,"tokens":431,"sizeBytes":1743},{"name":"consistent-tuple-labels.md","path":"docs/rules/consistent-tuple-labels.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/consistent-tuple-labels.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# consistent-tuple-labels\n\n📝 Enforce consistent labels on tuple type elements.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\n[Labeled tuple elements](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#labeled-tuple-elements) document what each position in a tuple means. Labeling only some of the elements is inconsistent: the unlabeled positions read as an oversight, and the tuple is harder to scan than one that is either fully labeled or fully unlabeled.\n\nThis rule requires that, when at least one element of a tuple type is labeled, every element is labeled. A tuple with no labels at all is left alone.\n\nA rest element counts as labeled when its label is present (`...rest: number[]`), so a fully labeled tuple that ends with a labeled rest element is not reported.\n\nThere is no autofix, since a meaningful label cannot be inferred.\n\n## Examples\n\n```ts\n// ❌\ntype Point = [x: number, number];\n\n// ✅\ntype Point = [x: number, y: number];\n```\n\n```ts\n// ✅\ntype Point = [number, number];\n```\n\n```ts\n// ❌\ntype Route = [name: string, ...string[]];\n\n// ✅\ntype Route = [name: string, ...segments: string[]];\n```\n","isInternal":false,"tokens":376,"sizeBytes":1500},{"name":"custom-error-definition.md","path":"docs/rules/custom-error-definition.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/custom-error-definition.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# custom-error-definition\n\n📝 Enforce correct `Error` subclassing.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent way of defining `Error` subclasses. It works with superclasses whose names match the rule's `*Error` naming pattern.\n\nTypeScript abstract classes are ignored. Concrete subclasses are still checked.\n\nFor native error bases that accept `ErrorOptions` as their second argument, constructors with regular parameters must accept a non-rest `options` parameter in any position and pass it second to `super()`. Rest-only constructors are exempt from this check. A constructor with a fixed message can instead pass `{cause}` inline, and a constructor with an `options` parameter can forward only its cause with `{cause: options.cause}`. `AggregateError` and `SuppressedError` use different signatures, and custom bases may too, so they are exempt.\n\n```js\nclass ApiError extends Error {\n\tconstructor(status, message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'ApiError';\n\t\tthis.status = status;\n\t}\n}\n\nclass HttpError extends Error {\n\tconstructor(response, request, options) {\n\t\tsuper(`Request failed: ${request.method} ${request.url}`, options);\n\t\tthis.name = 'HttpError';\n\t\tthis.response = response;\n\t\tthis.request = request;\n\t}\n}\n```\n\n```js\n// ✅\nclass UserNotFoundError extends GraphQLError {\n\tconstructor(userId) {\n\t\tsuper(`User \"${userId}\" does not exist`, {extensions: {code: 'NOT_FOUND'}});\n\t\tthis.name = 'UserNotFoundError';\n\t}\n}\n```\n\n## Examples\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// The `this.message` assignment is useless as it's already set via the `super()` call.\n\t\tthis.message = message;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(undefined, options);\n\t\t// Pass the error message to `super()` instead of setting `this.message`.\n\t\tthis.message = message;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// No `name` property set. The name property is needed so the\n\t\t// error shows up as `[CustomError: foo]` and not `[Error: foo]`.\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// Use a string literal to set the `name` property as it will not change after minifying.\n\t\tthis.name = this.constructor.name;\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// The `name` property should be set to the class name.\n\t\tthis.name = 'MyError';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ❌\n// The class name should be capitalized and end with `Error`.\nclass foo extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'foo';\n\t}\n}\n\n// ✅\nclass FooError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'FooError';\n\t}\n}\n```\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, details) {\n\t\tsuper(message);\n\t\tthis.details = details;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.details = options?.details;\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends Error {\n\tconstructor() {\n\t\tsuper('My custom error');\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\n// The message is hard-coded and the error options are passed to `super()` inline, so no `options` parameter is needed.\nclass CustomError extends Error {\n\tconstructor(cause) {\n\t\tsuper('My custom error', {cause});\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends TypeError {\n\tconstructor() {\n\t\tsuper();\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends Error {\n\tname = 'CustomError';\n}\n```\n\nWhen defining a custom `message` accessor, don't pass the message to `super()` as it would shadow the accessor with an own `message` property. Store the message somewhere else instead.\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'CustomError';\n\t}\n\n\tget message() {\n\t\treturn 'Custom message';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\t#message;\n\n\tconstructor(message, options) {\n\t\tsuper(undefined, options);\n\t\tthis.#message = message;\n\t\tthis.name = 'CustomError';\n\t}\n\n\tget message() {\n\t\treturn this.#message;\n\t}\n}\n```\n","isInternal":false,"tokens":1185,"sizeBytes":4887},{"name":"default-export-style.md","path":"docs/rules/default-export-style.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/default-export-style.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# default-export-style\n\n📝 Enforce consistent default export declarations.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce whether default-exported functions and classes are declared inline with `export default` or separately. For functions, separate means a `const` arrow function exported by identifier. For classes, separate means a class declaration exported by identifier.\n\nA consistent declaration style makes default exports easier to scan and avoids mixing multiple declaration forms across a codebase.\n\nThis rule controls whether local default exports are written inline or separately. Named exports are intentionally ignored. Use [`consistent-function-style`](./consistent-function-style.md) for function syntax, including direct default-exported functions through its `defaultExport` option.\n\nUse [`no-anonymous-default-export`](./no-anonymous-default-export.md) to require names for anonymous default exports.\n\n## Examples\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"inline\"}]\n\n// ❌\nconst foo = () => {};\nexport default foo;\n\n// ✅\nexport default function foo() {}\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"separate\"}]\n\n// ❌\nexport default function foo() {}\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"ignore\"}]\n\n// ✅\nexport default function foo() {}\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"inline\"}]\n\n// ❌\nclass Foo {}\nexport default Foo;\n\n// ✅\nexport default class Foo {}\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"separate\"}]\n\n// ❌\nexport default class Foo {}\n\n// ✅\nclass Foo {}\nexport default Foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"ignore\"}]\n\n// ✅\nexport default class Foo {}\n\n// ✅\nclass Foo {}\nexport default Foo;\n```\n\n## Options\n\nType: `object`\n\nDefault:\n\n```js\n{\n\tfunctions: 'inline',\n\tclasses: 'inline',\n}\n```\n\n### `functions`\n\nAllowed values: `'inline'`, `'separate'`, `'ignore'`\n\n`'inline'` requires named default-exported functions to be declared inline:\n\n```js\nexport default function foo() {}\n```\n\n`'separate'` requires named default-exported functions to use a separate `const` arrow function declaration:\n\n```js\nconst foo = () => {};\nexport default foo;\n```\n\n`'ignore'` disables checks for functions.\n\n> [!NOTE]\n> When both rules are enabled, configure compatible styles. For example, `functions: 'inline'` pairs with `defaultExport: 'declaration'`, while `functions: 'separate'` pairs with `defaultExport: 'ignore'` when `namedFunctions` permits the separate `const` arrow function. The `defaultExport` option does not inspect `export default identifier`.\n\n### `classes`\n\nAllowed values: `'inline'`, `'separate'`, `'ignore'`\n\n`'inline'` requires named default-exported classes to be declared inline:\n\n```js\nexport default class Foo {}\n```\n\n`'separate'` requires named default-exported classes to use a separate class declaration:\n\n```js\nclass Foo {}\nexport default Foo;\n```\n\n`'ignore'` disables checks for classes.\n\n## Limitations\n\nThis rule intentionally ignores named exports, re-exports, CommonJS, anonymous defaults, non-adjacent declaration/export pairs, imported identifiers, values, objects, arrays, function expressions, `let`/`var` functions, multiple variable declarators, generators, later reassigned bindings, and TypeScript-specific syntax.\n","isInternal":false,"tokens":947,"sizeBytes":4104},{"name":"dom-node-dataset.md","path":"docs/rules/dom-node-dataset.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/dom-node-dataset.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# dom-node-dataset\n\n📝 Enforce consistent style for DOM element dataset access.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUse [`.dataset`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset) on DOM elements over `getAttribute(…)`, `.setAttribute(…)`, `.removeAttribute(…)` and `.hasAttribute(…)`.\n\nThe `dataset` API maps `data-*` attributes to properties, avoiding repeated attribute-name strings and keeping reads and writes consistent.\n\nFor a missing attribute, `getAttribute(…)` returns `null`, but `.dataset` returns `undefined`. So reads are only offered as a suggestion, in both directions.\n\n## Examples\n\n```js\n// ❌\nconst unicorn = element.getAttribute('data-unicorn');\n\n// ✅\nconst {unicorn} = element.dataset;\n```\n\n```js\n// ❌\nelement.setAttribute('data-unicorn', '🦄');\n\n// ✅\nelement.dataset.unicorn = '🦄';\n```\n\n```js\n// ❌\nelement.removeAttribute('data-unicorn');\n\n// ✅\ndelete element.dataset.unicorn;\n```\n\n```js\n// ❌\nconst hasUnicorn = element.hasAttribute('data-unicorn');\n\n// ✅\nconst hasUnicorn = Object.hasOwn(element.dataset, 'unicorn');\n```\n\n```js\n// ✅\nconst foo = element.getAttribute('foo');\n```\n\n```js\n// ✅\nelement.setAttribute('not-dataset', '🦄');\n```\n\n```js\n// ✅\nelement.removeAttribute('not-dataset');\n```\n\n```js\n// ✅\nconst hasFoo = element.hasAttribute('foo');\n```\n\n## Options\n\n### preferAttributes\n\nType: `boolean`\\\nDefault: `false`\n\nWhen `true`, enforces the opposite direction: prefer `getAttribute(…)` / `setAttribute(…)` / `removeAttribute(…)` / `hasAttribute(…)` over named `.dataset` access — covering reads, writes, `delete`, simple destructuring, existence checks (`in`, `Object.hasOwn`, `.hasOwnProperty()`), and assigning `.dataset` to a variable (`const data = element.dataset`, which hides the attribute access from a search). Direct whole-object reads (`foo(element.dataset)`) and inherited members (`element.dataset.toString`) are not flagged. This can be useful for greppability when data attributes are also referenced in CSS/HTML.\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nconst unicorn = element.dataset.unicorn;\n\n// ✅\nconst unicorn = element.getAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nelement.dataset.unicorn = '🦄';\n\n// ✅\nelement.setAttribute('data-unicorn', '🦄');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\ndelete element.dataset.unicorn;\n\n// ✅\nelement.removeAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\n'unicorn' in element.dataset;\n\n// ✅\nelement.hasAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nconst data = element.dataset;\nconsole.log(data.unicorn);\n\n// ✅\nconsole.log(element.getAttribute('data-unicorn'));\n```\n","isInternal":false,"tokens":863,"sizeBytes":3491},{"name":"empty-brace-spaces.md","path":"docs/rules/empty-brace-spaces.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/empty-brace-spaces.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# empty-brace-spaces\n\n📝 Enforce no spaces between braces.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEmpty blocks and object literals do not need internal whitespace, so this rule enforces a compact, consistent style. It also checks objects and arrays in JSON, JSONC, JSON5, and SOML, blocks in CSS, flow mappings and sequences in YAML, and inline tables and arrays in TOML. Braces and brackets containing comments are left unchanged.\n\n## Examples\n\n```js\n// ❌\nclass Unicorn {\n}\n\n// ✅\nclass Unicorn {}\n```\n\n```js\n// ❌\ntry {\n\tfoo();\n} catch { }\n\n// ✅\ntry {\n\tfoo();\n} catch {}\n```\n","isInternal":false,"tokens":317,"sizeBytes":1223},{"name":"error-message.md","path":"docs/rules/error-message.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/error-message.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# error-message\n\n📝 Enforce passing a `message` value when creating a built-in error.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces a `message` value to be passed in when creating an instance of a built-in [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, which leads to more readable and debuggable code.\n\n## Examples\n\n```js\n// ❌\nthrow new Error();\n\n// ❌\nthrow new Error('');\n\n// ✅\nthrow new Error('Unexpected property.');\n```\n\n```js\n// ❌\nthrow new TypeError();\n\n// ✅\nthrow new TypeError('Array expected.');\n```\n\n```js\n// ❌\nconst error = new AggregateError(errors);\n\n// ✅\nconst error = new AggregateError(errors, 'Promises rejected.');\n```\n\n```js\n// ❌\nconst error = new SuppressedError(error, suppressed);\n\n// ✅\nconst error = new SuppressedError(error, suppressed, 'This is a suppressed error.');\n```\n","isInternal":false,"tokens":283,"sizeBytes":1141},{"name":"escape-case.md","path":"docs/rules/escape-case.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/escape-case.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# escape-case\n\n📝 Require escape sequences to use uppercase or lowercase values.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent escaped value style by defining escape sequence values with uppercase or lowercase characters. The default style is uppercase, which promotes readability by making the escaped value more distinguishable from the identifier.\n\nTagged template literals are ignored because tag functions can observe the raw escape sequences.\n\nIn SOML, the configured case is ignored because Unicode escapes must use lowercase hexadecimal digits. Literal strings and keys are skipped.\n\nIn TOML, it checks basic strings and quoted keys, including multiline strings. It preserves `\\u` and `\\U` prefixes and also normalizes parser-tolerated `\\x` escapes, which TOML 1.0 does not define. Literal strings and keys are skipped.\n\nIn JSON, JSONC, and JSON5, it checks strings and quoted keys, including JSON5 hexadecimal escapes. In YAML, it checks hexadecimal and Unicode escapes in double-quoted scalars. In CSS, it checks one- to six-digit hexadecimal escapes in identifiers, strings, and URLs, preserving escape-terminating whitespace and skipping comments.\n\n## Examples\n\n```js\n// ❌\nconst foo = '\\xa9';\n\n// ✅\nconst foo = '\\xA9';\n```\n\n```js\n// ❌\nconst foo = '\\ud834';\n\n// ✅\nconst foo = '\\uD834';\n```\n\n```js\n// ❌\nconst foo = '\\u{1d306}';\n\n// ✅\nconst foo = '\\u{1D306}';\n```\n\n```js\n// ❌\nconst foo = '\\ca';\n\n// ✅\nconst foo = '\\cA';\n```\n\n## Options\n\nType: `string`\\\nDefault: `'uppercase'`\n\n- `'uppercase'` (default)\n  - Always use escape sequence values with uppercase characters.\n- `'lowercase'`\n  - Always use escape sequence values with lowercase characters.\n\nExample:\n\n```js\n{\n\t'unicorn/escape-case': ['error', 'lowercase']\n}\n```\n\n```js\n// ❌\nconst foo = '\\xA9';\n\n// ✅\nconst foo = '\\xa9';\n```\n\n```js\n// ❌\nconst foo = '\\uD834';\n\n// ✅\nconst foo = '\\ud834';\n```\n\n```js\n// ❌\nconst foo = '\\u{1D306}';\n\n// ✅\nconst foo = '\\u{1d306}';\n```\n\n```js\n// ❌\nconst foo = '\\cA';\n\n// ✅\nconst foo = '\\ca';\n```\n","isInternal":false,"tokens":672,"sizeBytes":2559},{"name":"expiring-todo-comments.md","path":"docs/rules/expiring-todo-comments.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/expiring-todo-comments.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# expiring-todo-comments\n\n📝 Add expiration conditions to TODO comments.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule makes it possible to pass arguments to TODO, FIXME and XXX comments to trigger ESLint to report.\n\nFrom [ESLint's documentation](https://eslint.org/docs/latest/rules/no-warning-comments):\n\n> Developers often add comments to code which is not complete or needs review.\n\nTODO comments are useful when a piece of code needs some work. Unfortunately these can be easily forgotten as it's common to forget to track them, leaving dangling tasks to be found at later random moments, or never at all.\n\nWith this rule, a TODO can have a condition right from the beginning to define its lifespan. When the condition is met, ESLint will take care of reporting that there's work to be done.\n\nThis rule will ignore all TODOs without conditions. For more information, read the below [`eslint/no-warning-comments`](#disallow-warning-comments-no-warning-comments) section.\n\nThis rule also supports CSS comments when linting with [`@eslint/css`](https://github.com/eslint/css), HTML comments when linting with [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint), JSONC/JSON5 comments when linting with [`@eslint/json`](https://github.com/eslint/json), HTML comments in Markdown when linting with [`@eslint/markdown`](https://github.com/eslint/markdown), SOML `#` and block comments when linting with [`eslint-soml`](https://github.com/soml-lang/eslint-soml), TOML `#` comments when linting with [`eslint-plugin-toml`](https://github.com/ota-meshi/eslint-plugin-toml), and YAML `#` comments when linting with [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml).\n\nQuick overview of conditions:\n\n- Expire after a **specific date**.\n- Expire when **your package** (package.json) reaches a specific **version**.\n- Expire when a package.json **`engines`** property reaches a specific **version**.\n- Expire when you **install/uninstall** a specific **package**.\n- Expire when a **package** reaches a specific **version**.\n- Expire when a **peer dependency**'s minimum supported **version** reaches a specific **version**.\n\n## Conditions\n\n### Expiry Date\n\nUsing a date as condition, a TODO will only work as long as this date is not met. This is especially useful when you either know when the action should take place or simply want to set boundaries for yourself.\n\nDate expiry checks are disabled by default. Set [`checkDates`](#checkdates) to `true` to enable them.\n\n```js\n// TODO [2019-11-15]: Refactor this code before the sprint ends.\n// TODO (@lubien) [2019-07-18]: When John delivers his code. I can reuse it.\n// TODO [2019-08-10]: I must refactor this for sure before I deliver.\n```\n\nDates are in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601#Dates) and use [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) as timezone.\n\nMultiple dates on the same TODO are not valid and will be reported. There's no point in having two dates as the closest one will always be the one that is reported.\n\n### Package Version\n\nIf you're working on an npm package, you should have a root level package.json with a [`version`](https://docs.npmjs.com/files/package.json#version) field as specified by npm. This condition takes place under this value.\n\nBy assigning a condition to compare a package.json `version`, the TODO will report as soon as the condition is met. It's really useful when the work is related to the version of the package itself such as deprecated APIs.\n\n```js\n// TODO [>=1.0.0]: I should work around this when we reach v1.\n// TODO (@lubien) [>0]: For now this is fine but for a stable version we must refactor.\n// FIXME [>10]: This feature is deprecated and should be removed from the next major version.\n```\n\nMultiple package versions on the same TODO are not valid and will be reported. Just like dates, multiple versions will make no sense as the closest one will be the one to trigger the report.\n\n### Engine Version\n\nIn package.json, you can specify an [`\"engines\"` field](https://docs.npmjs.com/files/package.json#engines) with the Node.js (`node`) versions that your package supports.\n\nWith that in mind, this condition is triggered as soon as package.json's `node` engine reaches the target version. This is particularly useful for maintainers that strive for compatibility but have plans for the future when some feature will be widely available and when support for older versions could be dropped.\n\nImagine you want to use `async`/`await` but for now you support Node.js versions that don't have it. Maybe you're eager to use `import` and `export` but for now you have to support CommonJS?\n\n```js\n// TODO [engine:node@>=8]: We can use async/await now.\n// FIXME [engine:node@>=20.0.0]: Hey, node can use import/export now, we should refactor.\n```\n\nArgument versions should be [semver](https://semver.org/) compatible such as: `1.2.45`, `5.3`, `1`.\n\nOnly the `node` engine is supported by this condition.\n\nSupported comparisons are `>` and `>=`. Comparison must have a `@` before such as `@>` and `@>=`.\n\n### Dependency Presence\n\nAs a Node.js developer, you probably already know about package.json [dependencies](https://docs.npmjs.com/files/package.json#dependencies) and [devDependencies](https://docs.npmjs.com/files/package.json#devdependencies). This condition works based on the presence or absence of dependencies in both fields.\n\nYou may use `+` to trigger when a dependency is added and `-` when a dependency is removed.\n\n```js\n// TODO [-vue-function-api]: When we remove `vue-function-api` we should refactor this.\n// FIXME [+read-pkg]: If we use this package we don't need to use this function below.\n// XXX @lubien [+react, -jquery]: We can use React for this widget instead of jQuery.\n```\n\nSuch conditions are really useful when the code depends upon changes in dependencies that are known to be happening such as `vue-function-api` that will eventually be part of `vue` itself.\n\n### Dependency Version\n\nAnother way to make conditions based on dependencies is to look at versions. This is useful when developers know that changes in future versions of dependencies will impact their code.\n\n```js\n// TODO [vue@>=3]: Refactor to function API when it's stable.\n// FIXME [cerebro@>0.10.0]: This is a quickfix until cerebro fixes this.\n// XXX [popura@>=2.0.0]: This API is deprecated so we should not use it by then.\n```\n\nArgument versions should be [semver](https://semver.org/) compatible such as: `1.2.45`, `5.3`, `1`.\n\nSupported comparisons are `>` and `>=`. Comparison must have a `@` before such as `@>` and `@>=`.\n\n[Package manager catalogs](https://pnpm.io/catalogs) (`catalog:` version references in `package.json`) are not resolved; dependency and peer dependency version checks that use them are reported as unsupported.\n\n### Peer Dependency Version\n\nIf your package declares [`peerDependencies`](https://docs.npmjs.com/cli/configuring-npm/package-json#peerdependencies), you can make conditions based on the **minimum supported version** of a peer dependency. This is useful when you want a TODO to trigger once you bump the lowest version you support, for example to drop a fallback for a deprecated API.\n\n```js\n// TODO [peer:eslint@>=9]: Drop the `CLIEngine` fallback once we require ESLint 9.\n```\n\nThe peer dependency value is a version range (such as `>=8`, `^8 || ^9`), so the comparison is made against the **floor** of that range. For example, with `\"eslint\": \"^8 || ^9\"` the minimum supported version is `8`, so `[peer:eslint@>=9]` will **not** trigger; it triggers only once the floor reaches `9`.\n\nThis condition is separate from the [Dependency Version](#dependency-version) condition, which only checks `dependencies` and `devDependencies`. Use `peer:` when the same package can appear in both with independent versions.\n\nArgument versions should be [semver](https://semver.org/) compatible such as: `1.2.45`, `5.3`, `1`.\n\nSupported comparisons are `>` and `>=`. Comparison must have a `@` before such as `@>` and `@>=`.\n\n### Pre-releases\n\nTODO comments with rules for package.json and dependency versions support the semver pre-release format, such as `1.0.0-my.pre.release.1.2.3`. This means that if your TODO asks for version `>=1.0.0` and you're in `1.0.0-beta`, your TODO will **not** trigger as a pre-release comes first. When the version is at least `1.0.0`, it will properly trigger.\n\nKeep in mind that pre-releases compare by number and alphabetical order. Example: `1.0.0-alpha` < `1.0.0-alpha.1` < `1.0.0-alpha.beta` < `1.0.0-beta` < `1.0.0-beta.2` < `1.0.0-beta.11` < `1.0.0-rc.1` < `1.0.0`.\n\nYou can read more about the semver pre-release format [here](https://semver.org/#spec-item-9) and semver precedence rules [here](https://semver.org/#spec-item-11).\n\n### Combinations\n\nAny combination of rules is possible as long as you separate them by commas. Each condition **triggers an individual report.**\n\n```js\n// TODO [+react, -jquery]: We can use React for this widget instead of jQuery.\n// TODO [2019-07-15, +react]: Refactor this if we install React or if we reach that date.\n// TODO [-vue-function-api, vue@>=3]: Now we should use Vue native function API.\n```\n\n### Block Comments\n\nYou can also use block comments to specify TODOs with conditions. Each line can have its own set of conditions. This is especially useful when you aim for more details.\n\n```js\n/*\n * We should really make this code better.\n * When we support Node.js 12 we can refactor imports.\n * And we also can do [x], [y], [z].\n * TODO [engine:node@>=12]: Use import/export.\n */\n\n/*\n * This code would be so easy if we used `popura` package helpers.\n * When you can, install `popura`, use it and remove dead code.\n * TODO [+popura]: Refactor to use `popura`.\n *\n * You can also use `popura-cli` since we want help on [feature].\n * TODO [+popura-cli]: Document how to use `popura-cli`.\n */\n```\n\n### CSS\n\nWhen used with [`@eslint/css`](https://github.com/eslint/css), this rule can check CSS block comments too.\n\n```css\n/* TODO [2019-11-15]: Remove this fallback. */\n.outdated {\n\tcolor: hotpink;\n}\n```\n\n### HTML\n\nWhen used with [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint), this rule can check HTML comments too.\n\n```html\n<!-- TODO [2019-11-15]: Remove this fallback. -->\n<div class=\"outdated\"></div>\n```\n\n### JSONC / JSON5\n\nWhen used with [`@eslint/json`](https://github.com/eslint/json), this rule can check line comments in `.jsonc` and `.json5` files too.\n\n```jsonc\n// TODO [2019-11-15]: Update this configuration.\n{\n\t\"key\": \"value\"\n}\n```\n\n### Markdown\n\nWhen used with [`@eslint/markdown`](https://github.com/eslint/markdown), this rule can check HTML comments in Markdown files too.\n\n```md\n<!-- TODO [2019-11-15]: Update this section. -->\n\n# Heading\n```\n\n### YAML\n\nWhen used with [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml), this rule can check comments in YAML files too.\n\n```yaml\n# TODO [2019-11-15]: Update this configuration.\nkey: value\n```\n\n## Disallow Warning Comments (no-warning-comments)\n\nThis rule implements [`eslint/no-warning-comments`](https://eslint.org/docs/rules/no-warning-comments).\n\nThe sole difference is that first we check for **valid conditions** to apply this rule. If no valid conditions are met, we fall back to `eslint/no-warning-comments` if [`allowWarningComments`](#allowwarningcomments) is set to `false` (default `true`) and you'll see something like `Unexpected 'todo': 'TODO: …'.`\n\nThe reason behind this is that now that you have a powerful rule to make sure there are no stray TODOs on your code, you should strive for best practices. Don't just add TODO comments and leave them forever. Define conditions to justify the presence of warning comments.\n\nWith that in mind, you **could** disable that ESLint rule in favor of this one as you will get its same behavior and more.\n\nSince by default the option `allowWarningComments` is `true`, both rules can coexist even with different reporting levels. For example, one might want to error when conditions are met, but just warn on TODOs without conditions (See [`allowWarningComments`](#allowwarningcomments) below).\n\n## Legacy Branches\n\nAlthough this rule works just fine when you maintain a `main` branch, it gets trickier when you have legacy branches that happen to have unclosed TODOs.\n\nImagine you maintain a `main` branch at a version such as 10 and always keep working on it and also keep fixing your TODOs. But your package happens to **publish and support** legacy branches such as 8 and 9 for [long term support](https://en.wikipedia.org/wiki/Long-term_support) with code such as security patches, meaning you might have stray TODOs that won't get fixed and will cause your build to break unless you either fix or drop the TODO.\n\n## Conditions Overview\n\n- `[YYYY-MM-DD]` to define a [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) due date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Dates) format.\n- `[>1]` or `[>=2]` to expire at some version (from package.json). No whitespace.\n- `[+package]` or `[-package]` to expire when you add/remove a package.\n- `[package@>1]` or `[package@>=2]` to expire when a package hits some version. No whitespace.\n- `[peer:eslint@>9]` or `[peer:eslint@>=9]` to expire when a peer dependency's minimum supported version reaches some version. No whitespace.\n- `[engine:node@>8]` or `[engine:node@>=8]` to expire when the package bumps to the supported engines. No whitespace.\n\n## Overall Information\n\n- Multiple conditions can be separated by comma:\n  `[YYYY-MM-DD, +foo-package, engine:node@>=8, bar-package@>=2]`.\n- You cannot stack multiple dates or multiple versions of\n  your package on the same TODO.\n- You can use either `TODO`, `FIXME`, or `XXX`. You can change\n  these using options. (See [options.terms](#terms)).\n- TODOs may have any string before arguments. Really useful\n  when you want to highlight more information such as author name\n  like `TODO (lubien) [2019-05-30]` or `TODO @lubien [2019-05-30]`.\n- TODOs may or may not have a colon before the message such as\n  `TODO [...]: message` or `TODO [...] message`.\n- If no proper argument is found, you'll be notified that the TODO is useless (See [`eslint/no-warning-comments`](#disallow-warning-comments-no-warning-comments)).\n- CSS, HTML, JSONC, JSON5, Markdown, SOML, TOML, and YAML comments are supported with their respective ESLint plugins.\n\n## Examples\n\n```js\n// ❌\n// With `checkDates: true`\n// TODO [2000-01-01]: I'll fix this next week.\n// TODO [2000-01-01, 2001-01-01]: Multiple dates won't work.\n\n// TODO [>1]: If your package.json version is > 1.\n// TODO [>=1]: If your package.json version is >= 1.\n// TODO [>1, >2]: Multiple package versions won't work.\n\n// TODO [+already-have-pkg]: Since we already have it, this reports.\n// TODO [-we-dont-have-this-package]: Since we don't have, trigger a report.\n\n// TODO [read-pkg@>1]: When `read-pkg` version is > 1 don't forget to do this.\n// TODO [read-pkg@>=5.1.1]: When `read-pkg` version is >= 5.1.1 don't forget to do that.\n\n// TODO [peer:eslint@>=8]: Whoops, our minimum supported `eslint` is already >= 8.\n\n// TODO [engine:node@>=8]: Whoops, we are already supporting it!\n\n// TODO: Add unicorns.\n```\n\n```js\n// ✅\n// TODO [2200-12-25]: Too long... Can you feel it?\n// FIXME [2200-12-25]: Too long... Can you feel it?\n\n// TODO (lubien) [2200-12-12]: You can add something before the arguments.\n// TODO @lubien [2200-12-12]: You can add something before the arguments.\n// FIXME [2200-12-25] (lubien): You can add something after the arguments, before the colon.\n// TODO [2200-12-12] No colon after argument.\n\n// TODO [+react]: Refactor this when we use React.\n// TODO [-lodash]: If we remove lodash we need to change this.\n\n// TODO [lodash@>10]: Lodash has a new way to do this; when we bump to its version let's use it.\n// TODO [lodash@>=10]: Lodash has a new way to do this; when we bump to its version let's use it.\n\n// TODO [2200-12-25, +popura, lodash@>10]: Combo.\n\n// TODO [peer:eslint@>=99]: When our minimum supported `eslint` reaches v99.\n\n// TODO [engine:node@>12]: When we bump to this Node version we can use import/export.\n\n/*\n * TODO [2200-12-25]: Yet\n * TODO [2200-12-25]: Another\n * TODO [2200-12-25]: Way\n */\n```\n\n## Options\n\n### checkDates\n\nType: `boolean`\\\nDefault: `false`\n\nWhether to check expiration dates.\n\nThis option does not disable date argument validation. For example, TODO comments with multiple dates are still reported as invalid.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: false,\n\t},\n]\n```\n\n### checkDatesOnPullRequests\n\nType: `boolean`\\\nDefault: `false`\n\nWhether to check expiration dates on pull requests.\n\nSometimes developers may send [Pull Requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) at a time when TODO expiry dates are triggered. This means that their code would fail to pass linting, causing a false-positive.\n\nWhen date checks are enabled, this rule will not trigger expiry dates while on Pull Requests by default so that the one responsible for the fix will be the maintainer not the contributor.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: true,\n\t\tcheckDatesOnPullRequests: true,\n\t},\n]\n```\n\n### terms\n\nType: `string[]`\\\nDefault: `['todo', 'fixme', 'xxx']`\n\nAdd or remove TODO verbs.\n\nThe defaults come from the [`eslint/no-warning-comments` rule](https://eslint.org/docs/rules/no-warning-comments#options).\n\nIf you just want to add a verb, make sure to explicitly include the default ones like `['todo', 'fixme', 'xxx', 'mytodo']` or otherwise any default TODO verb will be ignored. Similarly, when you want to remove a verb, leave the others in like `['todo', 'fixme']`.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tterms: [\n\t\t\t'todo',\n\t\t\t'fixme',\n\t\t\t'xxx',\n\t\t],\n\t},\n]\n```\n\n### allowWarningComments\n\nType: `boolean`\\\nDefault: `true`\n\nIgnore TODOs without conditions.\n\nAs mentioned before, the [`eslint/no-warning-comments` rule](#disallow-warning-comments-no-warning-comments) will be triggered when there are no valid conditions on a TODO comment.\n\nThis is helpful if you want to use **both** this rule and the [`eslint/no-warning-comments` rule](#disallow-warning-comments-no-warning-comments), **but want different warning levels**, as it's not possible to set multiple warning levels on the same rule.\n\nIf you want this rule to trigger on stray TODO conditions, you can enable this fallback rule with this option.\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tallowWarningComments: false,\n\t},\n]\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nIgnore TODOs matching any of the given regex patterns. This option is only useful if you have `allowWarningComments` set to `false`.\n\nWhen a string is given, it will be interpreted as a regular expression inside of a string.\n\nDon't forget that you must escape special characters in string regexes. If you want to ignore numbers with `\\d` for example, to match `#\\d`, you must use `/#\\d/` or `'#\\\\d'`.\n\nAs an example of this option, if you want this rule to **completely ignore** comments containing references to GitHub issues, you can do so by ignoring `\"#\\\\d+\"`:\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tallowWarningComments: false,\n\t\tignore: [\n\t\t\t'#\\\\d+',\n\t\t\t/issue-\\d+/i,\n\t\t],\n\t},\n]\n```\n\n### date\n\nType: `string` (`date` format)\\\nDefault: `<today>`\n\nFor TODOs with date deadlines, this option makes them trigger only if the deadline is later than the specified date. You could set this to a date in the future to find TODOs that expire soon, or set it far in the past if you want to ignore recently-expired TODOs.\n\nThe format must match [json-schema's date](https://json-schema.org/understanding-json-schema/reference/string.html#dates-and-times).\n\n### examples\n\nFind tech debt that has grown up and gone to college by triggering the rule only for incredibly old TODOs:\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: true,\n\t\tdate: '2000-01-01',\n\t},\n]\n```\n\nPrepare for the future by triggering the rule on known Y3K bugs:\n\n```js\n'unicorn/expiring-todo-comments': [\n\t'error',\n\t{\n\t\tcheckDates: true,\n\t\tdate: '3000-01-01',\n\t},\n]\n```\n","isInternal":false,"tokens":5282,"sizeBytes":20739},{"name":"explicit-length-check.md","path":"docs/rules/explicit-length-check.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/explicit-length-check.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# explicit-length-check\n\n📝 Enforce explicitly comparing the `length` or `size` property of a value.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nExplicit comparisons make empty and non-empty intent clear instead of relying on the truthiness of a numeric property.\n\nThis rule is fixable, unless it's [unsafe to fix](#unsafe-to-fix-case).\n\nIn Vue templates, checks inside event handler statement bodies or block statements are reported without fixes or suggestions.\n\n## Zero comparisons\n\nEnforce comparison with `=== 0` when checking for zero length.\n\n### Examples\n\n```js\n// ❌\nconst isEmpty = !foo.length;\n\n// ❌\nconst isEmpty = foo.length == 0;\n\n// ❌\nconst isEmpty = foo.length < 1;\n\n// ❌\nconst isEmpty = foo.length <= 0;\n\n// ❌\nconst isEmpty = 0 === foo.length;\n\n// ❌\nconst isEmpty = 0 == foo.length;\n\n// ❌\nconst isEmpty = 1 > foo.length;\n\n// ❌\n// Negative style is disallowed too\nconst isEmpty = !(foo.length > 0);\n\n// ✅\nconst isEmpty = foo.length === 0;\n```\n\n```js\n// ❌\nconst isEmptySet = !foo.size;\n\n// ✅\nconst isEmptySet = foo.size === 0;\n```\n\n```vue\n<template>\n\t<!-- ❌ -->\n\t<div v-if=\"!foo.length\">Vue</div>\n\n\t<!-- ✅ -->\n\t<div v-if=\"foo.length === 0\">Vue</div>\n</template>\n```\n\n## Non-zero comparisons\n\nEnforce comparison with `> 0` when checking for non-zero length.\n\n### Examples\n\n```js\n// ❌\nconst isNotEmpty = foo.length !== 0;\n\n// ❌\nconst isNotEmpty = foo.length != 0;\n\n// ❌\nconst isNotEmpty = foo.length >= 1;\n\n// ❌\nconst isNotEmpty = 0 !== foo.length;\n\n// ❌\nconst isNotEmpty = 0 != foo.length;\n\n// ❌\nconst isNotEmpty = 0 < foo.length;\n\n// ❌\nconst isNotEmpty = 1 <= foo.length;\n\n// ❌\nconst isNotEmpty = Boolean(foo.length);\n\n// ❌\n// Negative style is disallowed too\nconst isNotEmpty = !(foo.length === 0);\n\n// ✅\nconst isNotEmpty = foo.length > 0;\n```\n\n```js\n// ❌\nif (foo.length || bar.length) {}\n\n// ✅\nif (foo.length > 0 || bar.length > 0) {}\n```\n\n```js\n// ❌\nconst unicorn = foo.length ? 1 : 2;\n\n// ✅\nconst unicorn = foo.length > 0 ? 1 : 2;\n```\n\n```js\n// ❌\nwhile (foo.length) {}\n\n// ✅\nwhile (foo.length > 0) {}\n```\n\n```js\n// ❌\ndo {} while (foo.length);\n\n// ✅\ndo {} while (foo.length > 0);\n```\n\n```js\n// ❌\nfor (; foo.length; ) {};\n\n// ✅\nfor (; foo.length > 0; ) {};\n```\n\n### Options\n\nYou can define your preferred way of checking non-zero length by providing a `non-zero` option (`greater-than` by default):\n\n```js\n{\n\t'unicorn/explicit-length-check': [\n\t\t'error',\n\t\t{\n\t\t\t'non-zero': 'not-equal'\n\t\t}\n\t]\n}\n```\n\nThe `non-zero` option can be configured with one of the following:\n\n- `greater-than` (default)\n  - Enforces non-zero to be checked with: `foo.length > 0`\n- `not-equal`\n  - Enforces non-zero to be checked with: `foo.length !== 0`\n\nThis rule does not support Yoda-style comparisons like `0 < foo.length`. If you use [`eslint/yoda`](https://eslint.org/docs/latest/rules/yoda), configure it to allow non-Yoda style for relational comparisons.\n\n## Unsafe to fix case\n\n`.length` check inside some expressions are not safe to fix.\n\nExample:\n\n```js\nconst bothNotEmpty = (a, b) => a.length && b.length;\n\nif (bothNotEmpty(foo, bar)) {}\n```\n\nIn this case, the `bothNotEmpty` function returns a `number`, but it will most likely be used as a `boolean`. The rule will still report this as an error, but without an auto-fix. You can apply a [suggestion](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions) in your editor, which will fix it to:\n\n```js\nconst bothNotEmpty = (a, b) => a.length > 0 && b.length > 0;\n\nif (bothNotEmpty(foo, bar)) {}\n```\n\n`!foo.length` used as the left side of a comparison is also unsafe to fix due to operator precedence.\n\n```js\n// ❌\nif (!foo.length > 0) {}\n```\n\nThe rule is smart enough to know some `LogicalExpression`s are safe to fix, like when it's inside `if`, `while`, etc.\n","isInternal":false,"tokens":1238,"sizeBytes":4422},{"name":"explicit-timer-delay.md","path":"docs/rules/explicit-timer-delay.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/explicit-timer-delay.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# explicit-timer-delay\n\n📝 Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen using [`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) or [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval), the `delay` parameter is optional and defaults to `0`. This rule allows you to enforce whether the `delay` argument should always be explicitly provided or omitted when it's `0`.\n\n## Examples\n\n```js\n// ❌\nsetTimeout(() => console.log('Hello'));\n\n// ✅\nsetTimeout(() => console.log('Hello'), 0);\n```\n\n```js\n// ❌\nsetInterval(callback);\n\n// ✅\nsetInterval(callback, 0);\n```\n\n```js\n// ❌\nwindow.setTimeout(() => console.log('Hello'));\n\n// ✅\nwindow.setTimeout(() => console.log('Hello'), 0);\n```\n\n```js\n// ❌\nglobalThis.setInterval(callback);\n\n// ✅\nglobalThis.setInterval(callback, 0);\n```\n\n```js\n// ✅\nsetTimeout(() => console.log('Hello'), 1000);\nsetInterval(callback, 100);\n```\n\n## Options\n\nType: `string`\\\nDefault: `'always'`\n\n- `'always'` (default)\n  - Require explicit `delay` argument for clarity.\n- `'never'`\n  - Disallow explicit `0` delay, prefer implicit default. Non-zero delays are still allowed.\n\n### `'never'`\n\n```js\n{\n\t'unicorn/explicit-timer-delay': ['error', 'never']\n}\n```\n\n```js\n// ❌\nsetTimeout(() => console.log('Hello'), 0);\n\n// ✅\nsetTimeout(() => console.log('Hello'));\n```\n\n```js\n// ❌\nsetInterval(callback, 0);\n\n// ✅\nsetInterval(callback);\n```\n\n```js\n// ❌\nwindow.setTimeout(() => console.log('Hello'), 0);\n\n// ✅\nwindow.setTimeout(() => console.log('Hello'));\n```\n\n```js\n// ❌\nglobalThis.setInterval(callback, 0);\n\n// ✅\nglobalThis.setInterval(callback);\n```\n\n```js\n// ✅\nsetTimeout(() => console.log('Hello'), 1000);\nglobalThis.setInterval(callback, 100);\n```\n","isInternal":false,"tokens":593,"sizeBytes":2226},{"name":"filename-case.md","path":"docs/rules/filename-case.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/filename-case.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# filename-case\n\n📝 Enforce a case style for filenames and directory names.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces filenames and directory names of linted files to use a certain case style and lowercase file extension. The default is `kebabCase`.\n\nConsistent paths make files predictable to find and import, including on case-sensitive filesystems.\n\nBecause this rule only inspects the path, it applies to files of any language, not just JavaScript, as long as they are linted with the matching ESLint language plugin (for example [`@eslint/css`](https://github.com/eslint/css) or [`@eslint/markdown`](https://github.com/eslint/markdown)).\n\nNamed virtual files created by processors are ignored to avoid duplicate reports for one physical file.\n\nDirectory names are checked only when the file is inside the current working directory. Files outside the current working directory only have their filename checked.\n\nConventional lowercase entrypoint filenames `index.js`, `index.mjs`, `index.cjs`, `index.ts`, `index.tsx`, and `index.vue` are intentionally ignored, including when `pascalCase` is selected. Their parent directories are still checked.\n\nCharacters other than `a-z`, `A-Z`, `0-9`, `-`, and `_` are ignored for casing and kept as-is in suggested names.\n\nThe case check ignores path segments starting with `$`, as they are commonly used for route parameters.\n\nSet the `checkDirectories` option to `false` to only check filenames.\n\n## Cases\n\n### `kebabCase`\n\n- `foo-bar.js`\n- `foo-bar.test.js`\n- `foo-bar.test-utils.js`\n\n### `camelCase`\n\n- `fooBar.js`\n- `fooBar.test.js`\n- `fooBar.testUtils.js`\n\n### `camelCaseWithAcronyms`\n\n- `innerHTML.js`\n- `getDOMRangeRect.js`\n- `apiURL.js`\n\nThis case style is still lower camel case. Leading acronyms are lowercased, for example `HTMLParser.js` should be `htmlParser.js`.\n\n### `snakeCase`\n\n- `foo_bar.js`\n- `foo_bar.test.js`\n- `foo_bar.test_utils.js`\n\n### `pascalCase`\n\n- `FooBar.js`\n- `FAQPage.js`\n- `FooBar.Test.js`\n- `FooBar.TestUtils.js`\n\n## Options\n\n### case\n\nType: `'camelCase' | 'camelCaseWithAcronyms' | 'snakeCase' | 'kebabCase' | 'pascalCase'`\n\nYou can set the `case` option like this:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'kebabCase',\n\t},\n]\n```\n\n### cases\n\nType: `{camelCase?: boolean, camelCaseWithAcronyms?: boolean, snakeCase?: boolean, kebabCase?: boolean, pascalCase?: boolean}`\n\nYou can set the `cases` option to allow multiple cases:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcases: {\n\t\t\tcamelCase: true,\n\t\t\tpascalCase: true,\n\t\t},\n\t},\n]\n```\n\nFor React projects, allow both kebab-case and PascalCase:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcases: {\n\t\t\tkebabCase: true,\n\t\t\tpascalCase: true,\n\t\t},\n\t},\n]\n```\n\nTo enforce PascalCase only for TypeScript and TSX files, use ESLint's `files` config:\n\n```js\nimport typescriptEslintParser from '@typescript-eslint/parser';\nimport {defineConfig} from 'eslint/config';\nimport unicorn from 'eslint-plugin-unicorn';\n\nexport default defineConfig([\n\t{\n\t\tplugins: {\n\t\t\tunicorn,\n\t\t},\n\t\trules: {\n\t\t\t'unicorn/filename-case': [\n\t\t\t\t'error',\n\t\t\t\t{\n\t\t\t\t\tcase: 'kebabCase',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\t{\n\t\tfiles: ['**/*.{ts,tsx}'],\n\t\tlanguageOptions: {\n\t\t\tparser: typescriptEslintParser,\n\t\t\tparserOptions: {\n\t\t\t\tecmaFeatures: {\n\t\t\t\t\tjsx: true,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\trules: {\n\t\t\t'unicorn/filename-case': [\n\t\t\t\t'error',\n\t\t\t\t{\n\t\t\t\t\tcase: 'pascalCase',\n\t\t\t\t\tcheckDirectories: false,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]);\n```\n\nThe override disables directory checking because rule options apply to both filenames and directory names.\n\nThe rule intentionally does not detect JSX syntax or React component exports. Non-component files can contain JSX too, like entrypoints, route files, tests, and `index.js`.\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nPath segments to ignore. If any path segment matches, the file is ignored.\n\nWhen a string is given, it's interpreted as a regular expression.\n\nSometimes you may have non-standard filenames or directory names in a project. This option lets you ignore those files or directories.\n\nFor example:\n\n- Vendor packages that are copied into the project.\n- Conventionally named files such as `README.md`.\n- Some tools may require special names for some files.\n- Ignore a directory and everything in it.\n\nDon't forget that you must escape special characters that you don't want to be interpreted as part of the regex, for example, if you have `[` in the actual path segment. For example, to match `[id].js`, use `/^\\[id]\\.js$/` or `'^\\\\[id]\\\\.js$'`.\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'kebabCase',\n\t\tignore: [\n\t\t\t'^FOOBAR\\\\.js$',\n\t\t\t'^vendor$',\n\t\t\t'^(B|b)az',\n\t\t\t'\\\\.SOMETHING\\\\.js$',\n\t\t\t/^fixtures$/i,\n\t\t],\n\t},\n]\n```\n\n### checkDirectories\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to check directory names. Filenames are always checked.\n\n### directoryRoots\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nDirectory roots below which directory names are checked. The matched root and its ancestors are skipped. Strings match exact `/`-separated paths relative to ESLint's current working directory. Regular expressions match the same paths; anchor them to avoid unintended deeper matches. The deepest match is used.\n\nFor example, check PascalCase directory names below multiple source roots:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'pascalCase',\n\t\tdirectoryRoots: [\n\t\t\t'app/javascript',\n\t\t\t/^packages\\/[^/]+\\/src$/u,\n\t\t],\n\t},\n]\n```\n\n### multipleFileExtensions\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to treat additional, `.`-separated parts of a filename as parts of the extension rather than parts of the filename.\n\nNote that the parts of the filename treated as the extension will not have the filename case enforced.\n\nThis only affects filenames. When `checkDirectories` is enabled, directory names are checked as full path segments.\n\nFor example:\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'pascalCase',\n\t},\n]\n\n// Results\n✅ FooBar.Test.js\n✅ FooBar.TestUtils.js\n✅ FooBar.testUtils.js\n✅ FooBar.test.js\n✅ FooBar.test-utils.js\n✅ FooBar.test_utils.js\n```\n\n```js\n'unicorn/filename-case': [\n\t'error',\n\t{\n\t\tcase: 'pascalCase',\n\t\tmultipleFileExtensions: false,\n\t},\n]\n\n// Results\n✅ FooBar.Test.js\n✅ FooBar.TestUtils.js\n❌ FooBar.testUtils.js\n❌ FooBar.test.js\n❌ FooBar.test-utils.js\n❌ FooBar.test_utils.js\n```\n","isInternal":false,"tokens":1825,"sizeBytes":6896},{"name":"id-match.md","path":"docs/rules/id-match.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/id-match.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# id-match\n\n📝 Require identifiers to match a specified regular expression.\n\n🚫 Disabled by default.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule is the same as the built-in ESLint [`id-match`](https://eslint.org/docs/latest/rules/id-match) rule, but with an additional `checkNamedSpecifiers` option.\n\nEnforcing an identifier pattern prevents names from drifting from a project's naming convention while keeping that convention configurable.\n\n## Replacement for ESLint `id-match`\n\nThis rule replaces ESLint's built-in `id-match` rule, which Unicorn presets disable when this rule is enabled.\n\n## Examples\n\n```js\n/* eslint unicorn/id-match: [\"error\", \"^[a-z]+$\"] */\n\n// ❌\nconst foo$ = 1;\n\n// ✅\nconst foo = 1;\n```\n\n## CSS and HTML\n\nIn CSS, the rule checks class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media. Dotted layer segments are checked separately. CSS escapes are decoded, and leading `--` is excluded when matching custom-property and custom-media names. Built-in value keywords and `animation` shorthand values are skipped.\n\nIn HTML, it checks `id` and individual `class` names after decoding character references, retaining any leading `--`. Empty or templated values are skipped. Character references make diagnostics span the whole attribute value. JavaScript-only options do not apply to CSS or HTML. Names have no autofix because references elsewhere may need updating.\n\n## Options\n\nThis rule supports the same options as ESLint `id-match`.\n\n### `properties`\n\nSet `properties` to `true` to check object and member property names.\n\n### `classFields`\n\nSet `classFields` to `true` to check class field names.\n\n### `onlyDeclarations`\n\nSet `onlyDeclarations` to `true` to only check declared identifiers.\n\n### `ignoreDestructuring`\n\nSet `ignoreDestructuring` to `true` to ignore identifiers in destructuring patterns.\n\n### `checkNamedSpecifiers`\n\nSet `checkNamedSpecifiers` to `false` to ignore named import specifiers and external named export specifiers:\n\n```js\n/* eslint unicorn/id-match: [\"error\", \"^[a-z]+$\", {\"checkNamedSpecifiers\": false}] */\n\n// ✅\nimport {foo$} from 'module';\n\n// ✅\nexport {foo$} from 'module';\n```\n\nOnly named import specifiers and external named export specifiers are ignored. Default imports, namespace imports, namespace re-exports, local export specifiers, and later references to imported bindings are still checked:\n\n```js\n/* eslint unicorn/id-match: [\"error\", \"^[a-z]+$\", {\"checkNamedSpecifiers\": false}] */\n\n// ❌\nimport foo$ from 'module';\n\n// ❌\nimport * as foo$ from 'module';\n\n// ❌\nexport * as foo$ from 'module';\n\n// ❌\nconst foo = 1;\nexport {foo as bar$};\n\n// ✅\nimport {bar$} from 'module';\n\n// ❌\nconst foo = bar$;\n```\n","isInternal":false,"tokens":665,"sizeBytes":2826},{"name":"import-style.md","path":"docs/rules/import-style.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/import-style.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# import-style\n\n📝 Enforce specific import styles per module.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nSometimes a module contains unrelated functions, like `util`, thus it is a good practice to enforce destructuring or named imports here. Other times, in modules like `path`, it is good to use default import as they have similar functions, all likely to be utilized.\n\nThis rule applies to modules listed in the `styles` option and the default styles below. Other imports are not affected.\n\nThis rule defines 4 import styles:\n\n- `unassigned` - `import 'foo'` or `require('foo')`\n- `default` - `import path from 'path'` or `const path = require('path')`\n- `namespace` - `import * as path from 'path'` or `const path = require('path')`\n- `named` - `import {inspect} from 'util'` or `const {inspect} = require('util')`\n\n## Examples\n\n```js\n// ❌\nconst util = require('node:util');\n\n// ✅\nconst {promisify} = require('node:util');\n```\n\n```js\n// ❌\nimport util from 'node:util';\n\n// ❌\nimport * as util from 'node:util';\n\n// ✅\nimport {promisify} from 'node:util';\n```\n\n```js\n// ❌\nimport * as path from 'node:path';\n\n// ✅\nimport path from 'node:path';\n```\n\n## Options\n\n### styles\n\nType: `object`\n\nYou can extend default import styles per module by passing the `styles` option.\n\nDefault options per module are:\n\n- `chalk` - `default` only\n- `path` - `default` only\n- `util` - `named` only\n\nImports with the `node:` protocol are matched as if the protocol were omitted. For example, `node:util` uses the same style as `util`. Configure these modules by their bare name, like `util` or `path`.\n\nThe example below:\n\n- Disables any restrictions on the `util` module imports.\n- Allows `named` import (leaving `default` allowed too) from the `path` module (by default only `default` import of `path` is allowed).\n\n```js\n'unicorn/import-style': [\n\t'error',\n\t{\n\t\tstyles: {\n\t\t\tutil: false,\n\t\t\tpath: {\n\t\t\t\tnamed: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\nDo not set all styles to `false` for a module. To disallow a module entirely, use the [`no-restricted-imports`](https://eslint.org/docs/latest/rules/no-restricted-imports) rule instead.\n\n### extendDefaultStyles\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"extendDefaultStyles\": false` to override the default `styles` option completely.\n\n### checkImport\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkImport\": false` to disable linting of static import statements (like `import ... from 'foo'` or `import 'foo'`) completely.\n\n### checkDynamicImport\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkDynamicImport\": false` to disable linting of dynamic import statements (like `await import('foo')`) completely.\n\n### checkExportFrom\n\nType: `boolean`\\\nDefault: `false`\n\nPass `\"checkExportFrom\": true` to enable linting of export-from statements (like `export ... from 'foo'`).\n\n### checkRequire\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkRequire\": false` to disable linting of `require` calls completely.\n","isInternal":false,"tokens":835,"sizeBytes":3186},{"name":"indent.md","path":"docs/rules/indent.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/indent.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# indent\n\n📝 Enforce consistent indentation in JSON and CSS.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce leading indentation in JSON, JSONC, and JSON5 ([`@eslint/json`](https://github.com/eslint/json)) and CSS ([`@eslint/css`](https://github.com/eslint/css)). JSON checks nesting depth; CSS checks indentation style only.\n\nJavaScript and TypeScript are excluded because their statements and expressions need more detailed indentation rules. Use [`@stylistic/indent`](https://eslint.style/rules/indent) for those languages.\n\n## Options\n\n### `indent`\n\nType: `'tab' | integer`\\\nDefault: `'tab'`\n\nUse tabs, or a positive integer to set the number of spaces per indentation unit. Mixed tabs and spaces are rejected.\n\n```js\n{\n\t'unicorn/indent': [\n\t\t'error',\n\t\t{\n\t\t\tindent: 2,\n\t\t},\n\t],\n}\n```\n\n### `tabWidth`\n\nType: `integer`\\\nDefault: `4`\n\nA positive integer tab stop width for CSS conversion, whether converting to tabs or spaces. Ignored for JSON.\n\n## Examples\n\n### JSON\n\nEach open object or array adds one level. A line starting with `}` or `]` uses one level less; only the first closing delimiter determines that line's indentation. Top-level content is unindented.\n\nFor `{indent: 2}`:\n\n```json\n{\n  \"items\": [\n    true\n  ]\n}\n```\n\nStrings and comments do not affect depth. JSON5 indentation whitespace, including non-breaking spaces, is replaced.\n\n### CSS\n\nAccepts any number of tabs in tab mode, or multiples of `indent` spaces in space mode. **Nesting depth is not checked**, so unindented lines are valid anywhere.\n\nFor `{indent: 2}`, both examples pass:\n\n```css\na {\n  color: red;\n}\n\nb {\ncolor: blue;\n}\n```\n\nFixes expand tabs using tab stops, then round width up to a whole indentation unit. With defaults, four spaces become one tab, five become two tabs, and a space followed by a tab becomes one tab. With `{indent: 2, tabWidth: 4}`, a tab followed by a space becomes six spaces.\n\nOnly ASCII spaces and tabs are treated as indentation. Unicode identifier characters, including non-breaking spaces, are preserved.\n\n## Preserved content\n\nPreserves inline spacing, trailing whitespace, line endings, and non-whitespace token contents. Ignores blank lines and continuation lines inside multiline tokens and comments. Indentation before comment openers is checked.\n","isInternal":false,"tokens":593,"sizeBytes":2516},{"name":"isolated-functions.md","path":"docs/rules/isolated-functions.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/isolated-functions.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# isolated-functions\n\n📝 Prevent usage of variables from outside the scope of isolated functions.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nSome functions need to be isolated from their surrounding scope due to execution context constraints. For example, functions passed to [`makeSynchronous()`](https://github.com/sindresorhus/make-synchronous) are executed in a worker or subprocess and cannot access variables from outside their scope. This rule helps identify when functions are using external variables that may cause runtime errors.\n\nCommon scenarios where functions must be isolated:\n\n- Functions passed to `makeSynchronous()` (executed in a worker)\n- Functions passed to `workerize()`\n- Functions passed to `page.evaluate()` in Puppeteer or Playwright style code\n- Functions that will be serialized via `Function.prototype.toString()`\n- Server actions or other remote execution contexts\n- Functions with specific JSDoc annotations\n\nBy default, this rule allows ES globals like `Array` and `Map`, and ESLint-resolved global variables from configuration or `/* global */` comments like `console` and `fetch`, in isolated functions, but prevents usage of variables from the surrounding scope.\n\n## Examples\n\n```js\n/* global fetch, console */\nimport makeSynchronous from 'make-synchronous';\n\nconst url = 'https://example.com';\n\nconst getText = makeSynchronous(async () => {\n\tconst response = await fetch(url); // ❌ 'url' is not defined in isolated function scope\n\treturn response.text();\n});\n\n// ✅ Define all variables within isolated function's scope\nconst getText = makeSynchronous(async () => {\n\tconst url = 'https://example.com'; // Variable defined within function scope\n\tconst response = await fetch(url);\n\treturn response.text();\n});\n\n// ✅ Alternative: Pass as parameter\nconst getText = makeSynchronous(async (url) => { // Variable passed as parameter\n\tconst response = await fetch(url);\n\treturn response.text();\n});\n\nconsole.log(getText('https://example.com'));\n```\n\n```js\nconst foo = 'hi';\n\n/** @isolated */\nfunction abc() {\n\treturn foo.slice(); // ❌ 'foo' is not defined in isolated function scope\n}\n\nconst object = {\n\t/** @isolated */\n\tmethod() {\n\t\treturn this.foo; // ❌ 'this' depends on external object state\n\t},\n};\n\n// ✅\n/** @isolated */\nfunction abc() {\n\tconst foo = 'hi'; // Variable defined within function scope\n\treturn foo.slice();\n}\n```\n\n## Options\n\nType: `object`\n\n### functions\n\nType: `string[]`\\\nDefault: `['makeSynchronous', 'workerize']`\n\nArray of function names that create isolated execution contexts. Functions passed as arguments to these functions will be considered isolated.\n\nThe rule also detects these common isolated execution APIs by default:\n\n- `browser.execute(fn)`\n- `page.evaluate(fn)`\n- `chrome.scripting.executeScript({func: () => {}})`\n- `browser.scripting.executeScript({func: () => {}})`\n\nGeneric names like `serialize`, `isolate`, and `memoize` are not enabled by default. Add project-specific serializer names to `functions` when they should be treated as isolated.\n\nOther `evaluate` calls are not enabled by default. Use `selectors` to opt into project-specific APIs that do not use the variable name `page`.\n\n### selectors\n\nType: `string[]`\\\nDefault: `[]`\n\nArray of [ESLint selectors](https://eslint.org/docs/developer-guide/selectors) to identify isolated functions. Useful for custom naming conventions or framework-specific patterns.\n\nSelectors must match the function node that should be treated as isolated. To isolate functions passed to a matching call expression, use ESLint selector syntax to select the function argument:\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tselectors: [\n\t\t\t\t'FunctionDeclaration[id.name=/lambdaHandler.*/]',\n\t\t\t\t'CallExpression[callee.property.name=/CodemodScript/] > :function'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### comments\n\nType: `string[]`\\\nDefault: `['@isolated']`\n\nArray of comment strings that mark functions as isolated. Functions with inline, block, or JSDoc comments tagged with these strings will be considered isolated. (Definition of \"tagged\": either the comment consists solely of the tag, or starts with it, and has an explanation following a hyphen, like `// @isolated - this function will be stringified`).\n\nTagged comments also apply to object methods, object properties whose value is a function expression or arrow function, and class methods. Isolated functions cannot use `this` or `super`; pass required state as parameters instead.\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tcomments: [\n\t\t\t\t'@isolated',\n\t\t\t\t'@remote'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### overrideGlobals\n\nType: `object`\\\nDefault: `{}`\n\nOverrides how specific global variables are handled. An empty object means no overrides; ES globals and ESLint-resolved globals from configuration or `/* global */` comments still apply. When specified as an object, each key is a global variable name and the value controls its behavior:\n\n- `'readonly'`: Global variable is allowed but cannot be written to\n- `'writable'`: Global variable is allowed and can be read/written\n- `'off'`: Global variable is not allowed\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\toverrideGlobals: {\n\t\t\t\tconsole: 'writable',     // Allowed and writable\n\t\t\t\tfetch: 'readonly',       // Allowed but readonly\n\t\t\t\tprocess: 'off'           // Not allowed\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n## Configuration examples\n\n### Custom function names\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tfunctions: [\n\t\t\t\t'makeSynchronous',\n\t\t\t\t'workerize',\n\t\t\t\t'createWorker',\n\t\t\t\t'serializeFunction'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### Lambda function naming convention\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\tselectors: [\n\t\t\t\t'FunctionDeclaration[id.name=/lambdaHandler.*/]'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n```js\nconst foo = 'hi';\n\nfunction lambdaHandlerFoo() { // ❌ Will be flagged as isolated\n\treturn foo.slice();\n}\n\nfunction someOtherFunction() { // ✅ Not flagged\n\treturn foo.slice();\n}\n\ncreateLambda({\n\tname: 'fooLambda',\n\tcode: lambdaHandlerFoo.toString(), // Function will be serialized\n});\n```\n\n### Configured globals\n\n```js\n/* global console, fetch */\n\nmakeSynchronous(async () => {\n\tconsole.log('Starting...'); // ✅ Allowed if console is configured as a global\n\tconst response = await fetch('https://api.example.com'); // ✅ Allowed if fetch is configured as a global\n\treturn response.text();\n});\n```\n\n### Overriding specific globals\n\n`overrideGlobals` only overrides the listed names. It does not replace ES globals or ESLint-resolved globals from configuration or `/* global */` comments.\n\n```js\n{\n\t'unicorn/isolated-functions': [\n\t\t'error',\n\t\t{\n\t\t\toverrideGlobals: {\n\t\t\t\tconsole: 'writable',     // Allowed and writable\n\t\t\t\tfetch: 'readonly',       // Allowed but readonly\n\t\t\t\tURL: 'readonly'          // Allowed but readonly\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n```js\n// ✅ All globals used are ES globals, ESLint-resolved globals, or explicitly overridden\nmakeSynchronous(async () => {\n\tconsole.log('Starting...'); // ✅ Allowed global\n\tconst response = await fetch('https://api.example.com'); // ✅ Allowed global\n\tconst url = new URL(response.url); // ✅ Allowed global\n\treturn response.text();\n});\n\nmakeSynchronous(async () => {\n\tconst response = await fetch('https://api.example.com', {\n\t\theaders: {\n\t\t\t'Authorization': `Bearer ${process.env.API_TOKEN}` // ❌ 'process' is not configured as an ESLint global or overrideGlobals entry\n\t\t}\n\t});\n\n\tconst url = new URL(response.url);\n\n\treturn response.text();\n});\n\n// ❌ Attempting to write to readonly global\nmakeSynchronous(async () => {\n\tfetch = null; // ❌ 'fetch' is readonly\n\tconsole.log('Starting...');\n});\n```\n\n### Predefined global variables\n\nTo enable a predefined set of globals, use the [`globals` package](https://npmjs.com/package/globals) similarly to how you would use it in `languageOptions` (see [ESLint docs on globals](https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables)):\n\n```js\nimport {defineConfig} from 'eslint/config';\nimport unicorn from 'eslint-plugin-unicorn';\nimport globals from 'globals';\n\nexport default defineConfig([\n\t{\n\t\tplugins: {\n\t\t\tunicorn,\n\t\t},\n\t\tlanguageOptions: {\n\t\t\tglobals: {\n\t\t\t\t...globals.builtin,\n\t\t\t\t...globals.applescript,\n\t\t\t\t...globals.greasemonkey,\n\t\t\t},\n\t\t},\n\t\trules: {\n\t\t\t'unicorn/isolated-functions': [\n\t\t\t\t'error',\n\t\t\t],\n\t\t},\n\t},\n]);\n```\n","isInternal":false,"tokens":2060,"sizeBytes":8697},{"name":"iteration-fallback-style.md","path":"docs/rules/iteration-fallback-style.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/iteration-fallback-style.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# iteration-fallback-style\n\n📝 Enforce a consistent style for optional loop sources.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce a consistent style for optional loop sources. A guard skips the loop without creating an empty collection, while a fallback keeps the loop compact. The `guard` style is the default.\n\nThe rule checks direct `for…of` and `for await…of` loops that use empty array fallbacks or matching guards, loops over `Object.keys()`, `Object.values()`, or `Object.entries()` that use empty object fallbacks or matching guards, and `for…in` loops with empty object fallbacks or matching guards.\n\n## Examples\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'guard'] */\n\n// ❌\nfor (const item of items || []) {\n\tuse(item);\n}\n\n// ✅\nif (items) {\n\tfor (const item of items) {\n\t\tuse(item);\n\t}\n}\n```\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'guard'] */\n\n// ❌\nfor (const [key, value] of Object.entries(options.config || {})) {\n\tuse(key, value);\n}\n\n// ✅\nif (options.config) {\n\tfor (const [key, value] of Object.entries(options.config)) {\n\t\tuse(key, value);\n\t}\n}\n```\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'fallback'] */\n\n// ❌\nif (items) {\n\tfor (const item of items) {\n\t\tuse(item);\n\t}\n}\n\n// ✅\nfor (const item of items || []) {\n\tuse(item);\n}\n```\n\n```js\n/* eslint unicorn/iteration-fallback-style: ['error', 'fallback'] */\n\n// ❌\nif (options.config) {\n\tfor (const [key, value] of Object.entries(options.config)) {\n\t\tuse(key, value);\n\t}\n}\n\n// ✅\nfor (const [key, value] of Object.entries(options.config || {})) {\n\tuse(key, value);\n}\n```\n\n## Options\n\nType: `string`\\\nDefault: `'guard'`\n\n### `guard`\n\nPrefer an `if` guard over an empty fallback.\n\n### `fallback`\n\nPrefer an empty fallback over an `if` guard.\n\nTruthiness guards correspond to `||` fallbacks, while `source != null` guards correspond to `??` fallbacks.\n\nOnly direct loop guards and fallbacks are checked. Autofixes are limited to simple synchronous `for…of` loops with reference sources; `for await…of` and `for…in` are reported but not fixed. Getters, Proxies, `document.all`, and enumerable `Object.prototype` properties are not accounted for.\n","isInternal":false,"tokens":626,"sizeBytes":2441},{"name":"key-name-casing.md","path":"docs/rules/key-name-casing.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/key-name-casing.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# key-name-casing\n\n📝 Enforce a case style for data keys.\n\n🚫 Disabled by default.\n\n<!-- end auto-generated rule header -->\n\nEnforce a consistent case style for decoded keys in JSON, JSONC, JSON5, SOML, TOML, and YAML. This includes unquoted JSON5 keys, YAML string keys (except plain `<<` merge keys), and TOML key segments, including table names. Non-string YAML keys, tagged, anchored, and alias keys, and string values are skipped.\n\nRenaming keys can break consumers in other files, so the rule has no fixes or suggestions.\n\n## Examples\n\n```jsonc\n// ❌\n{\"user_name\": 1, \"nested\": {\"OtherKey\": 2}}\n\n// ✅\n{\"userName\": 1, \"nested\": {\"otherKey\": 2}}\n```\n\nThe rule also reports YAML `user-name: 1` and TOML `[user_settings]` with the default `camelCase` style.\n\n## Options\n\nType: `object`\n\nEach enabled case is accepted. `camelCase` is enabled by default; set it to `false` when choosing another case exclusively. If all cases are disabled, no keys are checked.\n\n| Option | Default | Example |\n| --- | --- | --- |\n| `camelCase` | `true` | `userName` |\n| `PascalCase` | `false` | `UserName` |\n| `SCREAMING_SNAKE_CASE` | `false` | `USER_NAME` |\n| `'kebab-case'` | `false` | `user-name` |\n| `snake_case` | `false` | `user_name` |\n\nCase styles use canonical conversions from `change-case`. Acronyms are normalized, so `userId` is camelCase while `userID` is not. Empty keys and keys containing whitespace or punctuation fail unless explicitly ignored.\n\n```js\n'unicorn/key-name-casing': ['error', {\n\tcamelCase: false,\n\tsnake_case: true,\n\tSCREAMING_SNAKE_CASE: true,\n}]\n```\n\n### ignore\n\nType: `string[]`\\\nDefault: `[]`\n\nRegular expression patterns matching decoded key names to ignore. Patterns are not automatically anchored. Use `^` and `$` to match a complete name.\n\n```js\n'unicorn/key-name-casing': ['error', {\n\tignore: ['^\\\\$schema$', '^x-'],\n}]\n```\n","isInternal":false,"tokens":503,"sizeBytes":1855},{"name":"logical-assignment-operators.md","path":"docs/rules/logical-assignment-operators.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/logical-assignment-operators.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# logical-assignment-operators\n\n📝 Require or disallow logical assignment operator shorthand.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule is the same as the built-in ESLint [`logical-assignment-operators`](https://eslint.org/docs/latest/rules/logical-assignment-operators) rule, but when `enforceForIfStatements` is enabled, falsy `if` assignments are reported with suggestions for both `||=` and `??=` instead of being autofixed.\n\nConsistently choosing logical-assignment shorthand or an explicit assignment or conditional makes updates easier to scan and avoids mixing the same pattern in different forms.\n\n## Replacement for ESLint `logical-assignment-operators`\n\nThis rule replaces ESLint's built-in `logical-assignment-operators` rule, which Unicorn presets disable when this rule is enabled.\n\n## Examples\n\n```js\n/* eslint unicorn/logical-assignment-operators: [\"error\", \"always\", {\"enforceForIfStatements\": true}] */\n\n// ❌\nif (!foo) {\n\tfoo = bar;\n}\n\n// ✅\nfoo ||= bar;\n\n// ✅\nfoo ??= bar;\n```\n\nComputed properties are supported too:\n\n```js\n/* eslint unicorn/logical-assignment-operators: [\"error\", \"always\", {\"enforceForIfStatements\": true}] */\n\n// ❌\nif (!object[key]) {\n\tobject[key] = [];\n}\n\n// ✅\nobject[key] ||= [];\n\n// ✅ When the intent is to replace only null or undefined values\nobject[key] ??= [];\n```\n\nProperty checks such as `key in object`, `object.hasOwnProperty(key)`, `Object.hasOwn(object, key)`, and `Object.keys(object).includes(key)` are not reported. They check for a property rather than a nullish value. For example, an `Object.hasOwn()` guard preserves an own property set to `undefined` and does not treat an inherited `constructor` as an own property. Replacing that guard with `??=` would change both behaviors.\n\n## Options\n\nThis rule supports the same options as ESLint `logical-assignment-operators`.\n","isInternal":false,"tokens":582,"sizeBytes":2464},{"name":"max-nested-calls.md","path":"docs/rules/max-nested-calls.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/max-nested-calls.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# max-nested-calls\n\n📝 Limit the depth of nested calls.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nDeeply nested calls make code hard to read. Extract intermediate results to named variables instead.\n\nThis rule counts calls and constructor calls passed into other calls or constructors. Fluent receiver chains and JSX wrappers are ignored.\n\n## Examples\n\n```js\n// ❌\nfoo(bar(baz(qux())));\n\n// ✅\nconst value = baz(qux());\nfoo(bar(value));\n```\n\n```js\n// ✅\nquery().filter().map().toArray();\n```\n\n## Options\n\n### max\n\nType: `integer`\\\nDefault: `3`\n\nThe maximum allowed nested call depth.\n\n```js\n/* eslint unicorn/max-nested-calls: [\"error\", {\"max\": 4}] */\n// ✅\nfoo(bar(baz(qux())));\n```\n","isInternal":false,"tokens":271,"sizeBytes":1044},{"name":"name-replacements.md","path":"docs/rules/name-replacements.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/name-replacements.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# name-replacements\n\n📝 Enforce replacements for variable, property, and filenames.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUsing clear names results in more readable code. Code is written only once, but read many times.\n\nThis rule enforces replacements for names, including variables, properties, imports, and filenames. The default replacements focus on common abbreviations, but the rule can also be used to replace terms, disallow words, etc. See the [`replacements`](#replacements) and [`extendDefaultReplacements`](#extenddefaultreplacements) options.\n\nYou can find the default replacements [here](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/rules/shared/name-replacements.js).\n\nThis rule is automatically fixable only for variable names with exactly one replacement defined. Ambiguous variable names and checked property names can be manually fixed with editor suggestions when the rename is local to source text. Filename reports and exported-name property reports do not provide editor suggestions.\n\nParameter names do not provide autofixes or editor suggestions when the function has an attached JSDoc `@param` comment, as those name references are not normal variable references and would otherwise be left stale. TypeScript parameter properties also do not provide autofixes or editor suggestions, as the corresponding class property references are not part of the parameter variable's references. TypeScript type predicate and assertion signature parameter references are updated when the parameter is renamed.\n\nTypeScript enum members are not checked, as a member access like `Foo.err` is not a reference to the member and would not be renamed with it.\n\n## React\n\nReact projects commonly use abbreviation families like `props`, `ref`, `prevState`, and route `params`. The `replacements` option disables matching those words both as complete identifiers and as parts of longer identifiers, for example `someRef`.\n\nUse an ESLint `files` override if you only want to allow those conventions in React files:\n\n```js\n{\n\tfiles: ['**/*.{jsx,tsx}'],\n\trules: {\n\t\t'unicorn/name-replacements': [\n\t\t\t'error',\n\t\t\t{\n\t\t\t\treplacements: {\n\t\t\t\t\tparam: false,\n\t\t\t\t\tparams: false,\n\t\t\t\t\tprev: false,\n\t\t\t\t\tprop: false,\n\t\t\t\t\tprops: false,\n\t\t\t\t\tref: false,\n\t\t\t\t\trefs: false,\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n}\n```\n\n## Examples\n\n```js\n// ❌\nconst e = new Error();\n\n// ✅\nconst error = new Error();\n```\n\n```js\n// ❌\nconst e = document.createEvent('Event');\n\n// ✅\nconst event = document.createEvent('Event');\n```\n\n```js\n// ❌\nclass Btn {}\n\n// ✅\nclass Button {}\n```\n\n```js\n// ✅\n// Property is not checked by default\nconst levels = {\n\terr: 0\n};\n```\n\n```js\n// ✅\n// Property is not checked by default\nthis.evt = 'click';\n```\n\n## Data keys, CSS, and HTML\n\nWith `checkProperties: true`, the rule checks JSON object keys, YAML string keys, TOML key segments (including table names), and SOML keys. It skips YAML non-string, tagged, anchored, and alias keys, plus string values.\n\nWith `checkVariables` (enabled by default), it checks CSS class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media, plus HTML `id` and individual `class` names. Built-in CSS property names and value keywords, and `animation` shorthand values are skipped. CSS escapes and HTML character references are decoded; templated HTML values are skipped.\n\nIgnore patterns match full decoded names, including `--`. Data and CSS/HTML diagnostics have no fixes or suggestions because names may be referenced elsewhere. `checkFilenames` also applies to data, CSS, and HTML files.\n\n## Options\n\nType: `object`\n\n### replacements\n\nType: `object`\n\nYou can extend default replacements by passing the `replacements` option.\n\nUse this to configure discouraged terms and their replacements. To allow a specific full identifier, use [`allowList`](#allowlist) instead.\n\nLowercase replacements will match both camelcase and pascalcase identifiers. For example, `err` will match both `err` and `Err`. `errCb` will match both `errCb` and `ErrCb`.\n\nLowercase replacements will match both complete identifiers and separate words inside identifiers. For example, `cmd` will match all of `cmd`, `createCmd` and `CmdFactory`.\n\nCamelcase replacements will only match complete identifiers. For example `errCb` will only match `errCb` and `ErrCb`. It will not match `fooErrCb` or `errCbFoo`.\n\nThe example below:\n\n- disables the default `e` → `event` replacement (leaving `e` → `error` enabled),\n- disables `res` replacement completely (both `res` → `response` and `res` → `result` from defaults are disabled),\n- adds a custom `usr` → `user` replacement,\n- adds a custom `errCb` → `handleError` replacement.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\te: {\n\t\t\t\tevent: false,\n\t\t\t},\n\t\t\tres: false,\n\t\t\tusr: {\n\t\t\t\tuser: true,\n\t\t\t},\n\t\t\terrCb: {\n\t\t\t\thandleError: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"extendDefaultReplacements\": false` to override the default `replacements` completely.\n\nThe example below disables all the default replacements and enables a custom `usr` → `user` one.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\textendDefaultReplacements: false,\n\t\treplacements: {\n\t\t\tusr: {\n\t\t\t\tuser: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\nDefaults can also include terminology preferences that are not abbreviations. Use custom replacements for project-specific preferences:\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\tpage: {\n\t\t\t\tscreen: true,\n\t\t\t},\n\t\t\tpages: {\n\t\t\t\tscreens: true,\n\t\t\t},\n\t\t},\n\t},\n]\n```\n\n### allowList\n\nType: `object`\n\nYou can extend the default allowList by passing the `allowList` option.\n\nUnlike the `replacements` option, `allowList` matches full identifier names case-sensitively.\n\nFor example, if you want to report `props` → `properties` (enabled by default), but allow `getInitialProps`, you could use the following configuration.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\tallowList: {\n\t\t\tgetInitialProps: true,\n\t\t},\n\t},\n]\n```\n\nFor example, `allowList: {elementRef: true}` allows `elementRef` while still reporting `ref`.\n\n### extendDefaultAllowList\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"extendDefaultAllowList\": false` to override the default `allowList` completely.\n\n### checkDefaultAndNamespaceImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in default or namespace import, **but only for internal modules**.\n- `true` - Check variables declared in default or namespace import.\n- `false` - Don't check variables declared in default or namespace import.\n\nBy default, the following code will be reported:\n\n```js\nimport * as err from './err';\n```\n\n```js\nimport err from '/err';\n```\n\nWith this set to `true`, the following code will be reported:\n\n```js\nimport tempWrite from 'temp-write';\n```\n\n```js\nimport * as err from 'err';\n```\n\n### checkShorthandImports\n\nType: `'internal'` | `boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in shorthand import, **but only for internal modules**.\n- `true` - Check variables declared in shorthand import.\n- `false` - Don't check variables declared in default shorthand import.\n\nBy default, the following code will be reported:\n\n```js\nimport {prop} from './foo';\n```\n\nWith this set to `true`, the following code will be reported:\n\n```js\nimport {prop} from 'ramda';\n```\n\n### checkShorthandProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `\"checkShorthandProperties\": true` to check variables declared as shorthand properties in object destructuring.\n\nWith this set to `true` the following code will be reported.\n\n```js\nconst {err} = foo;\n```\n\n```js\nfunction f({err}) {}\n```\n\n### checkProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `\"checkProperties\": true` to enable checking property names.\n\n### checkVariables\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkVariables\": false` to disable checking variable names.\n\n### checkFilenames\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkFilenames\": false` to disable checking filenames.\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nThis option lets you specify a regex pattern for matches to ignore.\n\nWhen a string is given, it's interpreted as a regular expression inside a string.\n\n```js\n'unicorn/name-replacements': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'\\\\.fixtures$',\n\t\t\t/^ignore/i,\n\t\t],\n\t},\n]\n```\n\nWhen checking filenames, only the basename is tested. For example, with a file named `foo.fixtures.js`, `ignore: [/\\.fixtures$/]` would pass and `ignore: [/\\.fixtures\\.js/]` would fail.\n","isInternal":false,"tokens":2276,"sizeBytes":9434},{"name":"new-for-builtins.md","path":"docs/rules/new-for-builtins.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/new-for-builtins.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# new-for-builtins\n\n📝 Enforce correct use of `new` for builtin constructors.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nMany builtin constructors can be called with or without `new`, but `new` should be preferred for consistency with constructors that require it. This rule also reports selected builtin namespace objects that are not callable or constructible.\n\nFor non-callable top-level namespace objects covered by ESLint core, like `Math`, `JSON`, `Reflect`, `Atomics`, `Intl`, and `Temporal`, use [`no-obj-calls`](https://eslint.org/docs/latest/rules/no-obj-calls).\n\nEnforces the use of `new` for the following builtins:\n\n- [`Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n- [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)\n- [`AsyncDisposableStack`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncDisposableStack)\n- [`BigInt64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array)\n- [`BigUint64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array)\n- [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)\n- [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`DisposableStack`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DisposableStack)\n- [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)\n- [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError)\n- [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError)\n- [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array)\n- [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array)\n- [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array)\n- [`Function`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)\n- [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array)\n- [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array)\n- [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array)\n- [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)\n- [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError)\n- [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError)\n- [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)\n- [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)\n- [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet)\n- [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n- [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n- [`SuppressedError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SuppressedError)\n- [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError)\n- [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError)\n- [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)\n- [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array)\n- [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array)\n- [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray)\n- [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)\n- [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer)\n- [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy)\n- [`WeakRef`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef)\n- [`FinalizationRegistry`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry)\n- [`Intl.Collator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator)\n- [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)\n- [`Intl.DisplayNames`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames)\n- [`Intl.DurationFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat)\n- [`Intl.ListFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat)\n- [`Intl.Locale`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale)\n- [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat)\n- [`Intl.PluralRules`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules)\n- [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat)\n- [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)\n- [`Temporal.Duration`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration)\n- [`Temporal.Instant`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant)\n- [`Temporal.PlainDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate)\n- [`Temporal.PlainDateTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime)\n- [`Temporal.PlainMonthDay`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay)\n- [`Temporal.PlainTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime)\n- [`Temporal.PlainYearMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth)\n- [`Temporal.ZonedDateTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime)\n- [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module)\n- [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Instance)\n- [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Memory)\n- [`WebAssembly.Table`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Table)\n- [`WebAssembly.Global`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Global)\n- [`WebAssembly.Tag`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Tag)\n- [`WebAssembly.Exception`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Exception)\n- [`WebAssembly.CompileError`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/CompileError)\n- [`WebAssembly.LinkError`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/LinkError)\n- [`WebAssembly.RuntimeError`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/RuntimeError)\n\nDisallows the use of `new` for the following builtins:\n\n- [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`Boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)\n- [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)\n\n> These should not use `new` as that would create object wrappers for the primitive values, which is not what you want. However, without `new` they can be useful for coercing a value to that type.\n\nThis rule is fixable, except `new String()`, `new Number()`, and `new Boolean()`, which [return wrapped objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#String_primitives_and_String_objects). `RegExp(regex)` returns `regex` itself, while `new RegExp(regex)` returns a copy with `lastIndex` reset, which is not preserved by the fix. Optional chains that would require adding `new` are ignored, as `new` cannot be optional. Reports for builtin namespace objects are not fixable.\n\nDisallows calling or constructing the following builtin namespace objects:\n\n- [`Temporal.Now`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now)\n- [`WebAssembly`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface)\n- [`WebAssembly.JSTag`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface)\n\n## Examples\n\n```js\n// ❌\nconst list = Array(10);\n\n// ✅\nconst list = new Array(10);\n```\n\n```js\n// ❌\nconst now = Date();\n\n// ✅\nconst now = String(new Date());\n```\n\n```js\n// ❌\nconst map = Map([\n\t['foo', 'bar']\n]);\n\n// ✅\nconst map = new Map([\n\t['foo', 'bar']\n]);\n```\n","isInternal":false,"tokens":2540,"sizeBytes":10873},{"name":"no-abusive-eslint-disable.md","path":"docs/rules/no-abusive-eslint-disable.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-abusive-eslint-disable.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# no-abusive-eslint-disable\n\n📝 Enforce specifying rules to disable in `eslint-disable` comments.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 📚 `recommended-markdown`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule makes you specify the rules you want to disable when using `eslint-disable`, `eslint-disable-line` or `eslint-disable-next-line` comments.\n\nBecause it inspects the disable directives themselves, it applies to files of any language that supports them, not just JavaScript, when linted with the matching ESLint language plugin (for example [`@eslint/css`](https://github.com/eslint/css) or [`@eslint/markdown`](https://github.com/eslint/markdown)).\n\nIf you want to disable an ESLint rule in a file or on a specific line, you can add a comment.\n\nOn a single line:\n\n```js\nconst message = 'foo';\nconsole.log(message); // eslint-disable-line no-console\n\n// eslint-disable-next-line no-console\nconsole.log(message);\n```\n\nOn the whole (rest of the) file:\n\n```js\n/* eslint-disable no-console */\nconst message = 'foo';\nconsole.log(message);\n```\n\nYou don't have to specify any rules (like `no-console` in the examples above), but you should, as you might otherwise hide useful errors.\n\n```js\n/* eslint-disable */\nconsole.log(message); // `message` is not defined, but it won't be reported\n```\n\nThis rule enforces specifying the rules to disable. If you want to disable ESLint on a file altogether, you should ignore it through [`.eslintignore`](https://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories) for ESLint or through the [`ignores` property](https://github.com/xojs/xo#ignores) in `package.json` for `XO`.\n\n## Examples\n\n```js\n// ❌\n/* eslint-disable */\nconsole.log(message);\n\n// ✅\n/* eslint-disable no-console */\nconsole.log(message);\n```\n\n```js\n// ❌\nconsole.log(message); // eslint-disable-line\n\n// ✅\nconsole.log(message); // eslint-disable-line no-console\n```\n\n```js\n// ❌\n// eslint-disable-next-line\nconsole.log(message);\n\n// ✅\n// eslint-disable-next-line no-console\nconsole.log(message);\n```\n","isInternal":false,"tokens":586,"sizeBytes":2405},{"name":"no-accessor-recursion.md","path":"docs/rules/no-accessor-recursion.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-accessor-recursion.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# no-accessor-recursion\n\n📝 Disallow recursive access to `this` within getters and setters.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule prevents recursive access to `this` within getter and setter methods in objects and classes, avoiding infinite recursion and stack overflow errors.\n\n## Examples\n\n```js\n// ❌\nconst foo = {\n\tget bar() {\n\t\treturn this.bar;\n\t}\n};\n\n// ✅\nconst foo = {\n\tget bar() {\n\t\treturn this.baz;\n\t}\n};\n```\n\n```js\n// ❌\nclass Foo {\n\tget bar() {\n\t\treturn this.bar;\n\t}\n}\n\n// ✅\nclass Foo {\n\tget bar() {\n\t\treturn this.baz;\n\t}\n}\n```\n\n```js\n// ❌\nconst foo = {\n\tset bar(value) {\n\t\tthis.bar = value;\n\t}\n};\n\n// ✅\nconst foo = {\n\tset bar(value) {\n\t\tthis._bar = value;\n\t}\n};\n```\n\n```js\n// ❌\nclass Foo {\n\tset bar(value) {\n\t\tthis.bar = value;\n\t}\n}\n\n// ✅\nclass Foo {\n\tset bar(value) {\n\t\tthis._bar = value;\n\t}\n}\n```\n","isInternal":false,"tokens":312,"sizeBytes":1089},{"name":"no-accidental-bitwise-operator.md","path":"docs/rules/no-accidental-bitwise-operator.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-accidental-bitwise-operator.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# no-accidental-bitwise-operator\n\n📝 Disallow bitwise operators where a logical operator was likely intended.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nBitwise operators (`&`, `|`, `|=`) are rarely used in everyday code, and when they show up in boolean-like contexts they are almost always a typo for the logical operators (`&&`, `||`, `||=`).\n\nThe bug is easy to miss and hard to debug:\n\n- Bitwise operators do not [short-circuit](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND#short-circuit_evaluation), so `if (object & object.property)` evaluates `object.property` even when `object` is `null` or `undefined`, throwing a `TypeError`.\n- `options | {}` coerces both sides to integers, silently producing `options | 0` instead of falling back to the default object.\n\nThis rule only targets the high-signal patterns where a logical operator was clearly intended, so it does not flag legitimate bitwise math like `flags & MASK` or `value | 0`. Because switching the operator changes runtime behavior, the fix is offered as a suggestion rather than applied automatically.\n\nThis is more targeted than the built-in [`no-bitwise`](https://eslint.org/docs/latest/rules/no-bitwise) rule, which disallows all bitwise operators. See also [`prefer-math-trunc`](./prefer-math-trunc.md), which covers the `value | 0` truncation idiom.\n\n## Examples\n\n```js\n// ❌\nif (object & object.property) {\n\t// …\n}\n\n// ✅\nif (object && object.property) {\n\t// …\n}\n```\n\n```js\n// ❌\noptions = options | {};\n\n// ✅\noptions = options || {};\n```\n\n```js\n// ❌\ninput |= '';\n\n// ✅\ninput ||= '';\n```\n\n```js\n// ✅ Not flagged: legitimate bitwise math\nconst masked = flags & MASK;\nconst truncated = value | 0;\n```\n","isInternal":false,"tokens":516,"sizeBytes":2108},{"name":"no-anonymous-default-export.md","path":"docs/rules/no-anonymous-default-export.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-anonymous-default-export.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# no-anonymous-default-export\n\n📝 Disallow anonymous functions and classes as the default export.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nNaming default exports improves codebase searchability by ensuring consistent identifier use for a module's default export, both where it's declared and where it's imported.\n\n## Examples\n\n```js\n// ❌\nexport default class {}\n\n// ✅\nexport default class Foo {}\n```\n\n```js\n// ❌\nexport default function () {}\n\n// ✅\nexport default function foo() {}\n```\n\n```js\n// ❌\nexport default () => {};\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// ❌\nmodule.exports = class {};\n\n// ✅\nmodule.exports = class Foo {};\n```\n\n```js\n// ❌\nmodule.exports = function () {};\n\n// ✅\nmodule.exports = function foo() {};\n```\n\n```js\n// ❌\nmodule.exports = () => {};\n\n// ✅\nconst foo = () => {};\nmodule.exports = foo;\n```\n","isInternal":false,"tokens":308,"sizeBytes":1241},{"name":"no-array-callback-reference.md","path":"docs/rules/no-array-callback-reference.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-callback-reference.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# no-array-callback-reference\n\n📝 Prevent passing a function reference directly to iterator methods.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPassing functions to iterator methods can cause issues when the function is changed without realizing that the iterator passes 2 more parameters to it. **This also applies when using TypeScript,** albeit only if the function accepts the same parameter type used by the iterator method.\n\nThis rule intentionally reports locally declared callbacks too. Use an inline wrapper when you want to make the callback arguments explicit.\n\nType predicate callbacks are allowed for `.every()`, `.filter()`, `.find()`, and `.findLast()` because wrapping them can fail to preserve TypeScript's predicate overload narrowing.\n\nA receiver known to be neither an array nor a typed array, such as a `Set` or a locally declared class with a same-named method, is ignored. A locally declared type is recognized from its annotation alone, while a receiver whose type comes from another module needs [type information](https://typescript-eslint.io/getting-started/typed-linting/). Unknown receivers are still reported, so use the `ignore` option or an inline disable for non-array APIs that intentionally share array method names.\n\nSuppose you have a `unicorn` module:\n\n```js\nconst unicorn = x => x + 1;\n\nexport default unicorn;\n```\n\nYou can then use it like this:\n\n```js\nimport unicorn from 'unicorn';\n\n[1, 2, 3].map(unicorn);\n//=> [2, 3, 4]\n```\n\nThe `unicorn` module now does a minor version that adds another argument:\n\n```js\nconst unicorn = (x, y) => x + (y ? y : 1);\n\nexport default unicorn;\n```\n\nYour code will now return something different and probably break for users because it is now passing the index of the item as second argument.\n\n```js\nimport unicorn from 'unicorn';\n\n[1, 2, 3].map(unicorn);\n//=> [2, 3, 5]\n```\n\nThis rule helps safely call the function with the expected number of parameters:\n\n```js\nimport unicorn from 'unicorn';\n\n[1, 2, 3].map(x => unicorn(x));\n//=> [2, 3, 4]\n```\n\n## Examples\n\n```js\n// ❌\nconst foo = array.map(callback);\n\n// ✅\nconst foo = array.map(element => callback(element));\n```\n\n```js\n// ✅\nconst foo = array.map(Boolean);\n```\n\n```js\n// ❌\narray.forEach(callback);\n\n// ✅\narray.forEach(element => {\n\tcallback(element);\n});\n```\n\n```js\n// ❌\nconst foo = array.every(callback);\n\n// ✅\nconst foo = array.every(element => callback(element));\n```\n\n```js\n// ❌\nconst foo = array.filter(callback);\n\n// ✅\nconst foo = array.filter(element => callback(element));\n```\n\n```js\n// ✅\nconst foo = array.filter(Boolean);\n```\n\n```js\n// ❌\nconst foo = array.find(callback);\n\n// ✅\nconst foo = array.find(element => callback(element));\n```\n\n```js\n// ❌\nconst index = array.findIndex(callback);\n\n// ✅\nconst index = array.findIndex(element => callback(element));\n```\n\n```js\n// ❌\nconst foo = array.some(callback);\n\n// ✅\nconst foo = array.some(element => callback(element));\n```\n\n```js\n// ❌\nconst foo = array.reduce(callback, 0);\n\n// ✅\nconst foo = array.reduce(\n\t(accumulator, element) => accumulator + callback(element),\n\t0\n);\n```\n\n```js\n// ❌\nconst foo = array.reduceRight(callback, []);\n\n// ✅\nconst foo = array.reduceRight(\n\t(accumulator, element) => [\n\t\t...accumulator,\n\t\tcallback(element)\n\t],\n\t[]\n);\n```\n\n```js\n// ❌\nconst foo = array.flatMap(callback);\n\n// ✅\nconst foo = array.flatMap(element => callback(element));\n```\n\nA call expression is left alone. Hoisting it into a binding would change how many times it runs, so the rewrite is a manual edit rather than something the rule can offer:\n\n```js\n// ✅ Not reported\narray.forEach(someFunction({foo: 'bar'}));\n```\n\n```js\n// A manual rewrite, if you want the call to happen once\nconst callback = someFunction({foo: 'bar'});\n\narray.forEach(element => {\n\tcallback(element);\n});\n```\n\n```js\n// ❌\narray.forEach(callback, thisArgument);\n\n// ✅\narray.forEach(function (element) {\n\tcallback(element, this);\n}, thisArgument);\n```\n\n```js\n// ✅\nfunction readFile(filename) {\n\treturn fs.readFile(filename, 'utf8');\n}\n\nPromise.map(filenames, readFile);\n```\n\n## Options\n\nType: `object`\n\n### ignore\n\nType: `string[]`\n\nCallees to ignore. The callee is matched against the object the iterator method is called on, so `\"Angular\"` ignores all `Angular.<method>(…)` calls.\n\n`Promise`, `React.Children`, `Children`, `lodash`, `underscore`, `_`, `Async`, `async`, `this`, `$`, and `jQuery` are always ignored.\n\nExample:\n\n```js\n{\n\t'unicorn/no-array-callback-reference': [\n\t\t'error',\n\t\t{\n\t\t\tignore: [\n\t\t\t\t'Angular',\n\t\t\t\t'P'\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n```js\n/* eslint unicorn/no-array-callback-reference: [\"error\", {\"ignore\": [\"Angular\"]}] */\nAngular.forEach(list, fn); // Passes\n```\n","isInternal":false,"tokens":1297,"sizeBytes":5168},{"name":"no-array-concat-in-loop.md","path":"docs/rules/no-array-concat-in-loop.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-concat-in-loop.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# no-array-concat-in-loop\n\n📝 Disallow array accumulation with `Array#concat()` in loops.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\n`Array#concat()` creates a new array every time it is called. When an accumulator is reassigned with `.concat()` on every loop iteration, each iteration copies everything accumulated so far, which can make the loop quadratic in the total number of accumulated items.\n\nUse `Array#push()` inside the loop when each chunk is an array, or collect the nested arrays and flatten them once outside the loop.\n\nThis rule intentionally only reports local `let` and `var` variables initialized to an empty array literal. It does not try to infer arbitrary array-like values or custom `.concat()` methods.\n\nThis rule does not provide an autofix. Replacing `.concat()` with `.push()` can change observable behavior when the old array is aliased, and `.concat()` has argument-spreading semantics that are not always equivalent to `push(...value)`.\n\n## Examples\n\n```js\n// ❌\nlet result = [];\n\nfor (const chunk of chunks) {\n\tresult = result.concat(chunk);\n}\n```\n\n```js\n// ✅\nconst result = [];\n\nfor (const chunk of chunks) {\n\tresult.push(...chunk);\n}\n```\n\n```js\n// ✅\nconst result = chunks.flat();\n```\n\n```js\n// ✅\nlet result = [];\n\nfor (const chunk of chunks) {\n\tresult = other.concat(chunk);\n}\n```\n","isInternal":false,"tokens":397,"sizeBytes":1676},{"name":"no-array-fill-with-reference-type.md","path":"docs/rules/no-array-fill-with-reference-type.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-fill-with-reference-type.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-fill-with-reference-type.md -->","isInternal":false,"tokens":337,"sizeBytes":1440},{"name":"no-array-from-fill.md","path":"docs/rules/no-array-from-fill.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-from-fill.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-from-fill.md -->","isInternal":false,"tokens":267,"sizeBytes":1013},{"name":"no-array-front-mutation.md","path":"docs/rules/no-array-front-mutation.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-front-mutation.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-front-mutation.md -->","isInternal":false,"tokens":448,"sizeBytes":1917},{"name":"no-array-method-this-argument.md","path":"docs/rules/no-array-method-this-argument.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-method-this-argument.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-method-this-argument.md -->","isInternal":false,"tokens":806,"sizeBytes":3350},{"name":"no-array-reduce.md","path":"docs/rules/no-array-reduce.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-reduce.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-reduce.md -->","isInternal":false,"tokens":1064,"sizeBytes":4260},{"name":"no-array-reverse.md","path":"docs/rules/no-array-reverse.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-reverse.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-reverse.md -->","isInternal":false,"tokens":357,"sizeBytes":1447},{"name":"no-array-sort-for-min-max.md","path":"docs/rules/no-array-sort-for-min-max.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-sort-for-min-max.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-sort-for-min-max.md -->","isInternal":false,"tokens":468,"sizeBytes":1830},{"name":"no-array-sort.md","path":"docs/rules/no-array-sort.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-sort.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-sort.md -->","isInternal":false,"tokens":465,"sizeBytes":1791},{"name":"no-array-splice.md","path":"docs/rules/no-array-splice.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-array-splice.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-array-splice.md -->","isInternal":false,"tokens":903,"sizeBytes":3529},{"name":"no-asterisk-prefix-in-documentation-comments.md","path":"docs/rules/no-asterisk-prefix-in-documentation-comments.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-asterisk-prefix-in-documentation-comments.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-asterisk-prefix-in-documentation-comments.md -->","isInternal":false,"tokens":495,"sizeBytes":2118},{"name":"no-async-iterator-callback.md","path":"docs/rules/no-async-iterator-callback.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-async-iterator-callback.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-async-iterator-callback.md -->","isInternal":false,"tokens":603,"sizeBytes":2961},{"name":"no-async-promise-finally.md","path":"docs/rules/no-async-promise-finally.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-async-promise-finally.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-async-promise-finally.md -->","isInternal":false,"tokens":390,"sizeBytes":1744},{"name":"no-await-expression-member.md","path":"docs/rules/no-await-expression-member.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-await-expression-member.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-await-expression-member.md -->","isInternal":false,"tokens":397,"sizeBytes":1584},{"name":"no-await-in-promise-methods.md","path":"docs/rules/no-await-in-promise-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-await-in-promise-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-await-in-promise-methods.md -->","isInternal":false,"tokens":480,"sizeBytes":1921},{"name":"no-barrel-files.md","path":"docs/rules/no-barrel-files.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-barrel-files.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-barrel-files.md -->","isInternal":false,"tokens":408,"sizeBytes":1759},{"name":"no-blob-to-file.md","path":"docs/rules/no-blob-to-file.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-blob-to-file.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-blob-to-file.md -->","isInternal":false,"tokens":426,"sizeBytes":1672},{"name":"no-boolean-sort-comparator.md","path":"docs/rules/no-boolean-sort-comparator.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-boolean-sort-comparator.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-boolean-sort-comparator.md -->","isInternal":false,"tokens":517,"sizeBytes":2126},{"name":"no-break-in-nested-loop.md","path":"docs/rules/no-break-in-nested-loop.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-break-in-nested-loop.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-break-in-nested-loop.md -->","isInternal":false,"tokens":667,"sizeBytes":2540},{"name":"no-canvas-to-image.md","path":"docs/rules/no-canvas-to-image.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-canvas-to-image.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-canvas-to-image.md -->","isInternal":false,"tokens":365,"sizeBytes":1452},{"name":"no-chained-comparison.md","path":"docs/rules/no-chained-comparison.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-chained-comparison.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-chained-comparison.md -->","isInternal":false,"tokens":371,"sizeBytes":1326},{"name":"no-collection-bracket-access.md","path":"docs/rules/no-collection-bracket-access.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-collection-bracket-access.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-collection-bracket-access.md -->","isInternal":false,"tokens":410,"sizeBytes":1518},{"name":"no-computed-property-existence-check.md","path":"docs/rules/no-computed-property-existence-check.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-computed-property-existence-check.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-computed-property-existence-check.md -->","isInternal":false,"tokens":488,"sizeBytes":1887},{"name":"no-conflicting-constraints.md","path":"docs/rules/no-conflicting-constraints.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-conflicting-constraints.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-conflicting-constraints.md -->","isInternal":false,"tokens":1018,"sizeBytes":4350},{"name":"no-confusing-array-splice.md","path":"docs/rules/no-confusing-array-splice.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-confusing-array-splice.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-confusing-array-splice.md -->","isInternal":false,"tokens":452,"sizeBytes":1778},{"name":"no-confusing-array-with.md","path":"docs/rules/no-confusing-array-with.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-confusing-array-with.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-confusing-array-with.md -->","isInternal":false,"tokens":274,"sizeBytes":1072},{"name":"no-console-spaces.md","path":"docs/rules/no-console-spaces.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-console-spaces.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-console-spaces.md -->","isInternal":false,"tokens":460,"sizeBytes":1612},{"name":"no-constant-zero-expression.md","path":"docs/rules/no-constant-zero-expression.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-constant-zero-expression.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-constant-zero-expression.md -->","isInternal":false,"tokens":400,"sizeBytes":1533},{"name":"no-declarations-before-early-exit.md","path":"docs/rules/no-declarations-before-early-exit.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-declarations-before-early-exit.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-declarations-before-early-exit.md -->","isInternal":false,"tokens":636,"sizeBytes":2826},{"name":"no-document-cookie.md","path":"docs/rules/no-document-cookie.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-document-cookie.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-document-cookie.md -->","isInternal":false,"tokens":343,"sizeBytes":1210},{"name":"no-double-comparison.md","path":"docs/rules/no-double-comparison.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-double-comparison.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-double-comparison.md -->","isInternal":false,"tokens":783,"sizeBytes":2740},{"name":"no-duplicate-if-branches.md","path":"docs/rules/no-duplicate-if-branches.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-duplicate-if-branches.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-if-branches.md -->","isInternal":false,"tokens":363,"sizeBytes":1500},{"name":"no-duplicate-logical-operands.md","path":"docs/rules/no-duplicate-logical-operands.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-duplicate-logical-operands.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-logical-operands.md -->","isInternal":false,"tokens":569,"sizeBytes":2387},{"name":"no-duplicate-loops.md","path":"docs/rules/no-duplicate-loops.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-duplicate-loops.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-loops.md -->","isInternal":false,"tokens":469,"sizeBytes":1938},{"name":"no-duplicate-set-values.md","path":"docs/rules/no-duplicate-set-values.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-duplicate-set-values.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-duplicate-set-values.md -->","isInternal":false,"tokens":323,"sizeBytes":1164},{"name":"no-empty-file.md","path":"docs/rules/no-empty-file.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-empty-file.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-empty-file.md -->","isInternal":false,"tokens":610,"sizeBytes":2347},{"name":"no-empty-link-text.md","path":"docs/rules/no-empty-link-text.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-empty-link-text.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-empty-link-text.md -->","isInternal":false,"tokens":416,"sizeBytes":1834},{"name":"no-error-property-assignment.md","path":"docs/rules/no-error-property-assignment.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-error-property-assignment.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-error-property-assignment.md -->","isInternal":false,"tokens":310,"sizeBytes":1374},{"name":"no-exports-in-scripts.md","path":"docs/rules/no-exports-in-scripts.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-exports-in-scripts.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-exports-in-scripts.md -->","isInternal":false,"tokens":188,"sizeBytes":753},{"name":"no-for-each.md","path":"docs/rules/no-for-each.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-for-each.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-for-each.md -->","isInternal":false,"tokens":533,"sizeBytes":2112},{"name":"no-for-loop.md","path":"docs/rules/no-for-loop.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-for-loop.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-for-loop.md -->","isInternal":false,"tokens":384,"sizeBytes":1522},{"name":"no-global-object-property-assignment.md","path":"docs/rules/no-global-object-property-assignment.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-global-object-property-assignment.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-global-object-property-assignment.md -->","isInternal":false,"tokens":314,"sizeBytes":1328},{"name":"no-immediate-mutation.md","path":"docs/rules/no-immediate-mutation.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-immediate-mutation.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-immediate-mutation.md -->","isInternal":false,"tokens":1359,"sizeBytes":5072},{"name":"no-impossible-length-comparison.md","path":"docs/rules/no-impossible-length-comparison.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-impossible-length-comparison.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-impossible-length-comparison.md -->","isInternal":false,"tokens":327,"sizeBytes":1301},{"name":"no-incomplete-accessor-override.md","path":"docs/rules/no-incomplete-accessor-override.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-incomplete-accessor-override.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-incomplete-accessor-override.md -->","isInternal":false,"tokens":409,"sizeBytes":1871},{"name":"no-incorrect-query-selector.md","path":"docs/rules/no-incorrect-query-selector.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-incorrect-query-selector.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-incorrect-query-selector.md -->","isInternal":false,"tokens":484,"sizeBytes":2056},{"name":"no-incorrect-template-string-interpolation.md","path":"docs/rules/no-incorrect-template-string-interpolation.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-incorrect-template-string-interpolation.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-incorrect-template-string-interpolation.md -->","isInternal":false,"tokens":484,"sizeBytes":2015},{"name":"no-ineffective-csp-directives.md","path":"docs/rules/no-ineffective-csp-directives.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-ineffective-csp-directives.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-ineffective-csp-directives.md -->","isInternal":false,"tokens":667,"sizeBytes":2899},{"name":"no-instanceof-builtins.md","path":"docs/rules/no-instanceof-builtins.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-instanceof-builtins.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-instanceof-builtins.md -->","isInternal":false,"tokens":867,"sizeBytes":3241},{"name":"no-invalid-argument-count.md","path":"docs/rules/no-invalid-argument-count.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-argument-count.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-argument-count.md -->","isInternal":false,"tokens":981,"sizeBytes":3982},{"name":"no-invalid-boolean-attribute-value.md","path":"docs/rules/no-invalid-boolean-attribute-value.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-boolean-attribute-value.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-boolean-attribute-value.md -->","isInternal":false,"tokens":665,"sizeBytes":3201},{"name":"no-invalid-character-comparison.md","path":"docs/rules/no-invalid-character-comparison.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-character-comparison.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-character-comparison.md -->","isInternal":false,"tokens":402,"sizeBytes":1441},{"name":"no-invalid-dom-token.md","path":"docs/rules/no-invalid-dom-token.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-dom-token.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-dom-token.md -->","isInternal":false,"tokens":603,"sizeBytes":2629},{"name":"no-invalid-fetch-options.md","path":"docs/rules/no-invalid-fetch-options.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-fetch-options.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-fetch-options.md -->","isInternal":false,"tokens":328,"sizeBytes":1155},{"name":"no-invalid-file-input-accept.md","path":"docs/rules/no-invalid-file-input-accept.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-file-input-accept.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-file-input-accept.md -->","isInternal":false,"tokens":408,"sizeBytes":1495},{"name":"no-invalid-integrity.md","path":"docs/rules/no-invalid-integrity.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-integrity.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-integrity.md -->","isInternal":false,"tokens":870,"sizeBytes":3425},{"name":"no-invalid-intl-options.md","path":"docs/rules/no-invalid-intl-options.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-intl-options.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-intl-options.md -->","isInternal":false,"tokens":511,"sizeBytes":2261},{"name":"no-invalid-property-descriptor.md","path":"docs/rules/no-invalid-property-descriptor.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-property-descriptor.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-property-descriptor.md -->","isInternal":false,"tokens":907,"sizeBytes":4013},{"name":"no-invalid-remove-event-listener.md","path":"docs/rules/no-invalid-remove-event-listener.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-remove-event-listener.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-remove-event-listener.md -->","isInternal":false,"tokens":405,"sizeBytes":1877},{"name":"no-invalid-response-options.md","path":"docs/rules/no-invalid-response-options.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-response-options.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-response-options.md -->","isInternal":false,"tokens":522,"sizeBytes":2224},{"name":"no-invalid-style-set-property.md","path":"docs/rules/no-invalid-style-set-property.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-style-set-property.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-style-set-property.md -->","isInternal":false,"tokens":660,"sizeBytes":3090},{"name":"no-invalid-temporal-arithmetic.md","path":"docs/rules/no-invalid-temporal-arithmetic.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-temporal-arithmetic.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-temporal-arithmetic.md -->","isInternal":false,"tokens":1027,"sizeBytes":4486},{"name":"no-invalid-url-protocol-comparison.md","path":"docs/rules/no-invalid-url-protocol-comparison.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-url-protocol-comparison.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-url-protocol-comparison.md -->","isInternal":false,"tokens":689,"sizeBytes":2900},{"name":"no-invalid-well-known-symbol-methods.md","path":"docs/rules/no-invalid-well-known-symbol-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-invalid-well-known-symbol-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-invalid-well-known-symbol-methods.md -->","isInternal":false,"tokens":383,"sizeBytes":1636},{"name":"no-javascript-url.md","path":"docs/rules/no-javascript-url.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-javascript-url.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-javascript-url.md -->","isInternal":false,"tokens":219,"sizeBytes":966},{"name":"no-keyword-prefix.md","path":"docs/rules/no-keyword-prefix.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-keyword-prefix.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-keyword-prefix.md -->","isInternal":false,"tokens":495,"sizeBytes":1662},{"name":"no-late-current-target-access.md","path":"docs/rules/no-late-current-target-access.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-late-current-target-access.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-late-current-target-access.md -->","isInternal":false,"tokens":542,"sizeBytes":2479},{"name":"no-late-event-control.md","path":"docs/rules/no-late-event-control.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-late-event-control.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-late-event-control.md -->","isInternal":false,"tokens":555,"sizeBytes":2653},{"name":"no-leading-empty-lines.md","path":"docs/rules/no-leading-empty-lines.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-leading-empty-lines.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-leading-empty-lines.md -->","isInternal":false,"tokens":455,"sizeBytes":1877},{"name":"no-lonely-if.md","path":"docs/rules/no-lonely-if.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-lonely-if.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-lonely-if.md -->","isInternal":false,"tokens":440,"sizeBytes":1402},{"name":"no-loop-iterable-mutation.md","path":"docs/rules/no-loop-iterable-mutation.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-loop-iterable-mutation.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-loop-iterable-mutation.md -->","isInternal":false,"tokens":399,"sizeBytes":1534},{"name":"no-loss-of-precision.md","path":"docs/rules/no-loss-of-precision.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-loss-of-precision.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-loss-of-precision.md -->","isInternal":false,"tokens":259,"sizeBytes":1108},{"name":"no-magic-array-flat-depth.md","path":"docs/rules/no-magic-array-flat-depth.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-magic-array-flat-depth.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-magic-array-flat-depth.md -->","isInternal":false,"tokens":326,"sizeBytes":1263},{"name":"no-manually-wrapped-comments.md","path":"docs/rules/no-manually-wrapped-comments.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-manually-wrapped-comments.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-manually-wrapped-comments.md -->","isInternal":false,"tokens":708,"sizeBytes":2781},{"name":"no-mismatched-map-key.md","path":"docs/rules/no-mismatched-map-key.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-mismatched-map-key.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-mismatched-map-key.md -->","isInternal":false,"tokens":276,"sizeBytes":1048},{"name":"no-misrefactored-assignment.md","path":"docs/rules/no-misrefactored-assignment.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-misrefactored-assignment.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-misrefactored-assignment.md -->","isInternal":false,"tokens":463,"sizeBytes":1710},{"name":"no-missing-local-resource.md","path":"docs/rules/no-missing-local-resource.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-missing-local-resource.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-missing-local-resource.md -->","isInternal":false,"tokens":797,"sizeBytes":3164},{"name":"no-multiple-promise-resolver-calls.md","path":"docs/rules/no-multiple-promise-resolver-calls.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-multiple-promise-resolver-calls.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-multiple-promise-resolver-calls.md -->","isInternal":false,"tokens":596,"sizeBytes":2576},{"name":"no-named-default.md","path":"docs/rules/no-named-default.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-named-default.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-named-default.md -->","isInternal":false,"tokens":427,"sizeBytes":1639},{"name":"no-negated-array-predicate.md","path":"docs/rules/no-negated-array-predicate.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-negated-array-predicate.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negated-array-predicate.md -->","isInternal":false,"tokens":381,"sizeBytes":1542},{"name":"no-negated-comparison.md","path":"docs/rules/no-negated-comparison.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-negated-comparison.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negated-comparison.md -->","isInternal":false,"tokens":635,"sizeBytes":2407},{"name":"no-negated-condition.md","path":"docs/rules/no-negated-condition.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-negated-condition.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negated-condition.md -->","isInternal":false,"tokens":886,"sizeBytes":3240},{"name":"no-negation-in-equality-check.md","path":"docs/rules/no-negation-in-equality-check.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-negation-in-equality-check.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-negation-in-equality-check.md -->","isInternal":false,"tokens":215,"sizeBytes":808},{"name":"no-nested-ternary.md","path":"docs/rules/no-nested-ternary.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-nested-ternary.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-nested-ternary.md -->","isInternal":false,"tokens":556,"sizeBytes":1963},{"name":"no-new-array.md","path":"docs/rules/no-new-array.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-new-array.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-new-array.md -->","isInternal":false,"tokens":463,"sizeBytes":1840},{"name":"no-new-buffer.md","path":"docs/rules/no-new-buffer.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-new-buffer.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-new-buffer.md -->","isInternal":false,"tokens":506,"sizeBytes":1910},{"name":"no-non-function-verb-prefix.md","path":"docs/rules/no-non-function-verb-prefix.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-non-function-verb-prefix.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-non-function-verb-prefix.md -->","isInternal":false,"tokens":684,"sizeBytes":2743},{"name":"no-nonstandard-builtin-properties.md","path":"docs/rules/no-nonstandard-builtin-properties.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-nonstandard-builtin-properties.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-nonstandard-builtin-properties.md -->","isInternal":false,"tokens":435,"sizeBytes":1909},{"name":"no-null.md","path":"docs/rules/no-null.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-null.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-null.md -->","isInternal":false,"tokens":631,"sizeBytes":2340},{"name":"no-object-as-default-parameter.md","path":"docs/rules/no-object-as-default-parameter.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-object-as-default-parameter.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-object-as-default-parameter.md -->","isInternal":false,"tokens":304,"sizeBytes":1094},{"name":"no-object-methods-with-collections.md","path":"docs/rules/no-object-methods-with-collections.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-object-methods-with-collections.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-object-methods-with-collections.md -->","isInternal":false,"tokens":416,"sizeBytes":1557},{"name":"no-optional-chaining-on-undeclared-variable.md","path":"docs/rules/no-optional-chaining-on-undeclared-variable.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-optional-chaining-on-undeclared-variable.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-optional-chaining-on-undeclared-variable.md -->","isInternal":false,"tokens":353,"sizeBytes":1356},{"name":"no-prevent-default-in-passive-listener.md","path":"docs/rules/no-prevent-default-in-passive-listener.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-prevent-default-in-passive-listener.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-prevent-default-in-passive-listener.md -->","isInternal":false,"tokens":559,"sizeBytes":2695},{"name":"no-process-exit.md","path":"docs/rules/no-process-exit.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-process-exit.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-process-exit.md -->","isInternal":false,"tokens":313,"sizeBytes":1235},{"name":"no-redundant-comparison.md","path":"docs/rules/no-redundant-comparison.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-redundant-comparison.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-redundant-comparison.md -->","isInternal":false,"tokens":702,"sizeBytes":2537},{"name":"no-repeated-call-wrappers.md","path":"docs/rules/no-repeated-call-wrappers.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-repeated-call-wrappers.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-repeated-call-wrappers.md -->","isInternal":false,"tokens":640,"sizeBytes":2865},{"name":"no-return-array-push.md","path":"docs/rules/no-return-array-push.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-return-array-push.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-return-array-push.md -->","isInternal":false,"tokens":620,"sizeBytes":2599},{"name":"no-selector-as-dom-name.md","path":"docs/rules/no-selector-as-dom-name.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-selector-as-dom-name.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-selector-as-dom-name.md -->","isInternal":false,"tokens":442,"sizeBytes":2006},{"name":"no-shorthand-property-overrides.md","path":"docs/rules/no-shorthand-property-overrides.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-shorthand-property-overrides.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-shorthand-property-overrides.md -->","isInternal":false,"tokens":984,"sizeBytes":4216},{"name":"no-single-promise-in-promise-methods.md","path":"docs/rules/no-single-promise-in-promise-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-single-promise-in-promise-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-single-promise-in-promise-methods.md -->","isInternal":false,"tokens":404,"sizeBytes":1706},{"name":"no-static-only-class.md","path":"docs/rules/no-static-only-class.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-static-only-class.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-static-only-class.md -->","isInternal":false,"tokens":271,"sizeBytes":1062},{"name":"no-subtraction-comparison.md","path":"docs/rules/no-subtraction-comparison.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-subtraction-comparison.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-subtraction-comparison.md -->","isInternal":false,"tokens":491,"sizeBytes":1852},{"name":"no-thenable.md","path":"docs/rules/no-thenable.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-thenable.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-thenable.md -->","isInternal":false,"tokens":458,"sizeBytes":1602},{"name":"no-this-assignment.md","path":"docs/rules/no-this-assignment.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-this-assignment.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-this-assignment.md -->","isInternal":false,"tokens":372,"sizeBytes":1451},{"name":"no-this-outside-of-class.md","path":"docs/rules/no-this-outside-of-class.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-this-outside-of-class.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-this-outside-of-class.md -->","isInternal":false,"tokens":415,"sizeBytes":1699},{"name":"no-top-level-assignment-in-function.md","path":"docs/rules/no-top-level-assignment-in-function.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-top-level-assignment-in-function.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-top-level-assignment-in-function.md -->","isInternal":false,"tokens":324,"sizeBytes":1337},{"name":"no-top-level-side-effects.md","path":"docs/rules/no-top-level-side-effects.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-top-level-side-effects.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-top-level-side-effects.md -->","isInternal":false,"tokens":1409,"sizeBytes":6228},{"name":"no-transition-all.md","path":"docs/rules/no-transition-all.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-transition-all.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-transition-all.md -->","isInternal":false,"tokens":307,"sizeBytes":1335},{"name":"no-typeof-undefined.md","path":"docs/rules/no-typeof-undefined.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-typeof-undefined.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-typeof-undefined.md -->","isInternal":false,"tokens":516,"sizeBytes":2145},{"name":"no-uncalled-method.md","path":"docs/rules/no-uncalled-method.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-uncalled-method.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-uncalled-method.md -->","isInternal":false,"tokens":306,"sizeBytes":1273},{"name":"no-undeclared-class-members.md","path":"docs/rules/no-undeclared-class-members.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-undeclared-class-members.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-undeclared-class-members.md -->","isInternal":false,"tokens":479,"sizeBytes":2034},{"name":"no-unnecessary-array-flat-depth.md","path":"docs/rules/no-unnecessary-array-flat-depth.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-array-flat-depth.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-array-flat-depth.md -->","isInternal":false,"tokens":402,"sizeBytes":1245},{"name":"no-unnecessary-array-flat-map.md","path":"docs/rules/no-unnecessary-array-flat-map.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-array-flat-map.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-array-flat-map.md -->","isInternal":false,"tokens":739,"sizeBytes":2997},{"name":"no-unnecessary-array-splice-count.md","path":"docs/rules/no-unnecessary-array-splice-count.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-array-splice-count.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-array-splice-count.md -->","isInternal":false,"tokens":445,"sizeBytes":1586},{"name":"no-unnecessary-await.md","path":"docs/rules/no-unnecessary-await.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-await.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-await.md -->","isInternal":false,"tokens":310,"sizeBytes":1288},{"name":"no-unnecessary-boolean-comparison.md","path":"docs/rules/no-unnecessary-boolean-comparison.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-boolean-comparison.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-boolean-comparison.md -->","isInternal":false,"tokens":373,"sizeBytes":1475},{"name":"no-unnecessary-default-arguments.md","path":"docs/rules/no-unnecessary-default-arguments.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-default-arguments.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-default-arguments.md -->","isInternal":false,"tokens":626,"sizeBytes":2963},{"name":"no-unnecessary-fetch-options.md","path":"docs/rules/no-unnecessary-fetch-options.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-fetch-options.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-fetch-options.md -->","isInternal":false,"tokens":344,"sizeBytes":1343},{"name":"no-unnecessary-global-this.md","path":"docs/rules/no-unnecessary-global-this.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-global-this.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-global-this.md -->","isInternal":false,"tokens":373,"sizeBytes":1537},{"name":"no-unnecessary-nested-ternary.md","path":"docs/rules/no-unnecessary-nested-ternary.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-nested-ternary.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-nested-ternary.md -->","isInternal":false,"tokens":239,"sizeBytes":842},{"name":"no-unnecessary-parameters.md","path":"docs/rules/no-unnecessary-parameters.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-parameters.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-parameters.md -->","isInternal":false,"tokens":1289,"sizeBytes":5558},{"name":"no-unnecessary-polyfills.md","path":"docs/rules/no-unnecessary-polyfills.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-polyfills.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-polyfills.md -->","isInternal":false,"tokens":479,"sizeBytes":1700},{"name":"no-unnecessary-slice-end.md","path":"docs/rules/no-unnecessary-slice-end.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-slice-end.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-slice-end.md -->","isInternal":false,"tokens":288,"sizeBytes":1067},{"name":"no-unnecessary-splice.md","path":"docs/rules/no-unnecessary-splice.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-splice.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-splice.md -->","isInternal":false,"tokens":351,"sizeBytes":1219},{"name":"no-unnecessary-string-trim.md","path":"docs/rules/no-unnecessary-string-trim.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unnecessary-string-trim.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unnecessary-string-trim.md -->","isInternal":false,"tokens":362,"sizeBytes":1537},{"name":"no-unreadable-array-destructuring.md","path":"docs/rules/no-unreadable-array-destructuring.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unreadable-array-destructuring.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-array-destructuring.md -->","isInternal":false,"tokens":624,"sizeBytes":2189},{"name":"no-unreadable-for-of-expression.md","path":"docs/rules/no-unreadable-for-of-expression.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unreadable-for-of-expression.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-for-of-expression.md -->","isInternal":false,"tokens":431,"sizeBytes":1732},{"name":"no-unreadable-iife.md","path":"docs/rules/no-unreadable-iife.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unreadable-iife.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-iife.md -->","isInternal":false,"tokens":320,"sizeBytes":1157},{"name":"no-unreadable-new-expression.md","path":"docs/rules/no-unreadable-new-expression.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unreadable-new-expression.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-new-expression.md -->","isInternal":false,"tokens":496,"sizeBytes":1998},{"name":"no-unreadable-object-destructuring.md","path":"docs/rules/no-unreadable-object-destructuring.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unreadable-object-destructuring.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unreadable-object-destructuring.md -->","isInternal":false,"tokens":364,"sizeBytes":1300},{"name":"no-unsafe-buffer-conversion.md","path":"docs/rules/no-unsafe-buffer-conversion.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unsafe-buffer-conversion.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-buffer-conversion.md -->","isInternal":false,"tokens":319,"sizeBytes":1305},{"name":"no-unsafe-dom-html.md","path":"docs/rules/no-unsafe-dom-html.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unsafe-dom-html.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-dom-html.md -->","isInternal":false,"tokens":316,"sizeBytes":1462},{"name":"no-unsafe-json-serialization.md","path":"docs/rules/no-unsafe-json-serialization.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unsafe-json-serialization.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-json-serialization.md -->","isInternal":false,"tokens":836,"sizeBytes":3732},{"name":"no-unsafe-promise-all-settled-values.md","path":"docs/rules/no-unsafe-promise-all-settled-values.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unsafe-promise-all-settled-values.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-promise-all-settled-values.md -->","isInternal":false,"tokens":466,"sizeBytes":2028},{"name":"no-unsafe-property-key.md","path":"docs/rules/no-unsafe-property-key.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unsafe-property-key.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-property-key.md -->","isInternal":false,"tokens":424,"sizeBytes":1594},{"name":"no-unsafe-sqlite-interpolation.md","path":"docs/rules/no-unsafe-sqlite-interpolation.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unsafe-sqlite-interpolation.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-sqlite-interpolation.md -->","isInternal":false,"tokens":453,"sizeBytes":1990},{"name":"no-unsafe-string-replacement.md","path":"docs/rules/no-unsafe-string-replacement.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unsafe-string-replacement.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unsafe-string-replacement.md -->","isInternal":false,"tokens":489,"sizeBytes":2024},{"name":"no-unused-builtin-method-return.md","path":"docs/rules/no-unused-builtin-method-return.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unused-builtin-method-return.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unused-builtin-method-return.md -->","isInternal":false,"tokens":1113,"sizeBytes":4652},{"name":"no-unused-iterator-helper.md","path":"docs/rules/no-unused-iterator-helper.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unused-iterator-helper.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unused-iterator-helper.md -->","isInternal":false,"tokens":548,"sizeBytes":2581},{"name":"no-unused-properties.md","path":"docs/rules/no-unused-properties.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-unused-properties.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-unused-properties.md -->","isInternal":false,"tokens":1100,"sizeBytes":4675},{"name":"no-url-in-search-params.md","path":"docs/rules/no-url-in-search-params.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-url-in-search-params.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-url-in-search-params.md -->","isInternal":false,"tokens":557,"sizeBytes":2574},{"name":"no-useless-boolean-cast.md","path":"docs/rules/no-useless-boolean-cast.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-boolean-cast.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-boolean-cast.md -->","isInternal":false,"tokens":407,"sizeBytes":1774},{"name":"no-useless-coercion.md","path":"docs/rules/no-useless-coercion.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-coercion.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-coercion.md -->","isInternal":false,"tokens":710,"sizeBytes":2795},{"name":"no-useless-collection-argument.md","path":"docs/rules/no-useless-collection-argument.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-collection-argument.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-collection-argument.md -->","isInternal":false,"tokens":291,"sizeBytes":1125},{"name":"no-useless-compound-assignment.md","path":"docs/rules/no-useless-compound-assignment.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-compound-assignment.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-compound-assignment.md -->","isInternal":false,"tokens":423,"sizeBytes":1510},{"name":"no-useless-concat.md","path":"docs/rules/no-useless-concat.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-concat.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-concat.md -->","isInternal":false,"tokens":400,"sizeBytes":1633},{"name":"no-useless-continue.md","path":"docs/rules/no-useless-continue.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-continue.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-continue.md -->","isInternal":false,"tokens":320,"sizeBytes":1223},{"name":"no-useless-delete-check.md","path":"docs/rules/no-useless-delete-check.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-delete-check.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-delete-check.md -->","isInternal":false,"tokens":440,"sizeBytes":1858},{"name":"no-useless-else.md","path":"docs/rules/no-useless-else.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-else.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-else.md -->","isInternal":false,"tokens":500,"sizeBytes":2006},{"name":"no-useless-error-capture-stack-trace.md","path":"docs/rules/no-useless-error-capture-stack-trace.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-error-capture-stack-trace.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-error-capture-stack-trace.md -->","isInternal":false,"tokens":373,"sizeBytes":1516},{"name":"no-useless-fallback-in-spread.md","path":"docs/rules/no-useless-fallback-in-spread.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-fallback-in-spread.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-fallback-in-spread.md -->","isInternal":false,"tokens":274,"sizeBytes":1091},{"name":"no-useless-iterator-to-array.md","path":"docs/rules/no-useless-iterator-to-array.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-iterator-to-array.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-iterator-to-array.md -->","isInternal":false,"tokens":923,"sizeBytes":3761},{"name":"no-useless-length-check.md","path":"docs/rules/no-useless-length-check.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-length-check.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-length-check.md -->","isInternal":false,"tokens":635,"sizeBytes":2467},{"name":"no-useless-logical-operand.md","path":"docs/rules/no-useless-logical-operand.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-logical-operand.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-logical-operand.md -->","isInternal":false,"tokens":496,"sizeBytes":2194},{"name":"no-useless-override.md","path":"docs/rules/no-useless-override.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-override.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-override.md -->","isInternal":false,"tokens":497,"sizeBytes":2156},{"name":"no-useless-promise-resolve-reject.md","path":"docs/rules/no-useless-promise-resolve-reject.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-promise-resolve-reject.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-promise-resolve-reject.md -->","isInternal":false,"tokens":673,"sizeBytes":2584},{"name":"no-useless-re-export.md","path":"docs/rules/no-useless-re-export.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-re-export.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-re-export.md -->","isInternal":false,"tokens":415,"sizeBytes":1770},{"name":"no-useless-recursion.md","path":"docs/rules/no-useless-recursion.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-recursion.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-recursion.md -->","isInternal":false,"tokens":287,"sizeBytes":1117},{"name":"no-useless-set-construction.md","path":"docs/rules/no-useless-set-construction.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-set-construction.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-set-construction.md -->","isInternal":false,"tokens":794,"sizeBytes":3534},{"name":"no-useless-spread.md","path":"docs/rules/no-useless-spread.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-spread.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-spread.md -->","isInternal":false,"tokens":1169,"sizeBytes":4781},{"name":"no-useless-switch-case.md","path":"docs/rules/no-useless-switch-case.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-switch-case.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-switch-case.md -->","isInternal":false,"tokens":423,"sizeBytes":1609},{"name":"no-useless-template-literals.md","path":"docs/rules/no-useless-template-literals.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-template-literals.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-template-literals.md -->","isInternal":false,"tokens":485,"sizeBytes":2154},{"name":"no-useless-undefined.md","path":"docs/rules/no-useless-undefined.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-useless-undefined.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-useless-undefined.md -->","isInternal":false,"tokens":1110,"sizeBytes":4393},{"name":"no-using-resource-escape.md","path":"docs/rules/no-using-resource-escape.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-using-resource-escape.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-using-resource-escape.md -->","isInternal":false,"tokens":586,"sizeBytes":2991},{"name":"no-xor-as-exponentiation.md","path":"docs/rules/no-xor-as-exponentiation.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-xor-as-exponentiation.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-xor-as-exponentiation.md -->","isInternal":false,"tokens":401,"sizeBytes":1495},{"name":"no-zero-fractions.md","path":"docs/rules/no-zero-fractions.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/no-zero-fractions.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fno-zero-fractions.md -->","isInternal":false,"tokens":540,"sizeBytes":1614},{"name":"number-literal-case.md","path":"docs/rules/number-literal-case.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/number-literal-case.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fnumber-literal-case.md -->","isInternal":false,"tokens":1072,"sizeBytes":3632},{"name":"numeric-separators-style.md","path":"docs/rules/numeric-separators-style.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/numeric-separators-style.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fnumeric-separators-style.md -->","isInternal":false,"tokens":1966,"sizeBytes":6823},{"name":"operator-assignment.md","path":"docs/rules/operator-assignment.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/operator-assignment.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Foperator-assignment.md -->","isInternal":false,"tokens":372,"sizeBytes":1640},{"name":"prefer-abort-signal-any.md","path":"docs/rules/prefer-abort-signal-any.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-abort-signal-any.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-abort-signal-any.md -->","isInternal":false,"tokens":478,"sizeBytes":2183},{"name":"prefer-abort-signal-timeout.md","path":"docs/rules/prefer-abort-signal-timeout.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-abort-signal-timeout.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-abort-signal-timeout.md -->","isInternal":false,"tokens":395,"sizeBytes":1772},{"name":"prefer-add-event-listener-options.md","path":"docs/rules/prefer-add-event-listener-options.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-add-event-listener-options.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-add-event-listener-options.md -->","isInternal":false,"tokens":398,"sizeBytes":1800},{"name":"prefer-add-event-listener.md","path":"docs/rules/prefer-add-event-listener.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-add-event-listener.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-add-event-listener.md -->","isInternal":false,"tokens":681,"sizeBytes":2933},{"name":"prefer-aggregate-error.md","path":"docs/rules/prefer-aggregate-error.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-aggregate-error.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-aggregate-error.md -->","isInternal":false,"tokens":423,"sizeBytes":1928},{"name":"prefer-array-find.md","path":"docs/rules/prefer-array-find.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-find.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-find.md -->","isInternal":false,"tokens":642,"sizeBytes":2502},{"name":"prefer-array-flat-map.md","path":"docs/rules/prefer-array-flat-map.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-flat-map.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-flat-map.md -->","isInternal":false,"tokens":636,"sizeBytes":2680},{"name":"prefer-array-flat.md","path":"docs/rules/prefer-array-flat.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-flat.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-flat.md -->","isInternal":false,"tokens":687,"sizeBytes":2691},{"name":"prefer-array-from-async.md","path":"docs/rules/prefer-array-from-async.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-from-async.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-from-async.md -->","isInternal":false,"tokens":708,"sizeBytes":3232},{"name":"prefer-array-from-map.md","path":"docs/rules/prefer-array-from-map.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-from-map.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-from-map.md -->","isInternal":false,"tokens":570,"sizeBytes":2341},{"name":"prefer-array-from-range.md","path":"docs/rules/prefer-array-from-range.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-from-range.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-from-range.md -->","isInternal":false,"tokens":368,"sizeBytes":1498},{"name":"prefer-array-index-of.md","path":"docs/rules/prefer-array-index-of.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-index-of.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-index-of.md -->","isInternal":false,"tokens":852,"sizeBytes":3153},{"name":"prefer-array-iterable-methods.md","path":"docs/rules/prefer-array-iterable-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-iterable-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-iterable-methods.md -->","isInternal":false,"tokens":470,"sizeBytes":1823},{"name":"prefer-array-last-methods.md","path":"docs/rules/prefer-array-last-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-last-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-last-methods.md -->","isInternal":false,"tokens":305,"sizeBytes":1351},{"name":"prefer-array-slice.md","path":"docs/rules/prefer-array-slice.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-slice.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-slice.md -->","isInternal":false,"tokens":338,"sizeBytes":1304},{"name":"prefer-array-some.md","path":"docs/rules/prefer-array-some.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-array-some.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-array-some.md -->","isInternal":false,"tokens":1356,"sizeBytes":5274},{"name":"prefer-at.md","path":"docs/rules/prefer-at.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-at.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-at.md -->","isInternal":false,"tokens":1164,"sizeBytes":4444},{"name":"prefer-await.md","path":"docs/rules/prefer-await.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-await.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-await.md -->","isInternal":false,"tokens":698,"sizeBytes":3118},{"name":"prefer-bigint-literals.md","path":"docs/rules/prefer-bigint-literals.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-bigint-literals.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-bigint-literals.md -->","isInternal":false,"tokens":350,"sizeBytes":1342},{"name":"prefer-blob-reading-methods.md","path":"docs/rules/prefer-blob-reading-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-blob-reading-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-blob-reading-methods.md -->","isInternal":false,"tokens":331,"sizeBytes":1285},{"name":"prefer-block-statement-over-iife.md","path":"docs/rules/prefer-block-statement-over-iife.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-block-statement-over-iife.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-block-statement-over-iife.md -->","isInternal":false,"tokens":311,"sizeBytes":1243},{"name":"prefer-boolean-return.md","path":"docs/rules/prefer-boolean-return.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-boolean-return.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-boolean-return.md -->","isInternal":false,"tokens":371,"sizeBytes":1567},{"name":"prefer-class-fields.md","path":"docs/rules/prefer-class-fields.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-class-fields.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-class-fields.md -->","isInternal":false,"tokens":427,"sizeBytes":1713},{"name":"prefer-classlist-toggle.md","path":"docs/rules/prefer-classlist-toggle.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-classlist-toggle.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-classlist-toggle.md -->","isInternal":false,"tokens":392,"sizeBytes":1743},{"name":"prefer-code-point.md","path":"docs/rules/prefer-code-point.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-code-point.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-code-point.md -->","isInternal":false,"tokens":663,"sizeBytes":2541},{"name":"prefer-combined-guards.md","path":"docs/rules/prefer-combined-guards.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-combined-guards.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-combined-guards.md -->","isInternal":false,"tokens":1315,"sizeBytes":5667},{"name":"prefer-continue.md","path":"docs/rules/prefer-continue.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-continue.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-continue.md -->","isInternal":false,"tokens":1330,"sizeBytes":5427},{"name":"prefer-date-now.md","path":"docs/rules/prefer-date-now.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-date-now.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-date-now.md -->","isInternal":false,"tokens":296,"sizeBytes":1133},{"name":"prefer-default-parameters.md","path":"docs/rules/prefer-default-parameters.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-default-parameters.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-default-parameters.md -->","isInternal":false,"tokens":1182,"sizeBytes":4563},{"name":"prefer-direct-iteration.md","path":"docs/rules/prefer-direct-iteration.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-direct-iteration.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-direct-iteration.md -->","isInternal":false,"tokens":540,"sizeBytes":2154},{"name":"prefer-dispose.md","path":"docs/rules/prefer-dispose.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-dispose.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dispose.md -->","isInternal":false,"tokens":594,"sizeBytes":2597},{"name":"prefer-dom-node-append.md","path":"docs/rules/prefer-dom-node-append.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-dom-node-append.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-append.md -->","isInternal":false,"tokens":416,"sizeBytes":1796},{"name":"prefer-dom-node-html-methods.md","path":"docs/rules/prefer-dom-node-html-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-dom-node-html-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-html-methods.md -->","isInternal":false,"tokens":582,"sizeBytes":2401},{"name":"prefer-dom-node-remove.md","path":"docs/rules/prefer-dom-node-remove.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-dom-node-remove.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-remove.md -->","isInternal":false,"tokens":390,"sizeBytes":1731},{"name":"prefer-dom-node-replace-children.md","path":"docs/rules/prefer-dom-node-replace-children.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-dom-node-replace-children.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-replace-children.md -->","isInternal":false,"tokens":616,"sizeBytes":2829},{"name":"prefer-dom-node-text-content.md","path":"docs/rules/prefer-dom-node-text-content.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-dom-node-text-content.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-dom-node-text-content.md -->","isInternal":false,"tokens":285,"sizeBytes":1144},{"name":"prefer-early-return.md","path":"docs/rules/prefer-early-return.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-early-return.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-early-return.md -->","isInternal":false,"tokens":1050,"sizeBytes":4397},{"name":"prefer-else-if.md","path":"docs/rules/prefer-else-if.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-else-if.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-else-if.md -->","isInternal":false,"tokens":572,"sizeBytes":2385},{"name":"prefer-error-is-error.md","path":"docs/rules/prefer-error-is-error.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-error-is-error.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-error-is-error.md -->","isInternal":false,"tokens":316,"sizeBytes":1282},{"name":"prefer-escaped-irregular-whitespace.md","path":"docs/rules/prefer-escaped-irregular-whitespace.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-escaped-irregular-whitespace.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-escaped-irregular-whitespace.md -->","isInternal":false,"tokens":446,"sizeBytes":1782},{"name":"prefer-event-target.md","path":"docs/rules/prefer-event-target.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-event-target.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-event-target.md -->","isInternal":false,"tokens":265,"sizeBytes":1088},{"name":"prefer-export-from.md","path":"docs/rules/prefer-export-from.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-export-from.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-export-from.md -->","isInternal":false,"tokens":646,"sizeBytes":2551},{"name":"prefer-flat-math-min-max.md","path":"docs/rules/prefer-flat-math-min-max.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-flat-math-min-max.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-flat-math-min-max.md -->","isInternal":false,"tokens":279,"sizeBytes":1081},{"name":"prefer-get-or-insert-computed.md","path":"docs/rules/prefer-get-or-insert-computed.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-get-or-insert-computed.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-get-or-insert-computed.md -->","isInternal":false,"tokens":515,"sizeBytes":2161},{"name":"prefer-global-number-constants.md","path":"docs/rules/prefer-global-number-constants.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-global-number-constants.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-global-number-constants.md -->","isInternal":false,"tokens":390,"sizeBytes":1648},{"name":"prefer-global-this.md","path":"docs/rules/prefer-global-this.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-global-this.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-global-this.md -->","isInternal":false,"tokens":535,"sizeBytes":2028},{"name":"prefer-group-by.md","path":"docs/rules/prefer-group-by.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-group-by.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-group-by.md -->","isInternal":false,"tokens":697,"sizeBytes":2928},{"name":"prefer-has-check.md","path":"docs/rules/prefer-has-check.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-has-check.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-has-check.md -->","isInternal":false,"tokens":435,"sizeBytes":1673},{"name":"prefer-hoisting-branch-code.md","path":"docs/rules/prefer-hoisting-branch-code.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-hoisting-branch-code.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-hoisting-branch-code.md -->","isInternal":false,"tokens":624,"sizeBytes":2623},{"name":"prefer-https.md","path":"docs/rules/prefer-https.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-https.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-https.md -->","isInternal":false,"tokens":679,"sizeBytes":2543},{"name":"prefer-identifier-import-export-specifiers.md","path":"docs/rules/prefer-identifier-import-export-specifiers.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-identifier-import-export-specifiers.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-identifier-import-export-specifiers.md -->","isInternal":false,"tokens":346,"sizeBytes":1309},{"name":"prefer-import-meta-properties.md","path":"docs/rules/prefer-import-meta-properties.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-import-meta-properties.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-import-meta-properties.md -->","isInternal":false,"tokens":361,"sizeBytes":1531},{"name":"prefer-includes-over-repeated-comparisons.md","path":"docs/rules/prefer-includes-over-repeated-comparisons.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-includes-over-repeated-comparisons.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-includes-over-repeated-comparisons.md -->","isInternal":false,"tokens":750,"sizeBytes":2953},{"name":"prefer-includes.md","path":"docs/rules/prefer-includes.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-includes.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-includes.md -->","isInternal":false,"tokens":954,"sizeBytes":3471},{"name":"prefer-iterable-in-constructor.md","path":"docs/rules/prefer-iterable-in-constructor.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-iterable-in-constructor.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterable-in-constructor.md -->","isInternal":false,"tokens":676,"sizeBytes":3156},{"name":"prefer-iterator-concat.md","path":"docs/rules/prefer-iterator-concat.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-iterator-concat.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-concat.md -->","isInternal":false,"tokens":424,"sizeBytes":1788},{"name":"prefer-iterator-helpers.md","path":"docs/rules/prefer-iterator-helpers.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-iterator-helpers.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-helpers.md -->","isInternal":false,"tokens":558,"sizeBytes":2519},{"name":"prefer-iterator-to-array-at-end.md","path":"docs/rules/prefer-iterator-to-array-at-end.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-iterator-to-array-at-end.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-to-array-at-end.md -->","isInternal":false,"tokens":669,"sizeBytes":2883},{"name":"prefer-iterator-to-array.md","path":"docs/rules/prefer-iterator-to-array.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-iterator-to-array.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-to-array.md -->","isInternal":false,"tokens":446,"sizeBytes":1860},{"name":"prefer-iterator-zip.md","path":"docs/rules/prefer-iterator-zip.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-iterator-zip.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-iterator-zip.md -->","isInternal":false,"tokens":655,"sizeBytes":2960},{"name":"prefer-json-import.md","path":"docs/rules/prefer-json-import.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-json-import.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-json-import.md -->","isInternal":false,"tokens":517,"sizeBytes":2343},{"name":"prefer-keyboard-event-key.md","path":"docs/rules/prefer-keyboard-event-key.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-keyboard-event-key.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-keyboard-event-key.md -->","isInternal":false,"tokens":406,"sizeBytes":1715},{"name":"prefer-literal-ascii.md","path":"docs/rules/prefer-literal-ascii.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-literal-ascii.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-literal-ascii.md -->","isInternal":false,"tokens":620,"sizeBytes":2629},{"name":"prefer-location-assign.md","path":"docs/rules/prefer-location-assign.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-location-assign.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-location-assign.md -->","isInternal":false,"tokens":408,"sizeBytes":1678},{"name":"prefer-logical-operator-over-ternary.md","path":"docs/rules/prefer-logical-operator-over-ternary.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-logical-operator-over-ternary.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-logical-operator-over-ternary.md -->","isInternal":false,"tokens":931,"sizeBytes":3757},{"name":"prefer-map-from-entries.md","path":"docs/rules/prefer-map-from-entries.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-map-from-entries.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-map-from-entries.md -->","isInternal":false,"tokens":328,"sizeBytes":1452},{"name":"prefer-math-abs.md","path":"docs/rules/prefer-math-abs.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-math-abs.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-abs.md -->","isInternal":false,"tokens":409,"sizeBytes":1622},{"name":"prefer-math-constants.md","path":"docs/rules/prefer-math-constants.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-math-constants.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-constants.md -->","isInternal":false,"tokens":566,"sizeBytes":2173},{"name":"prefer-math-min-max.md","path":"docs/rules/prefer-math-min-max.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-math-min-max.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-min-max.md -->","isInternal":false,"tokens":455,"sizeBytes":1764},{"name":"prefer-math-trunc.md","path":"docs/rules/prefer-math-trunc.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-math-trunc.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-math-trunc.md -->","isInternal":false,"tokens":779,"sizeBytes":2755},{"name":"prefer-minimal-ternary.md","path":"docs/rules/prefer-minimal-ternary.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-minimal-ternary.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-minimal-ternary.md -->","isInternal":false,"tokens":1589,"sizeBytes":6553},{"name":"prefer-modern-dom-apis.md","path":"docs/rules/prefer-modern-dom-apis.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-modern-dom-apis.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-modern-dom-apis.md -->","isInternal":false,"tokens":1003,"sizeBytes":4130},{"name":"prefer-modern-math-apis.md","path":"docs/rules/prefer-modern-math-apis.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-modern-math-apis.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-modern-math-apis.md -->","isInternal":false,"tokens":995,"sizeBytes":3645},{"name":"prefer-module.md","path":"docs/rules/prefer-module.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-module.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-module.md -->","isInternal":false,"tokens":928,"sizeBytes":3434},{"name":"prefer-native-coercion-functions.md","path":"docs/rules/prefer-native-coercion-functions.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-native-coercion-functions.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-native-coercion-functions.md -->","isInternal":false,"tokens":562,"sizeBytes":2222},{"name":"prefer-negative-index.md","path":"docs/rules/prefer-negative-index.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-negative-index.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-negative-index.md -->","isInternal":false,"tokens":780,"sizeBytes":2977},{"name":"prefer-node-protocol.md","path":"docs/rules/prefer-node-protocol.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-node-protocol.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-node-protocol.md -->","isInternal":false,"tokens":373,"sizeBytes":1349},{"name":"prefer-number-coercion.md","path":"docs/rules/prefer-number-coercion.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-number-coercion.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-number-coercion.md -->","isInternal":false,"tokens":446,"sizeBytes":1815},{"name":"prefer-number-is-safe-integer.md","path":"docs/rules/prefer-number-is-safe-integer.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-number-is-safe-integer.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-number-is-safe-integer.md -->","isInternal":false,"tokens":816,"sizeBytes":3125},{"name":"prefer-number-properties.md","path":"docs/rules/prefer-number-properties.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-number-properties.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-number-properties.md -->","isInternal":false,"tokens":1336,"sizeBytes":5357},{"name":"prefer-object-define-properties.md","path":"docs/rules/prefer-object-define-properties.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-object-define-properties.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-define-properties.md -->","isInternal":false,"tokens":451,"sizeBytes":2033},{"name":"prefer-object-destructuring-defaults.md","path":"docs/rules/prefer-object-destructuring-defaults.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-object-destructuring-defaults.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-destructuring-defaults.md -->","isInternal":false,"tokens":437,"sizeBytes":1868},{"name":"prefer-object-from-entries.md","path":"docs/rules/prefer-object-from-entries.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-object-from-entries.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-from-entries.md -->","isInternal":false,"tokens":573,"sizeBytes":2204},{"name":"prefer-object-iterable-methods.md","path":"docs/rules/prefer-object-iterable-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-object-iterable-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-object-iterable-methods.md -->","isInternal":false,"tokens":649,"sizeBytes":2570},{"name":"prefer-observer-apis.md","path":"docs/rules/prefer-observer-apis.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-observer-apis.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-observer-apis.md -->","isInternal":false,"tokens":427,"sizeBytes":1975},{"name":"prefer-optional-catch-binding.md","path":"docs/rules/prefer-optional-catch-binding.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-optional-catch-binding.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-optional-catch-binding.md -->","isInternal":false,"tokens":322,"sizeBytes":1254},{"name":"prefer-path2d.md","path":"docs/rules/prefer-path2d.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-path2d.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-path2d.md -->","isInternal":false,"tokens":322,"sizeBytes":1313},{"name":"prefer-private-class-fields.md","path":"docs/rules/prefer-private-class-fields.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-private-class-fields.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-private-class-fields.md -->","isInternal":false,"tokens":777,"sizeBytes":3441},{"name":"prefer-promise-static-methods.md","path":"docs/rules/prefer-promise-static-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-promise-static-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-promise-static-methods.md -->","isInternal":false,"tokens":356,"sizeBytes":1521},{"name":"prefer-promise-try.md","path":"docs/rules/prefer-promise-try.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-promise-try.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-promise-try.md -->","isInternal":false,"tokens":397,"sizeBytes":1649},{"name":"prefer-promise-with-resolvers.md","path":"docs/rules/prefer-promise-with-resolvers.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-promise-with-resolvers.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-promise-with-resolvers.md -->","isInternal":false,"tokens":352,"sizeBytes":1537},{"name":"prefer-prototype-methods.md","path":"docs/rules/prefer-prototype-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-prototype-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-prototype-methods.md -->","isInternal":false,"tokens":286,"sizeBytes":1146},{"name":"prefer-query-selector.md","path":"docs/rules/prefer-query-selector.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-query-selector.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-query-selector.md -->","isInternal":false,"tokens":502,"sizeBytes":2271},{"name":"prefer-queue-microtask.md","path":"docs/rules/prefer-queue-microtask.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-queue-microtask.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-queue-microtask.md -->","isInternal":false,"tokens":613,"sizeBytes":2511},{"name":"prefer-reflect-apply.md","path":"docs/rules/prefer-reflect-apply.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-reflect-apply.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-reflect-apply.md -->","isInternal":false,"tokens":485,"sizeBytes":1985},{"name":"prefer-regexp-escape.md","path":"docs/rules/prefer-regexp-escape.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-regexp-escape.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-regexp-escape.md -->","isInternal":false,"tokens":408,"sizeBytes":1668},{"name":"prefer-regexp-test.md","path":"docs/rules/prefer-regexp-test.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-regexp-test.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-regexp-test.md -->","isInternal":false,"tokens":459,"sizeBytes":1823},{"name":"prefer-response-static-json.md","path":"docs/rules/prefer-response-static-json.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-response-static-json.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-response-static-json.md -->","isInternal":false,"tokens":377,"sizeBytes":1630},{"name":"prefer-scoped-selector.md","path":"docs/rules/prefer-scoped-selector.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-scoped-selector.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-scoped-selector.md -->","isInternal":false,"tokens":617,"sizeBytes":2614},{"name":"prefer-set-has.md","path":"docs/rules/prefer-set-has.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-set-has.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-set-has.md -->","isInternal":false,"tokens":697,"sizeBytes":2618},{"name":"prefer-set-methods.md","path":"docs/rules/prefer-set-methods.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-set-methods.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-set-methods.md -->","isInternal":false,"tokens":816,"sizeBytes":3568},{"name":"prefer-set-size.md","path":"docs/rules/prefer-set-size.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-set-size.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-set-size.md -->","isInternal":false,"tokens":383,"sizeBytes":1358},{"name":"prefer-short-arrow-method.md","path":"docs/rules/prefer-short-arrow-method.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-short-arrow-method.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-short-arrow-method.md -->","isInternal":false,"tokens":681,"sizeBytes":2898},{"name":"prefer-short-escape-sequences.md","path":"docs/rules/prefer-short-escape-sequences.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-short-escape-sequences.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-short-escape-sequences.md -->","isInternal":false,"tokens":625,"sizeBytes":2286},{"name":"prefer-simple-condition-first.md","path":"docs/rules/prefer-simple-condition-first.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-simple-condition-first.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-simple-condition-first.md -->","isInternal":false,"tokens":868,"sizeBytes":4193},{"name":"prefer-simple-sort-comparator.md","path":"docs/rules/prefer-simple-sort-comparator.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-simple-sort-comparator.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-simple-sort-comparator.md -->","isInternal":false,"tokens":530,"sizeBytes":1957},{"name":"prefer-simplified-conditions.md","path":"docs/rules/prefer-simplified-conditions.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-simplified-conditions.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-simplified-conditions.md -->","isInternal":false,"tokens":1308,"sizeBytes":5005},{"name":"prefer-single-array-predicate.md","path":"docs/rules/prefer-single-array-predicate.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-single-array-predicate.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-array-predicate.md -->","isInternal":false,"tokens":469,"sizeBytes":2011},{"name":"prefer-single-call.md","path":"docs/rules/prefer-single-call.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-single-call.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-call.md -->","isInternal":false,"tokens":888,"sizeBytes":3565},{"name":"prefer-single-object-destructuring.md","path":"docs/rules/prefer-single-object-destructuring.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-single-object-destructuring.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-object-destructuring.md -->","isInternal":false,"tokens":451,"sizeBytes":1765},{"name":"prefer-single-replace.md","path":"docs/rules/prefer-single-replace.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-single-replace.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-single-replace.md -->","isInternal":false,"tokens":456,"sizeBytes":2059},{"name":"prefer-smaller-scope.md","path":"docs/rules/prefer-smaller-scope.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-smaller-scope.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-smaller-scope.md -->","isInternal":false,"tokens":762,"sizeBytes":3212},{"name":"prefer-split-limit.md","path":"docs/rules/prefer-split-limit.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-split-limit.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-split-limit.md -->","isInternal":false,"tokens":503,"sizeBytes":2155},{"name":"prefer-spread.md","path":"docs/rules/prefer-spread.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-spread.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-spread.md -->","isInternal":false,"tokens":1142,"sizeBytes":4566},{"name":"prefer-string-match-all.md","path":"docs/rules/prefer-string-match-all.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-string-match-all.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-match-all.md -->","isInternal":false,"tokens":253,"sizeBytes":1023},{"name":"prefer-string-pad-start-end.md","path":"docs/rules/prefer-string-pad-start-end.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-string-pad-start-end.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-pad-start-end.md -->","isInternal":false,"tokens":853,"sizeBytes":3445},{"name":"prefer-string-raw.md","path":"docs/rules/prefer-string-raw.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-string-raw.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-raw.md -->","isInternal":false,"tokens":512,"sizeBytes":2095},{"name":"prefer-string-repeat.md","path":"docs/rules/prefer-string-repeat.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-string-repeat.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-repeat.md -->","isInternal":false,"tokens":435,"sizeBytes":1701},{"name":"prefer-string-replace-all.md","path":"docs/rules/prefer-string-replace-all.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-string-replace-all.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-replace-all.md -->","isInternal":false,"tokens":615,"sizeBytes":2427},{"name":"prefer-string-slice.md","path":"docs/rules/prefer-string-slice.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-string-slice.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-slice.md -->","isInternal":false,"tokens":535,"sizeBytes":2167},{"name":"prefer-string-starts-ends-with.md","path":"docs/rules/prefer-string-starts-ends-with.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-string-starts-ends-with.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-starts-ends-with.md -->","isInternal":false,"tokens":618,"sizeBytes":2416},{"name":"prefer-string-trim-start-end.md","path":"docs/rules/prefer-string-trim-start-end.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-string-trim-start-end.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-string-trim-start-end.md -->","isInternal":false,"tokens":456,"sizeBytes":1850},{"name":"prefer-structured-clone.md","path":"docs/rules/prefer-structured-clone.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-structured-clone.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-structured-clone.md -->","isInternal":false,"tokens":369,"sizeBytes":1414},{"name":"prefer-switch.md","path":"docs/rules/prefer-switch.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-switch.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-switch.md -->","isInternal":false,"tokens":1001,"sizeBytes":3287},{"name":"prefer-temporal-conversion.md","path":"docs/rules/prefer-temporal-conversion.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-temporal-conversion.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-temporal-conversion.md -->","isInternal":false,"tokens":923,"sizeBytes":4395},{"name":"prefer-temporal.md","path":"docs/rules/prefer-temporal.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-temporal.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-temporal.md -->","isInternal":false,"tokens":1123,"sizeBytes":4437},{"name":"prefer-ternary.md","path":"docs/rules/prefer-ternary.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-ternary.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-ternary.md -->","isInternal":false,"tokens":1724,"sizeBytes":6517},{"name":"prefer-then-catch.md","path":"docs/rules/prefer-then-catch.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-then-catch.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-then-catch.md -->","isInternal":false,"tokens":505,"sizeBytes":2268},{"name":"prefer-toggle-attribute.md","path":"docs/rules/prefer-toggle-attribute.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-toggle-attribute.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-toggle-attribute.md -->","isInternal":false,"tokens":522,"sizeBytes":2456},{"name":"prefer-top-level-await.md","path":"docs/rules/prefer-top-level-await.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-top-level-await.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-top-level-await.md -->","isInternal":false,"tokens":462,"sizeBytes":1911},{"name":"prefer-type-error.md","path":"docs/rules/prefer-type-error.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-type-error.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-type-error.md -->","isInternal":false,"tokens":639,"sizeBytes":2661},{"name":"prefer-type-literal-last.md","path":"docs/rules/prefer-type-literal-last.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-type-literal-last.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-type-literal-last.md -->","isInternal":false,"tokens":448,"sizeBytes":1896},{"name":"prefer-uint8array-base64.md","path":"docs/rules/prefer-uint8array-base64.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-uint8array-base64.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-uint8array-base64.md -->","isInternal":false,"tokens":866,"sizeBytes":3429},{"name":"prefer-uint8array-hex.md","path":"docs/rules/prefer-uint8array-hex.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-uint8array-hex.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-uint8array-hex.md -->","isInternal":false,"tokens":1446,"sizeBytes":5900},{"name":"prefer-unary-minus.md","path":"docs/rules/prefer-unary-minus.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-unary-minus.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-unary-minus.md -->","isInternal":false,"tokens":300,"sizeBytes":1075},{"name":"prefer-unicode-code-point-escapes.md","path":"docs/rules/prefer-unicode-code-point-escapes.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-unicode-code-point-escapes.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-unicode-code-point-escapes.md -->","isInternal":false,"tokens":607,"sizeBytes":2473},{"name":"prefer-url-can-parse.md","path":"docs/rules/prefer-url-can-parse.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-url-can-parse.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-url-can-parse.md -->","isInternal":false,"tokens":314,"sizeBytes":1318},{"name":"prefer-url-href.md","path":"docs/rules/prefer-url-href.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-url-href.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-url-href.md -->","isInternal":false,"tokens":320,"sizeBytes":1315},{"name":"prefer-url-search-parameters.md","path":"docs/rules/prefer-url-search-parameters.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-url-search-parameters.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-url-search-parameters.md -->","isInternal":false,"tokens":369,"sizeBytes":1644},{"name":"prefer-while-loop-condition.md","path":"docs/rules/prefer-while-loop-condition.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/prefer-while-loop-condition.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fprefer-while-loop-condition.md -->","isInternal":false,"tokens":421,"sizeBytes":1590},{"name":"relative-url-style.md","path":"docs/rules/relative-url-style.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/relative-url-style.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frelative-url-style.md -->","isInternal":false,"tokens":570,"sizeBytes":2249},{"name":"require-array-join-separator.md","path":"docs/rules/require-array-join-separator.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-array-join-separator.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-array-join-separator.md -->","isInternal":false,"tokens":293,"sizeBytes":1157},{"name":"require-array-sort-compare.md","path":"docs/rules/require-array-sort-compare.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-array-sort-compare.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-array-sort-compare.md -->","isInternal":false,"tokens":715,"sizeBytes":2394},{"name":"require-css-escape.md","path":"docs/rules/require-css-escape.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-css-escape.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-css-escape.md -->","isInternal":false,"tokens":373,"sizeBytes":1572},{"name":"require-frontmatter-fields.md","path":"docs/rules/require-frontmatter-fields.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-frontmatter-fields.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-frontmatter-fields.md -->","isInternal":false,"tokens":411,"sizeBytes":1641},{"name":"require-module-attributes.md","path":"docs/rules/require-module-attributes.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-module-attributes.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-module-attributes.md -->","isInternal":false,"tokens":296,"sizeBytes":1147},{"name":"require-module-specifiers.md","path":"docs/rules/require-module-specifiers.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-module-specifiers.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-module-specifiers.md -->","isInternal":false,"tokens":376,"sizeBytes":1550},{"name":"require-number-to-fixed-digits-argument.md","path":"docs/rules/require-number-to-fixed-digits-argument.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-number-to-fixed-digits-argument.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-number-to-fixed-digits-argument.md -->","isInternal":false,"tokens":364,"sizeBytes":1439},{"name":"require-passive-events.md","path":"docs/rules/require-passive-events.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-passive-events.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-passive-events.md -->","isInternal":false,"tokens":288,"sizeBytes":1337},{"name":"require-post-message-target-origin.md","path":"docs/rules/require-post-message-target-origin.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-post-message-target-origin.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-post-message-target-origin.md -->","isInternal":false,"tokens":420,"sizeBytes":1999},{"name":"require-proxy-trap-boolean-return.md","path":"docs/rules/require-proxy-trap-boolean-return.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-proxy-trap-boolean-return.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-proxy-trap-boolean-return.md -->","isInternal":false,"tokens":361,"sizeBytes":1463},{"name":"require-text-decoder-streaming.md","path":"docs/rules/require-text-decoder-streaming.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/require-text-decoder-streaming.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Frequire-text-decoder-streaming.md -->","isInternal":false,"tokens":750,"sizeBytes":3513},{"name":"single-line-block-comment-style.md","path":"docs/rules/single-line-block-comment-style.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/single-line-block-comment-style.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fsingle-line-block-comment-style.md -->","isInternal":false,"tokens":599,"sizeBytes":2517},{"name":"string-content.md","path":"docs/rules/string-content.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/string-content.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fstring-content.md -->","isInternal":false,"tokens":1297,"sizeBytes":5082},{"name":"switch-case-braces.md","path":"docs/rules/switch-case-braces.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/switch-case-braces.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fswitch-case-braces.md -->","isInternal":false,"tokens":733,"sizeBytes":2707},{"name":"switch-case-break-position.md","path":"docs/rules/switch-case-break-position.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/switch-case-break-position.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fswitch-case-break-position.md -->","isInternal":false,"tokens":301,"sizeBytes":1172},{"name":"template-indent.md","path":"docs/rules/template-indent.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/template-indent.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Ftemplate-indent.md -->","isInternal":false,"tokens":1066,"sizeBytes":4214},{"name":"text-encoding-identifier-case.md","path":"docs/rules/text-encoding-identifier-case.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/text-encoding-identifier-case.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Ftext-encoding-identifier-case.md -->","isInternal":false,"tokens":597,"sizeBytes":2287},{"name":"throw-new-error.md","path":"docs/rules/throw-new-error.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/throw-new-error.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Fthrow-new-error.md -->","isInternal":false,"tokens":290,"sizeBytes":1231},{"name":"try-complexity.md","path":"docs/rules/try-complexity.md","rawUrl":"https://raw.githubusercontent.com/sindresorhus/eslint-plugin-unicorn/HEAD/docs/rules/try-complexity.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/sindresorhus/eslint-plugin-unicorn?path=docs%2Frules%2Ftry-complexity.md -->","isInternal":false,"tokens":337,"sizeBytes":1274}],"systemPromptSnippet":"<yakaai_skills repo=\"sindresorhus/eslint-plugin-unicorn\">\n<!-- File: AGENTS.md (Tokens: ~5694 | Category: root-instruction) -->\n# Agents\n\n## Philosophy\n\nKeep rules simple. Target common patterns, skip rare edge cases rather than overcomplicating the rule.\n\n### Out of scope\n\nThese constructs are intentionally unsupported. Do not add machinery to handle them:\n\n- **`Array` subclasses** — Receiver checks treat `new Foo()` as non-array, so `class Foo extends Array {}` is missed. Do not add class heritage resolution for this. (`Error` subclasses are different: `createTypeCheckers` resolves class heritage by default.)\n- **Shadowed built-ins** — Receiver checks may recognize built-ins by name without resolving scope. Do not add scope resolution for shadowed constructors.\n- **BigInt typed-array chains** — Only direct constructors, static `.from()`/`.of()`, and explicit types are recognized. Do not add flow analysis for method chains.\n\n## Rule anatomy\n\nRules export a default config object with `create` and `meta`. The `create` function uses `context.on(NodeType, listener)` to register visitors (this is the Unicorn-specific API, not standard ESLint). See the [ESLint custom rules guide](https://eslint.org/docs/latest/extend/custom-rules) for the underlying API.\n\nKey differences from standard ESLint:\n\n- Use `context.on('NodeType', listener)` and `context.onExit('NodeType', listener)` instead of returning a visitor object.\n- Listeners return or yield problem objects (`{node, messageId, fix, suggest, data}`) directly. The adapter calls `context.report()` for you.\n- Fix functions receive `(fixer, {abort})`. Call `abort()` to bail out of an unfixable case.\n\n```js\nconst MESSAGE_ID = 'rule-name';\n\nconst messages = {\n\t[MESSAGE_ID]: 'Error message with {{placeholder}}.',\n};\n\n/** @param {import('eslint').Rule.RuleContext} context */\nconst create = context => {\n\tcontext.on('CallExpression', node => {\n\t\treturn {\n\t\t\tnode,\n\t\t\tmessageId: MESSAGE_ID,\n\t\t\tdata: {placeholder: 'value'},\n\t\t\tfix: fixer => fixer.replaceText(node, 'replacement'),\n\t\t};\n\t});\n};\n\n/** @type {import('eslint').Rule.RuleModule} */\nconst config = {\n\tcreate,\n\tmeta: {\n\t\ttype: 'suggestion',\n\t\tdocs: {\n\t\t\tdescription: 'Enforce …',\n\t\t\trecommended: true, // 'unopinionated' (safest, in both presets), true (in recommended only), or false (opt-in)\n\t\t},\n\t\tfixable: 'code', // or omit; add hasSuggestions: true for suggestions\n\t\tschema: [],\n\t\tdefaultOptions: [{option: 'default'}], // merged automatically\n\t\tmessages,\n\t},\n};\nexport default config;\n```\n\nOptions are accessed via `context.options[0]`. Use `meta.defaultOptions` for defaults (no manual merging).\n\n### `recommended` config level\n\n`meta.docs.recommended` picks the preset that enables the rule. `'unopinionated'` does NOT mean \"too opinionated\" — it means the opposite:\n\n- **`'unopinionated'`** — Uncontroversial; in both `unopinionated` and `recommended` (the former is a subset). Safest bucket and the default for new rules.\n- **`true`** — A more opinionated call, still on by default. In `recommended` only.\n- **`false`** — Off by default, only in `all`. For niche or opt-in rules.\n\n| `recommended` | `unopinionated` | `recommended` config | `all` |\n|---|---|---|---|\n| `'unopinionated'` | on | on | on |\n| `true` | off | on | on |\n| `false` (or omitted) | off | off | on |\n\nSo a rule too opinionated or niche for broad use is `false`, never `'unopinionated'`. If unsure which level fits, share your recommendation and ask.\n\nName boolean options in the positive `check*` form (for example, `checkProperties`), never the negated `ignore*`/`skip*` form, so option naming stays consistent across rules. This does not apply to array/pattern options like `ignore` (a list of patterns to ignore), which follow ESLint's own conventions.\n\n### Helper naming\n\nName helpers after what they return or do:\n\n- `is*`/`has*`/`should*`/`can*`/`needs*` must return booleans. Prefer explicit `false` over `undefined` in predicate helpers.\n- `get*Problem` returns one problem object or `undefined`; `get*Problems` returns/yields multiple problem objects.\n- `report*` should call `context.report()` directly.\n- Avoid `check*` for private helpers. Reserve `check*` for public boolean options, like `checkProperties`.\n- Do not combine reporting/yielding with a predicate return. Split into a problem builder and a boolean at the call site.\n\n## Rule languages\n\nEvery new rule should declare the official [`meta.languages`](https://eslint.org/docs/latest/extend/custom-rules#rule-languages) field, in `\"plugin/language\"` form, one per line: `['js/js']` for JavaScript/TypeScript-only rules (most), or the languages it supports (for example `['js/js', 'css/css']`, or `['*']` for any file type).\n\nAvailable identifiers:\n\n- `js/js` — JavaScript and TypeScript\n- `css/css` — [`@eslint/css`](https://github.com/eslint/css)\n- `json/json`, `json/jsonc`, `json/json5` — [`@eslint/json`](https://github.com/eslint/json)\n- `markdown/commonmark`, `markdown/gfm` — [`@eslint/markdown`](https://github.com/eslint/markdown)\n- `html/html` — [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint)\n- `toml/toml`: [`eslint-plugin-toml`](https://github.com/ota-meshi/eslint-plugin-toml)\n- `yml/yaml` — [`eslint-plugin-yml`](https://github.com/ota-meshi/eslint-plugin-yml)\n\nMost rules visit JavaScript AST nodes, so `js/js` is all they can support. But when a rule's logic is language-agnostic (filename, raw text, comments, or disable directives), support as many languages as is feasible. Root node types differ per language (`Program` for JS/TS, HTML, TOML, and YAML, `StyleSheet` for CSS, `Document` for JSON, `root` for Markdown), so use `onRoot(context, listener)` to run on every root and `getComments(context)` for cross-language comments (both from `rules/utils/`). For reference, see `prefer-https` (`['*']`, raw-text scan) and `no-empty-file` (per-language root handlers).\n\nCSS-only rules (`['css/css']`) belong in [`eslint-cssicorn`](https://github.com/sindresorhus/eslint-cssicorn), not here.\n\n### TOML\n\n- The `Program` body always contains a `TOMLTopLevelTable`, even in empty files. Its `body` contains key/value pairs and table declarations; an empty named table counts as content.\n- `TOMLValue` nodes distinguish strings, integers, floats, and dates/times through `kind`. Read numeric source text to preserve precision and signs; skip `inf` and `nan` when grouping digits. Do not convert `1.0` to `1`, which changes the TOML type.\n- The parser exposes `#` comments as `Block` nodes. Use `getComments(context)` and preserve `#` when fixing comments. `sourceCode.parserServices?.isTOML` identifies TOML.\n- Basic strings and basic quoted keys interpret escapes; literal strings do not. `escape-case` demonstrates escape-preserving edits. `string-content` checks decoded string values only, leaves keys unchanged, and writes double-quoted basic strings. Its serializer uses `JSON.stringify()` plus DEL escaping and skips fixes for unpaired surrogates.\n- Use `languages.toml` from `test/utils/test.js` in snapshot cases. For regular rule-tester tests, use `language: languages.toml.language` and `plugins: languages.toml.plugins`. Test fixes and suggestions with the TOML parser, including literal/multiline strings and comments.\n\n## Reusable utilities\n\n`../eslint-node-test` adapts its infrastructure (rule adapter, snapshot test harness, doc generation) from this plugin. When changing shared patterns here (rule anatomy, testing conventions, autofix rules), consider whether the equivalent should be ported over there.\n\n`../eslint-cssicorn` shares CSS rule utilities with this plugin (for example, `rules/shared/css-shorthand-properties.js`). Keep them in sync: when you change a CSS utility in one plugin, make the same change in the other.\n\nBefore writing helpers, check these directories:\n\n- **`rules/ast/`** - AST node type checks: `isMethodCall`, `isCallExpression`, `isMemberExpression`, `isFunction`, `isStringLiteral`, etc.\n- **`rules/utils/`** - General utilities: `needsSemicolon`, parenthesis helpers (`shouldAddParenthesesToMemberExpressionObject`, etc.), `isNodeMatches`, `getCallExpressionTokens`, `isSameReference`, `getReferences`, etc.\n- **`rules/fix/`** - Fixer helpers: `removeArgument`, `removeMethodCall`, `replaceArgument`, `replaceReferenceIdentifier`, `removeParentheses`, `replaceTemplateElement`, `switchCallExpressionToNewExpression`, etc.\n- **`rules/shared/`** - Shared rule logic for rules that share patterns (e.g., `simple-array-search-rule.js`).\n\nImport from the barrel `index.js` in each directory (e.g., `import {isMethodCall} from './ast/index.js'`).\n\nWhen matching a string's value, use `getStaticStringValue()` so quoted strings and untagged template literals without expressions behave the same. Check against `undefined` when empty strings are supported. Keep `isStringLiteral()` and literal node checks for syntax-specific behavior, such as quotes, escapes, directives, and static import/export sources. Audit fixers separately: template nodes have no `.value` or `.raw`, and generated quoted strings must escape the decoded value.\n\nAlso check `../eslint-node-test/rules/ast/`, `../eslint-node-test/rules/utils/`, and `../eslint-node-test/rules/fix/` — some helpers there were adapted from here and may have picked up fixes or edge cases worth porting back.\n\nWhen at least two rules need the same non-trivial logic, put it in a shared utility (`rules/utils/` for general helpers, `rules/shared/` for shared rule logic) and use it from each rule instead of duplicating it. This also applies when you write logic that an existing rule already has: extract it from that rule and use it in both. Keep trivial or rule-specific helpers local.\n\nAlso use `@eslint-community/eslint-utils` for helpers like `findVariable`, `getStaticValue`, `hasSideEffect`, `getPropertyName`, and token predicates (`isCommaToken`, `isSemicolonToken`, etc.).\n\nMost commonly used utilities:\n\n- **`isMethodCall`** - The most used helper. Check if a node is a method call matching specific criteria.\n- **`isParenthesized`**, **`getParenthesizedRange`** (from `rules/utils/`) - Handle extra parentheses around nodes.\n- **`needsSemicolon`** - Check if a semicolon is needed before a replacement.\n- **`isValueNotUsable`** - Check if a call expression's return value is unused (safe to change behavior).\n- **`hasSideEffect`** (from `@eslint-community/eslint-utils`) - Check if a node has side effects, important for safe autofixes.\n- **`findVariable`** (from `@eslint-community/eslint-utils`) - Resolve a variable's scope binding.\n- **`getStaticValue`** (from `@eslint-community/eslint-utils`) - Get a node's static value at lint time.\n- **`fixSpaceAroundKeyword`**, **`removeMethodCall`**, **`removeArgument`** - Common fix helpers.\n\n## Code path analysis\n\nUse [ESLint's code path analysis API](https://eslint.org/docs/latest/extend/code-path-analysis) when a rule needs to know whether control flow always exits a branch or function body (e.g., via `return`, `throw`, `break`, `continue`, exhaustive `switch`, infinite loop). CPA is more accurate than manual AST walking because it handles complex constructs like `try`/`catch`/`finally`, labeled breaks, and unreachable code after infinite loops.\n\nWhen to use CPA instead of manual AST walking:\n\n- **Checking if an `if` branch always exits** — Use `trackBranchExits` from `rules/utils/`. It registers CPA event listeners and returns a predicate `(branch) => boolean`. Query it after the `IfStatement` has exited (use `context.onExit`). Used by `no-useless-else`, `no-declarations-before-early-exit`, `prefer-else-if`.\n- **Checking if a function body always exits** — Track segments per code path using `onCodePathStart`/`onCodePathEnd`/`onCodePathSegmentStart`/`onCodePathSegmentEnd`/`onUnreachableCodePathSegmentStart`/`onUnreachableCodePathSegmentEnd`. Snapshot segment reachability at `BlockStatement:exit` for function bodies (before code path segments end). See `require-proxy-trap-boolean-return` for the pattern.\n\nKey implementation notes:\n\n- Use a **per-code-path segment stack** (`segmentSetStack`) so nested functions don't pollute the enclosing path's state.\n- When checking CPA data from a parent node, use `context.onExit` (not `context.on`) so inner code paths have been fully analyzed.\n- At `onCodePathEnd`, all segments have already ended, so `currentSegments()` is empty. Snapshot reachability at the AST node exit (e.g., `BlockStatement:exit`) instead.\n- `trackBranchExits` uses a `prevSegments`-based check: a branch \"falls through\" if any post-if merge segment has a `prevSegment` in the branch's terminal segment set.\n\nWhen NOT to use CPA:\n\n- Simple last-statement checks (e.g., \"does the last statement return?\") — just check `node.type`.\n- Collecting return statements or associating them with functions — a simple function stack or AST walk is fine.\n- Fixer logic that only needs to know \"return or throw\" in the last position — no CPA needed.\n\n## Auto-generated files\n\n- **`rules/index.js`** is auto-generated. Never edit it by hand. Run `npm run create-rules-index-file` to regenerate after adding or removing rules.\n- **Non-JavaScript language table** in `readme.md` is generated from `meta.languages`. Run `npm run fix:non-js-languages` after changing language support; add new language columns in `scripts/create-non-js-languages-list.js`.\n- **Doc headers** in `docs/rules/<rule>.md` (everything above `<!-- end auto-generated rule header -->`) are auto-generated by `eslint-doc-generator`. Do not edit them. Run `npm run fix:eslint-docs` to update.\n\nOn rebase, `rules/index.js` and the `readme.md` rules table almost always conflict because other rules were added meanwhile. Don't hand-resolve `rules/index.js` — take either side, then run `npm run create-rules-index-file`. For `readme.md`, keep both rows and re-sort the table alphabetically.\n\n## Documentation\n\nKeep rule documentation succinct, especially sections about limitations and caveats. Focus on practical information users need to understand and use the rule.\n\nDo not use Markdown tables in rule documentation. Use prose, lists, or code examples instead.\n\nUse JavaScript syntax for configuration examples, not JSON-style quoted keys and strings, unless the example is specifically JSON.\n\nFor rule documentation examples, prefer one failing (`// ❌`) example followed by one corresponding passing (`// ✅`) example in each code block whenever possible. Use separate blocks for distinct cases instead of grouping all failing and passing examples together.\n\n## Testing\n\nTests should be comprehensive with many edge cases, but no duplicate coverage. Add lots of focused edge-case tests for matching and fixes/suggestions. Add tests for edge cases the rule intentionally ignores to document the behavior.\n\nTests use the built-in `node:test` runner. Prefer `test.snapshot()` which auto-generates snapshots for errors, fixes, and suggestions:\n\n```js\nimport {getTester} from './utils/test.js';\nconst {test} = getTester(import.meta);\n\ntest.snapshot({\n\tvalid: ['validCode'],\n\tinvalid: ['invalidCode'],\n});\n```\n\nOther test modes: `test.typescript()` and `test.vue()` set the parser for all cases in the block. For individual TypeScript cases within a normal `test.snapshot()`, use `{code, parser: parsers.typescript}` instead. Import `parsers` from `./utils/test.js`.\n\n- **Never run integration tests** (`test/integration/test.js`). They are too slow for development.\n- **While developing, only run targeted tests**: `node --test test/rule-name.js`. Do not run `npm test` or the full suite until all changes are complete.\n- **Only run the full test suite (`npm test`) once at the very end** to confirm everything passes.\n- **For new rules, run dogfooding before pushing**: `npm run run-rules-on-codebase`. Re-run it after each fix — fixes to rule logic often surface new violations elsewhere. Delete any scratch files first (e.g. in `.ai-temporary/`), or the dogfooding run lints them too.\n- Create or update snapshots: `node --test --test-update-snapshots test/rule-name.js`. A new snapshot case fails until you do this. Snapshots are saved in `test/snapshots/rule-name.js.snapshot`.\n- Focus a single case: wrap with `test.only('code')` or `test.only({code, options})`, and run with `node --test --test-only test/rule-name.js` (remove before committing). Never update snapshots while `only` is used: the update rewrites the whole snapshot file, so the snapshots of the skipped cases are deleted.\n- Use `t.assert.*` inside tests, with the strict methods (`strictEqual`, `deepStrictEqual`), because `t.assert` is loose mode. Helpers outside tests import `node:assert/strict`.\n- For non-snapshot tests, use `test()` with explicit `errors` and `output`\n\n### Edge cases to test\n\nInclude test cases for these when relevant to the rule:\n\n- **TypeScript** - Type assertions (`foo as Bar`, `<Bar>foo`), non-null assertions (`foo!`), `satisfies`, generics. Verify both matching and fixer/suggestion output, including optional chaining behavior and ASI protection when the output can start with `(` or `[`. Use `{code, parser: parsers.typescript}`. For rules that use type information (e.g. `isBoolean`, `parserServices.getTypeAtLocation`), test three tiers where it makes sense: plain JS, TS with only type annotations (syntax-only, via `parsers.typescript`), and TS with full type info (via the `typeAware` helper with `projectService: {allowDefaultProject: ['*.ts']}`). See `test/no-unsafe-property-key.js` for the `typeAware` pattern.\n- **JSX** - JSX expressions and fragments, if the rule targets patterns that can appear in JSX.\n- **Comments** - Inline and block comments inside the targeted node, to verify fixes don't drop them.\n- **Parenthesized expressions** - Extra parentheses around the target: `(foo).bar()`.\n- **Nested/chained** - The pattern appearing inside other expressions or chained calls.\n- **Computed properties** - `obj[method]()` vs `obj.method()`.\n- **Tagged templates** - `` tag`string` ``.\n- **Template literals without expressions** - Test quoted and backtick forms wherever matching depends on a string's value, including mixed forms, escaped values, and empty strings. Test interpolated and tagged templates separately; they are not static strings.\n- **Optional chaining** - `foo?.bar()`, `foo?.bar?.baz`.\n- **Spread** - `[...foo]`, `{...foo}`, `fn(...args)`.\n- **Destructuring** - The pattern inside destructuring assignments or parameters.\n- **Return value used vs unused** - `const x = foo.bar()` vs `foo.bar()` as a statement. Some fixes are only safe when the return value is unused (see `isValueNotUsable`).\n\n## Linting\n\nCI lints with **ESLint**, not `xo` — a clean `npx xo` run does not mean CI passes.\n\nRun `npm run fix` (or `npm run fix:js` for JS only) — it auto-fixes and reports whatever remains. Prefer it over hand-fixing errors one at a time.\n\nLint enforces single quotes (`avoidEscape: false`, no template literals). Don't write backtick strings in test cases unless you need interpolation — `--fix` can't convert a backtick string that contains a `'`, so you'd have to fix it by hand.\n\n## Autofix\n\nAlways try to provide an autofix if it cannot change runtime behavior. If an autofix could change runtime behavior, try to provide a suggestion instead.\n\nDo not complicate autofixes to handle shadowed built-in globals like `Number`, `Math`, `parseInt`, or `parseFloat`. Treat that as unsupported unless the rule already has a simple, local scope-safety check for another reason.\n\nDo not complicate autofixes to preserve Proxy or accessor side effects. Treat that as unsupported.\n\nDo not block reports, suggestions, or autofixes only to preserve sparse array holes. Treat array holes as unsupported.\n\nDo not turn all of a rule's autofixes into suggestions because of a rare evaluation-order case. These cases are unsupported: temporal dead zone reads, `valueOf`/`toString` coercion order, and when a side-effect-free expression is evaluated. Keep the autofix for the common pure form (for example `new Set([...x])`, `array.some(x => x === value)`, or a pure inline callback). Use a suggestion only when a real side effect can change the result, such as a call, assignment, update, `await`, `yield`, or a callback that is not proven pure. When a fix changes evaluation order, add a test that proves the most common form of the pattern is still autofixed.\n\nWhen writing fix functions:\n\n1. **Comments** - Keep reporting unless comments affect rule semantics; let ESLint handle disable directives. Withhold edits that remove or move comments using `getCommentSafeProblem()` or `abort()`. Preserve safe token edits.\n2. **Parentheses** - Replacing `foo` in `foo.bar()` with a complex expression may need wrapping: `(a + b).bar()`. Use helpers from `rules/utils/` like `shouldAddParenthesesToMemberExpressionObject`.\n3. **Semicolons** - If a fix makes a statement start with `[` or `(`, check `needsSemicolon()` and prepend `;` if needed.\n4. **Spacing** - Replacing `{foo}` with an identifier may merge tokens: `const{foo}` becomes `constfoo`. Add spaces when a symbol-boundary becomes a letter-boundary.\n5. **Generator fixes** - Use `* fix(fixer) { yield ... }` for multi-step fixes.\n6. **Suggestions** - Use `suggest` array with `messageId` and `fix` when autofix could change runtime behavior. Set `hasSuggestions: true` in meta.\n7. **Indentation and line endings** - ESLint inserts fix text verbatim and does not re-indent it. Never hardcode `\\t` or `\\n` when building new lines. Use the helpers in `rules/utils/`: `getLineIndent(node, context)` for the indentation of the line a node is on, `getIndentUnit(context)` for one level of the file's indentation, `getLinebreak(context)` for the file's line ending, and `reindentText(text, sourceIndent, targetIndent)` to move multi-line text to another indentation. Test fixes with space-indented and CRLF input, not only tabs and LF.\n\n## Rule naming\n\nUse a clear prefix that signals intent (see [ESLint built-in rules](https://eslint.org/docs/latest/rules/) for inspiration):\n\n- **`no-`** - Disallow something: `no-array-reduce`, `no-await-in-promise-methods`\n- **`prefer-`** - Suggest a better alternative: `prefer-array-flat-map`, `prefer-set-has`\n- **`require-`** - Mandate something is present: `require-array-join-separator`\n- **`consistent-`** - Enforce a single consistent style: `consistent-destructuring`\n- **No prefix** - Enforce a specific pattern: `error-message`, `filename-case`, `throw-new-error`\n\nName after the target construct, not the fix. Be specific: `no-array-method-this-argument` not `no-this-argument`.\n\n## Creating a new rule\n\n1. Run `npm run create-rule` to scaffold the rule file, test file, and doc file. This also regenerates `rules/index.js` and updates doc headers.\n2. Write tests in `test/<rule>.js` before implementing the rule.\n3. Implement the rule in `rules/<rule>.js`.\n4. Write documentation in `docs/rules/<rule>.md` (below the auto-generated header).\n5. Run `node --test --test-update-snapshots test/<rule>.js` to create the snapshots, review them, then run `node --test test/<rule>.js` to verify tests pass.\n6. Before pushing, run lint (`npm run lint:js`, which runs `eslint` — see [Linting](#linting)), dogfooding (`npm run run-rules-on-codebase`), and then `npm test`. If dogfooding finds intentional internal patterns, disable the rule in `eslint.dogfooding.config.js` instead of adding repo-specific heuristics.\n\n## Commit message format\n\nFollow these conventions:\n\n- **New rule**: `` Add `rule-name` rule ``\n- **Fix/improve existing rule**: `` `rule-name`: Short description ``\n- **General fix**: `Fix short description`\n- **Add option to rule**: `` `rule-name`: Add `optionName` option ``\n- **Drop a rule**: `` Drop `rule-name` rule ``\n\nAlways use backticks around rule names and option names in commit messages.\n\n<!-- File: CLAUDE.md (Tokens: ~3 | Category: claude-rule) -->\nAGENTS.md\n\n<!-- File: docs/rules/better-dom-traversing.md (Tokens: ~368 | Category: anthropic-skill) -->\n# better-dom-traversing\n\n📝 Prefer better DOM traversal APIs.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPrefer more readable and robust DOM traversal APIs.\n\nUse named first-child properties instead of positional access, selectors instead of positional child traversal, `.closest()` instead of repeated parent traversal, and merged `.querySelector()` calls when static selectors can be combined.\n\nThis rule is syntax-based and reports common DOM traversal patterns. Suggestions are intentionally manual because the replacement can change behavior in some cases, such as `undefined` versus `null` for empty child collections, exact-depth parent traversal versus selector-based ancestor lookup, or chained `querySelector()` calls that only search inside the first matching element.\n\n`props.children` access is ignored because it is component data, not DOM traversal.\n\n## Examples\n\n```js\n// ❌\nelement.childNodes[0];\n\n// ✅\nelement.firstChild;\n```\n\n```js\n// ❌\nelement.children[0];\n\n// ✅\nelement.firstElementChild;\n```\n\n```js\n// ❌\nelement.children[2];\n\n// ✅\nelement.querySelector(':scope selector');\n```\n\n```js\n// ❌\nelement.parentElement.parentElement;\n\n// ✅\nelement.closest('selector');\n```\n\n```js\n// ❌\nelement.querySelector('a').querySelector('b');\n\n// ✅\nelement.querySelector(':scope a b');\n```\n\n<!-- File: docs/rules/catch-error-name.md (Tokens: ~686 | Category: anthropic-skill) -->\n# catch-error-name\n\n📝 Enforce a specific parameter name in catch clauses.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent name for caught errors across:\n\n- `try/catch` clauses\n- `.catch(…)` Promise handlers\n- `.then(…, rejectionHandler)` Promise handlers\n\nUsing one recognizable name makes error handlers easier to scan and avoids renaming the same concept across callback styles.\n\nThe desired parameter name is [configurable](#name), but defaults to `error`.\n\nThe following names are ignored:\n\n- `_`, but only if the error is not used.\n- Descriptive names, for example, `fsError` or `authError`.\n- Names matching [`options.ignore`](#ignore).\n\n## Examples\n\n```js\n// ❌\ntry {} catch (badName) {}\n\n// ✅\ntry {} catch (error) {}\n```\n\n```js\n// ❌\npromise.catch(badName => {});\n\n// ✅\npromise.catch(error => {});\n```\n\n```js\n// ❌\npromise.then(undefined, badName => {});\n\n// ✅\npromise.then(undefined, error => {});\n```\n\n```js\n// ❌\ntry {} catch (_) {\n\tconsole.log(_);\n}\n\n// ✅\n// Underscore is allowed when the error is not used\ntry {} catch (_) {\n\t// error is not used\n}\n```\n\n```js\n// ✅\n// Descriptive name is allowed\ntry {} catch (fsError) {}\n```\n\n```js\n// ✅\n// `error_` is allowed because of shadowed variables\ntry {} catch (error_) {\n\tconst error = new Error('🦄');\n}\n```\n\n## Options\n\n### name\n\nType: `string`\\\nDefault: `'error'`\n\nYou can set the `name` option like this:\n\n```js\n'unicorn/catch-error-name': [\n\t'error',\n\t{\n\t\tname: 'exception',\n\t},\n]\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nThis option lets you specify a regex pattern for matches to ignore.\n\nWhen a string is given, it's interpreted as a regular expression inside a string.\n\n```js\n'unicorn/catch-error-name': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'^error\\\\d*$',\n\t\t\t/^ignore/i,\n\t\t],\n\t},\n]\n```\n\nWith `^unicorn$`, this would fail:\n\n```js\ntry {} catch (pony) {}\n```\n\nAnd this would pass:\n\n```js\ntry {} catch (unicorn) {}\n```\n\n## Tip\n\nIn order to avoid shadowing in nested catch clauses, the auto-fix rule appends underscores to the identifier name.\n\n<!-- File: docs/rules/class-reference-in-static-methods.md (Tokens: ~408 | Category: anthropic-skill) -->\n# class-reference-in-static-methods\n\n📝 Enforce consistent class references in static methods.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces either dynamic static dispatch with `this` and `super`, or direct references with class names.\n\nChoosing one style makes it clear whether a static method is intended to follow subclass dispatch or stay tied to a specific class.\n\nBy default, it prefers `this` and `super`.\n\n## Examples\n\n```js\n// ❌\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tFoo.qux();\n\t\tBar.qux();\n\t}\n}\n\n// ✅\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tthis.qux();\n\t\tsuper.qux();\n\t}\n}\n```\n\nWith `{preferThis: false, preferSuper: false}`:\n\n```js\n// ❌\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tthis.qux();\n\t\tsuper.qux();\n\t}\n}\n\n// ✅\nclass Foo extends Bar {\n\tstatic baz() {\n\t\tFoo.qux();\n\t\tBar.qux();\n\t}\n}\n```\n\n## Options\n\nType: `object`\n\n### preferThis\n\nType: `boolean`\\\nDefault: `true`\n\nPrefer `this` over the current class name in static methods.\n\n### preferSuper\n\nType: `boolean`\\\nDefault: `true`\n\nPrefer `super` over the superclass name in static methods.\n\n<!-- File: docs/rules/comma-spacing.md (Tokens: ~379 | Category: anthropic-skill) -->\n# comma-spacing\n\n📝 Enforce consistent spacing before and after commas in JSON and SOML.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces no whitespace before commas and exactly one ASCII space after commas on the same line in JSON, JSONC, and JSON5 using [`@eslint/json`](https://github.com/eslint/json), and in SOML using [`eslint-soml`](https://github.com/soml-lang/eslint-soml).\n\nPreserves line breaks and surrounding whitespace, including comma-first layouts. Ignores spacing after trailing commas directly before `]` or `}`, but still checks spacing before them.\n\nChecks spacing between commas and adjacent comments, preserving comment contents and whitespace beyond them. For example, `[1,/* comment */]` becomes `[1, /* comment */]`. Commas inside strings and comments are ignored.\n\nThis rule has no options and does not support `eslint-plugin-jsonc` languages.\n\nFor JavaScript and TypeScript, use [`@stylistic/comma-spacing`](https://eslint.style/rules/comma-spacing), which allows multiple spaces after commas.\n\n## Examples\n\n### Incorrect\n\n```json\n[1 ,2,  3]\n```\n\n```json\n{\"first\": 1,\"second\": 2}\n```\n\n### Correct\n\n```json\n[1, 2, 3]\n```\n\n```json\n{\"first\": 1, \"second\": 2}\n```\n\n```jsonc\n[1, /* Keep comment */2]\n```\n\n```json5\n[1, 2,]\n```\n\n<!-- File: docs/rules/comment-content.md (Tokens: ~729 | Category: anthropic-skill) -->\n# comment-content\n\n📝 Enforce better comment content.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces curated replacements in comments. It is useful for common name, brand, and acronym casing corrections such as `nodejs` → `Node.js`, and for project-specific prose preferences.\n\nThis rule is not a spellchecker. It only checks known replacement patterns.\n\nIt only reports one replacement per comment at a time.\n\nIt focuses on prose-like comment text and skips obvious non-prose regions such as code snippets, including commented-out multi-line code, links, paths, structured data, and command examples.\n\nText inside backticks is ignored, including fenced code blocks in block comments. Use backticks for literal commands and identifiers.\n\n```js\n// ✅\n// Run `git config --list`.\n```\n\nIn JSDoc comments, it skips structured tag syntax such as parameter names, type expressions, and symbol references, while continuing to check prose in tag descriptions.\n\n## Examples\n\n```js\n// ❌\n// nodejs uses javascript.\n\n// ✅\n// Node.js uses JavaScript.\n```\n\n```js\n// ❌\n// See the github issue.\n\n// ✅\n// See the GitHub issue.\n```\n\n```js\n// ❌\n// The application stores png files.\n\n// ✅\n// The app stores PNG files.\n```\n\n## Options\n\nType: `object`\n\n### checkUniformCase\n\nType: `boolean`\\\nDefault: `true`\n\nBy default, the rule re-cases matching tokens regardless of their case, including all-lowercase (`json`) and all-uppercase (`JSON`) ones.\n\nPass `checkUniformCase: false` to only correct tokens that already mix upper- and lower-case, such as `Github` → `GitHub`. All-lowercase and all-uppercase tokens are then left alone, as their casing is often intentional. Replacements that change the actual letters (such as `application` → `app`, or your own typo fixes) still apply regardless of case.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\tcheckUniformCase: false,\n\t},\n]\n```\n\n### replacements\n\nType: `object`\n\nYou can extend the default replacements by passing the `replacements` option.\n\nThe key is treated as a regex. By default, custom replacements are case-sensitive.\n\nDefault replacement patterns treat Unicode letters, marks, numbers, and underscores as part of a word. Custom patterns are used exactly as written.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\t'\\\\bteh\\\\b': 'the',\n\t\t\t'\\\\bto do\\\\b': {\n\t\t\t\treplacement: 'TODO',\n\t\t\t\tcaseSensitive: false,\n\t\t\t},\n\t\t\t'\\\\bnode\\\\.?js\\\\b': false,\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `extendDefaultReplacements: false` to override the default replacements completely.\n\n```js\n'unicorn/comment-content': [\n\t'error',\n\t{\n\t\textendDefaultReplacements: false,\n\t\treplacements: {\n\t\t\t'\\\\bteh\\\\b': 'the',\n\t\t},\n\t},\n]\n```\n\n<!-- File: docs/rules/consistent-arrow-return-style.md (Tokens: ~359 | Category: anthropic-skill) -->\n# consistent-arrow-return-style\n\n📝 Enforce a consistent return style for multiline arrow function bodies.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUse concise bodies when the expression fits on one line and an explicit `return` when it spans multiple lines. A line break between `=>` and a single-line expression is ignored.\n\nOnly blocks with a single `return` and a single-line argument are converted. Blocks with other statements, bare returns, or multiline return expressions are ignored.\n\nFixes are omitted when reindenting could change string, template literal, or JSX text, or when removing the block could change how the following token is parsed.\n\nThis rule is an alternative to [`arrow-body-style`](https://eslint.org/docs/latest/rules/arrow-body-style). Do not enable both rules together.\n\n## Examples\n\n```js\n// ❌\nconst getValue = () => getValueFromServer(\n\turl,\n\toptions,\n);\n\n// ✅\nconst getValue = () => {\n\treturn getValueFromServer(\n\t\turl,\n\t\toptions,\n\t);\n};\n\n// ❌\nconst getValue = () => {\n\treturn value;\n};\n\n// ✅\nconst getValue = () => value;\n\n// ❌\nconst getObject = () => ({\n\tvalue,\n});\n\n// ✅\nconst getObject = () => {\n\treturn {\n\t\tvalue,\n\t};\n};\n\n// ❌ No fix: contains a comment.\nconst getValue = () => /* Keep this comment. */\n\tgetValueFromServer(\n\t\turl,\n\t\toptions,\n\t);\n```\n\n<!-- File: docs/rules/consistent-assert.md (Tokens: ~383 | Category: anthropic-skill) -->\n# consistent-assert\n\n📝 Enforce consistent assertion style with `node:assert`.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nPrefer `assert.ok()` over `assert()` for its explicit intent and better readability. It aligns with other assert methods, ensuring consistency and making code easier to maintain and understand.\n\n## Examples\n\n```js\nimport assert from 'node:assert/strict';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n\n```js\nimport assert from 'node:assert';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n\n```js\nimport {strict as assert} from 'node:assert';\n\nassert.strictEqual(actual, expected);\nassert.deepStrictEqual(actual, expected);\n\n// ❌\nassert(divide(10, 2) === 5);\n\n// ✅\nassert.ok(divide(10, 2) === 5);\n```\n\n<!-- File: docs/rules/consistent-boolean-name.md (Tokens: ~2351 | Category: anthropic-skill) -->\n# consistent-boolean-name\n\n📝 Enforce consistent naming for boolean names.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nBy default, this rule checks boolean variables, parameters, and functions. Object, class, and TypeScript property and method names are ignored unless enabled with their respective options.\n\nEach `check*` option accepts one of these modes:\n\n- `always`: require prefixes for booleans and reject misleading prefixes on non-booleans.\n- `prohibit`: only reject misleading prefixes on non-booleans.\n- `never`: skip the occurrence entirely.\n\nBoolean names should start with a prefix that makes the boolean meaning clear.\n\nNames that start with a boolean prefix should also refer to booleans or boolean-returning functions. Unknown values are ignored.\n\nFunctions and callable type annotations returning `boolean`, `Promise<boolean>`, `PromiseLike<boolean>`, or unions of these are considered boolean-returning, whether or not the function is `async`.\n\nGetters returning promises are treated as non-boolean values.\n\nWhen type information is unavailable, a type annotation is needed to require prefixes for promise-returning functions.\n\nConfigured wrapper bindings may use boolean prefixes when a configured property or method provides a boolean-like value. This applies only to variables and parameters that are not reassigned.\n\nReports for property and method names, and reports for non-boolean values using boolean prefixes, do not provide rename suggestions.\n\nThe default prefixes are:\n\n- `is`\n- `are`\n- `has`\n- `have`\n- `can`\n- `should`\n- `was`\n- `were`\n- `does`\n- `did`\n- `will`\n- `requires`\n\nThe `do` prefix is excluded because it also starts action names like `doWork()`, which would then be reserved for boolean-like values. Use `doesChecksPass` instead of `doChecksPass`, or `didChecksPass` for a past result; identifiers need not follow English grammar. To allow `do`, set `prefixes: {do: true}`.\n\nThe plural prefixes (`are`, `have`, `were`) allow names for boolean collections, like `areFilesValid`.\n\nThe prefix must be a distinct word part. `isReady`, `is_ready`, and `IS_READY` are allowed, but `island` is not considered to have the `is` prefix.\n\nReact hook function bindings are checked after the required `use` prefix. For example, `useIsReady` is treated as a boolean hook name, while `useReady` is not. `ignore` patterns still match the original source name, like `useReady`.\n\nReact refs initialized with a boolean-like value may use boolean prefixes when the binding name ends in `Ref` or `Reference`, such as `isMountedRef`, `hasConsentRef`, or `hasConsentReference`. The suffix identifies the binding as a ref object. The binding must not be reassigned after initialization.\n\nDirect Vue `ref()` calls with boolean-like values and `computed()` calls with synchronous getters returning booleans may use boolean prefixes, such as `isBranch` or `hasDepartment`. The binding must not be reassigned after initialization. For refs returned by other calls, such as composables returning `ShallowRef<boolean>`, use type-aware [`wrappers`](#wrappers) with `{Ref: 'value'}`, which also covers `ComputedRef`.\n\nThis rule intentionally does not check destructuring bindings, imports, class names, or catch parameters.\n\nTypeScript type annotation checks resolve local type aliases and callable interfaces, including generic type parameters, but not qualified or namespaced type references.\n\nJSDoc `@type`, `@param`, and `@returns` annotations are supported without TypeScript configuration. Rename suggestions update matching `@param` names. Inference is best effort; advanced types, typedefs, and imports are not resolved.\n\nWithout TypeScript type information, nested generic alias resolution is best effort. Some finite nested instantiations may be treated as unknown.\n\nThis rule is only automatically fixable when a non-global, non-exported, non-ambient variable binding can be safely renamed to the first enabled prefix without adding a collision suffix. Other safe rename candidates are still provided as editor suggestions.\n\n## Examples\n\n```js\n// ❌\nconst completed = true;\n\n// ✅\nconst isCompleted = true;\n```\n\n```js\n// ❌\nconst hasName = 'Sindre';\n\n// ✅\nconst name = 'Sindre';\n```\n\n```js\n// ❌\nfunction hasTitle() {\n\treturn 'Unicorn';\n}\n\n// ✅\nfunction getTitle() {\n\treturn 'Unicorn';\n}\n```\n\n```js\n// ❌\nconst completed = progress === 100;\n\n// ✅\nconst hasCompleted = progress === 100;\n```\n\n```js\n// ❌\nconst completed = Boolean(value);\n\n// ✅\nconst isCompleted = Boolean(value);\n```\n\n```js\n// ❌\nfunction download(showProgress = false) {}\n\n// ✅\nfunction download(shouldShowProgress = false) {}\n```\n\n```js\n// ❌\n/** @param {boolean} showProgress */\nfunction download(showProgress) {}\n\n// ✅\n/** @param {boolean} shouldShowProgress */\nfunction download(shouldShowProgress) {}\n```\n\n```ts\n// ❌\nconst completed: boolean = true;\n\n// ✅\nconst isCompleted: boolean = true;\n```\n\n```js\n// ❌\nfunction completed() {\n\treturn true;\n}\n\n// ✅\nfunction isCompleted() {\n\treturn true;\n}\n```\n\n```ts\n// ❌\nfunction download(showProgress: boolean) {}\n\n// ✅\nfunction download(shouldShowProgress: boolean) {}\n```\n\n```js\n// ✅\n// Object fields are ignored unless `checkFields` is set to a mode other than `never`.\n// Methods and getters use `checkMethods`. Setter names are ignored because setters do not return values.\nconst task = {\n\tcompleted: progress === 100,\n};\n```\n\n## Options\n\n### checkVariables\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check variable names.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tcheckVariables: 'prohibit',\n\t},\n]\n```\n\nWith `checkVariables: 'prohibit'`, this would fail:\n\n```js\nconst hasName = 'Sindre';\n```\n\nAnd these would pass:\n\n```js\nconst completed = true;\nconst isCompleted = true;\n```\n\n### checkArguments\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check parameter names, including TypeScript constructor parameter properties. Setter parameters are ignored because their names are positional. For example, `checkArguments: 'never'` allows both forms:\n\n```js\nfunction download(showProgress = false) {}\nfunction download(shouldShowProgress = false) {}\n```\n\n### checkFunctions\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'always'`\n\nHow to check function names.\n\n### checkMethods\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'never'`\n\nHow to check object and class methods, getters, and TypeScript method signatures. Setter names are ignored because setters do not return values.\n\n### checkFields\n\nType: `'always' | 'prohibit' | 'never'`\\\nDefault: `'never'`\n\nHow to check object properties, class fields, TypeScript property signatures, and TypeScript constructor parameter properties. Constructor parameter properties are checked as both arguments and fields.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tcheckMethods: 'always',\n\t\tcheckFields: 'never',\n\t},\n]\n```\n\nWith the above config, this would fail:\n\n```js\nclass Task {\n\thasTitle() {\n\t\treturn 'Unicorn';\n\t}\n}\n```\n\nAnd this would pass:\n\n```js\nclass Task {\n\tcompleted = true;\n\tisCompleted() {\n\t\treturn true;\n\t}\n}\n```\n\n### prefixes\n\nType: `Record<string, boolean>`\\\nDefault:\n\n```js\n{\n\tis: true,\n\tare: true,\n\thas: true,\n\thave: true,\n\tcan: true,\n\tshould: true,\n\twas: true,\n\twere: true,\n\tdoes: true,\n\tdid: true,\n\twill: true,\n\trequires: true,\n}\n```\n\nThe `prefixes` option is merged with the defaults. Set a prefix to `true` to allow it for boolean names and reserve it for boolean-like values. Set a prefix to `false` to disable it in both directions.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tprefixes: {\n\t\t\tneeds: true,\n\t\t\tdid: false,\n\t\t},\n\t},\n]\n```\n\nWith the above config, this would pass:\n\n```js\nconst needsUpdate = true;\n```\n\nAnd this would fail:\n\n```js\nconst didUpdate = true;\n```\n\n### wrappers\n\nType: `Record<string, string>`\\\nDefault: `{}`\n\nMap unqualified TypeScript wrapper type names to the property or method that provides a boolean-like value. Same-named types share configuration. Derived types, intersections, and constrained type parameters are supported. Members may provide `boolean`, `Promise<boolean>`, or `PromiseLike<boolean>`; nullable results are accepted. Requires TypeScript type information.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\twrappers: {\n\t\t\tStorageItem: 'get',\n\t\t},\n\t},\n]\n```\n\nWith the above configuration, this would pass:\n\n```ts\ninterface StorageItem<Base, Return = Base | undefined> {\n\tget(): Promise<Return>;\n}\n\ndeclare const isUnicorn: StorageItem<unknown, boolean>;\n```\n\nBut this would still fail because `get()` returns a string:\n\n```ts\ninterface StorageItem<Base, Return = Base | undefined> {\n\tget(): Promise<Return>;\n}\n\ndeclare const isUnicorn: StorageItem<unknown, string>;\n```\n\n### ignore\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nNames matching any of these patterns are not checked. Strings are treated as regular expressions, so they match anywhere in the name unless anchored with `^` and `$`.\n\n```js\n'unicorn/consistent-boolean-name': [\n\t'error',\n\t{\n\t\tignore: [\n\t\t\t'value',\n\t\t\t'^completed$',\n\t\t],\n\t},\n]\n```\n\nWith the above config, these would pass:\n\n```js\nconst value = true;\nconst completed = true;\n```\n\n<!-- File: docs/rules/consistent-class-member-order.md (Tokens: ~578 | Category: anthropic-skill) -->\n# consistent-class-member-order\n\n📝 Enforce consistent class member order.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n\nA predictable member order makes classes faster to scan and keeps related static, instance, field, and method members together.\n\nThis rule enforces the following class member order:\n\n1. Static fields\n2. Static blocks\n3. Static methods\n4. Private instance fields\n5. Public instance fields\n6. Constructors\n7. Private instance methods\n8. Public instance methods\n\nStatic members are grouped by `static` before privacy, so `static #foo` belongs with other static fields or methods.\n\nTypeScript `protected` members follow the same order as public members.\n\nThis rule does not autofix because fields and static blocks run in declaration order, and method order is observable through property reflection.\n\nIt may offer a manual suggestion for simple class bodies without comments, decorators, computed keys, or unsupported members. The suggestion is not offered when it would move a static field across a static block. It can still move instance fields past each other, which changes the order their initializers run in, so check fields whose initializers have side effects or read other fields.\n\nThis rule is intentionally simple. It only enforces group order and will not add options for sorting within groups, newline handling, or more detailed member categories. Use a dedicated sorting rule if you need that.\n\n## Options\n\nType: `object`\n\n### order\n\nType: `string[]`\n\nDefault:\n\n```js\n[\n\t'static-field',\n\t'static-block',\n\t'static-method',\n\t'private-field',\n\t'public-field',\n\t'constructor',\n\t'private-method',\n\t'public-method',\n]\n```\n\nThe array must contain each group exactly once.\n\n## Examples\n\n```js\n// ❌\nclass Foo {\n\tconstructor() {}\n\t#privateField = 1;\n\tpublicField = 1;\n}\n```\n\n```js\n// ✅\nclass Foo {\n\tstatic staticField = 1;\n\t#privateField = 1;\n\tpublicField = 1;\n\n\tconstructor() {}\n}\n```\n\n```js\n// ❌\nclass Foo {\n\tpublicMethod() {}\n\t#privateMethod() {}\n}\n```\n\n```js\n// ✅\nclass Foo {\n\tstatic staticMethod() {}\n\t#privateMethod() {}\n\tpublicMethod() {}\n}\n```\n\n<!-- File: docs/rules/consistent-compound-words.md (Tokens: ~1017 | Category: anthropic-skill) -->\n# consistent-compound-words\n\n📝 Enforce consistent spelling of compound words in identifiers.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🌐 `recommended-html`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nCompound words should be treated as one word when applying identifier casing conventions.\n\nTreating the same compound word consistently prevents equivalent concepts from being cased differently across identifiers.\n\nThis rule uses a conservative curated list of common compound-word mistakes in code identifiers. It is not a spellchecker or a prose style rule.\n\n## Examples\n\n```js\n// ❌\nconst passWord = 'secret';\n\n// ✅\nconst password = 'secret';\n```\n\n```js\n// ❌\nconst isInViewPort = true;\n\n// ✅\nconst isInViewport = true;\n```\n\n```js\n// ❌\nfunction unSubscribe() {}\n\n// ✅\nfunction unsubscribe() {}\n```\n\n## Intentionally not checked\n\nIn JavaScript, this rule does not check string keys, computed properties, property reads, JSX attributes, or export aliases. These are often external API surfaces where preserving the exact spelling is more important than normalizing identifier style.\n\nIt also intentionally excludes ambiguous or common API spellings such as `fileName`, `setUp`, `lookUp`, and `newLine`. These can be natural identifiers when the words keep separate meaning, for example a newly created line instead of the newline character.\n\n## Data keys, CSS, and HTML\n\nWith `checkProperties: true`, the rule checks JSON object keys, YAML string keys, TOML key segments (including table names), and SOML keys. It skips YAML non-string, tagged, anchored, and alias keys, plus string values.\n\nWith `checkVariables` (enabled by default), it checks CSS class and ID selectors, custom properties, keyframes, animation names, layers, containers, and custom media, plus HTML `id` and individual `class` names. Built-in CSS property names and value keywords, and `animation` shorthand values are skipped. CSS escapes and HTML character references are decoded; templated HTML values are skipped.\n\nFor example, `backGround`, `back-ground`, and `back_ground` are flagged in favor of `background`. Allow-list entries match the full decoded name, including `--`. Data and CSS/HTML diagnostics have no fixes or suggestions because names may be referenced elsewhere.\n\n## Options\n\nType: `object`\n\n### replacements\n\nType: `object`\n\nYou can extend default replacements by passing the `replacements` option.\n\n```js\n'unicorn/consistent-compound-words': [\n\t'error',\n\t{\n\t\treplacements: {\n\t\t\tfooBar: 'foobar',\n\t\t\tpassWord: false,\n\t\t},\n\t},\n]\n```\n\n### extendDefaultReplacements\n\nType: `boolean`\\\nDefault: `true`\n\nPass `extendDefaultReplacements: false` to override the default `replacements` completely.\n\n### allowList\n\nType: `object`\n\nUse `allowList` to skip full identifier names case-sensitively. Values must be `true`.\n\n```js\n'unicorn/consistent-compound-words': [\n\t'error',\n\t{\n\t\tallowList: {\n\t\t\tlegacyUserName: true,\n\t\t},\n\t},\n]\n```\n\n### checkVariables\n\nType: `boolean`\\\nDefault: `true`\n\nPass `checkVariables: false` to disable checking variable names.\n\n### checkProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `checkProperties: true` to check property definitions and property writes.\n\n### checkDefaultAndNamespaceImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in default or namespace imports, but only for internal modules.\n- `true` - Check variables declared in default or namespace imports.\n- `false` - Don't check variables declared in default or namespace imports.\n\n### checkShorthandImports\n\nType: `'internal' | boolean`\\\nDefault: `'internal'`\n\n- `'internal'` - Check variables declared in shorthand imports, but only for internal modules.\n- `true` - Check variables declared in shorthand imports.\n- `false` - Don't check variables declared in shorthand imports.\n\n### checkShorthandProperties\n\nType: `boolean`\\\nDefault: `false`\n\nPass `checkShorthandProperties: true` to check variables declared as shorthand properties in object patterns.\n\n<!-- File: docs/rules/consistent-conditional-object-spread.md (Tokens: ~569 | Category: anthropic-skill) -->\n# consistent-conditional-object-spread\n\n📝 Enforce consistent conditional object spread style.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen conditionally spreading properties into an object literal, pick one style consistently.\n\nBy default, this rule prefers `&&` because it avoids an unnecessary empty object branch.\n\n## Examples\n\n```js\n// ❌\nconst object = {...(condition ? {property} : {})};\n\n// ✅\nconst object = {...(condition && {property})};\n```\n\nAn `undefined` or `null` fallback branch spreads nothing, so it is treated the same as an empty object:\n\n```js\n// ❌\nconst object = {...(condition ? {property} : undefined)};\n\n// ✅\nconst object = {...(condition && {property})};\n```\n\nWith the default `'logical'` style, a boolean cast of the condition is also reported, because every falsy value spreads nothing:\n\n```js\n// ❌\nconst object = {...(!!condition && {property})};\n\n// ❌\nconst object = {...(Boolean(condition) && {property})};\n\n// ✅\nconst object = {...(condition && {property})};\n\n// ❌\nconst object = {...(!!first && !!second && {property})};\n\n// ✅\nconst object = {...(first && second && {property})};\n```\n\n> [!NOTE]\n> In TypeScript, a condition of type `unknown` needs the boolean cast, because TypeScript does not allow spreading `unknown`. Use an `// eslint-disable-next-line` comment in that case.\n\nWith the `'ternary'` option:\n\n```js\n// eslint unicorn/consistent-conditional-object-spread: [\"error\", \"ternary\"]\n\n// ❌\nconst object = {...(condition && {property})};\n\n// ✅\nconst object = {...(condition ? {property} : {})};\n```\n\n## Options\n\nType: `string`\\\nDefault: `'logical'`\n\nAvailable options:\n\n- `'logical'` - Prefer `...(condition && object)`, without a boolean cast of `condition`.\n- `'ternary'` - Prefer `...(condition ? object : {})`.\n\n<!-- File: docs/rules/consistent-date-clone.md (Tokens: ~299 | Category: anthropic-skill) -->\n# consistent-date-clone\n\n📝 Prefer passing `Date` directly to the constructor when cloning.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThe [`Date` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date) can clone a `Date` object directly when passed as an argument. This is simpler and more efficient than extracting the timestamp with `.getTime()`.\n\n> Note: This approach requires ES2015 (ES6) or later. In older environments, `new Date(date)` converts to a string first, but modern JavaScript handles this correctly.\n\n## Examples\n\n```js\n// ❌\nnew Date(date.getTime());\n\n// ✅\nnew Date(date);\n```\n\n```js\n// ❌\nconst cloned = new Date(originalDate.getTime());\n\n// ✅\nconst cloned = new Date(originalDate);\n```\n\n```js\n// ✅\n// When you need just the timestamp value\nconst timestamp = date.getTime();\n```\n\n<!-- File: docs/rules/consistent-destructuring.md (Tokens: ~464 | Category: anthropic-skill) -->\n# consistent-destructuring\n\n📝 Use destructured variables over properties.\n\n🚫 Disabled by default.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces the use of already destructured variables over accessing the same direct, non-computed identifier property again. Previous destructurings are easily missed which leads to an inconsistent code style.\n\nThis rule is partly fixable. It does not suggest adding new properties to existing destructuring patterns, as that could read properties earlier than before.\n\nThere is no option to ignore specific sources or properties. Properties without a corresponding destructured variable are ignored by design.\n\n## Examples\n\n```js\n// ❌\nconst {a} = foo;\nconsole.log(foo.a);\n\n// ✅\nconst {a} = foo;\nconsole.log(a);\n\n// ✅\nconsole.log(foo.a, foo.b);\n```\n\n```js\n// ✅\nconst {a} = foo;\nconsole.log(a, foo.b);\n```\n\n```js\n// ✅\nconst {\n\ta: {b},\n} = foo;\nconsole.log(foo.a.c);\n```\n\n```js\n// ❌\nconst {bar} = foo;\nconst {a} = foo.bar;\n\n// ✅\nconst {bar} = foo;\nconst {a} = bar;\n```\n\n```js\n// ✅\nconst {a} = foo;\nconsole.log(a, foo.b());\n```\n\n```js\n// ✅\nconst {a} = foo.bar;\nconsole.log(foo.bar.a);\n```\n\nA destructured value is a snapshot. A direct call such as `update(foo)` or `foo.update()` between the destructuring and the property access could have changed the object, so that access is not reported. This is best-effort: a call in a nested function, a method call on `this`, and a call later in a loop body (which runs again before the next access) are not taken into account.\n\n```js\n// ✅\nconst {a} = foo;\nupdate(foo);\nconsole.log(foo.a);\n```\n\n<!-- File: docs/rules/consistent-empty-array-spread.md (Tokens: ~286 | Category: anthropic-skill) -->\n# consistent-empty-array-spread\n\n📝 Prefer consistent types when spreading a ternary in an array literal.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen spreading a ternary in an array, we can use both `[]` and `''` as fallbacks, but it's better to have consistent types in both branches.\n\n## Examples\n\n```js\n// ❌\nconst array = [\n\ta,\n\t...(foo ? [b, c] : ''),\n];\n\n// ❌\nconst array = [\n\ta,\n\t...(foo ? 'bc' : []),\n];\n\n// ✅\nconst array = [\n\ta,\n\t...(foo ? [b, c] : []),\n];\n\n// ✅\nconst array = [\n\ta,\n\t...(foo ? 'bc' : ''),\n];\n```\n\n<!-- File: docs/rules/consistent-existence-index-check.md (Tokens: ~503 | Category: anthropic-skill) -->\n# consistent-existence-index-check\n\n📝 Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.\n\nPrefer using `index === -1` to check if an element does not exist and `index !== -1` to check if an element does exist.\n\nThe value `-1` is the sentinel returned by these methods when no match is found, so comparing it directly with `===` or `!==` makes the check read as a not-found sentinel check instead of a numeric range check.\n\nSimilar to the [`explicit-length-check`](explicit-length-check.md) rule.\n\n## Examples\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index >= 0) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = foo.indexOf('bar');\n\n// ❌\nif (index > -1) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = foo.lastIndexOf('bar');\n\n// ❌\nif (index >= 0) {}\n\n// ✅\nif (index !== -1) {}\n```\n\n```js\nconst index = array.findIndex(element => element > 10);\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n\n```js\nconst index = array.findLastIndex(element => element > 10);\n\n// ❌\nif (index < 0) {}\n\n// ✅\nif (index === -1) {}\n```\n\n<!-- File: docs/rules/consistent-export-decorator-position.md (Tokens: ~394 | Category: anthropic-skill) -->\n# consistent-export-decorator-position\n\n📝 Enforce consistent decorator position on exported classes.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nDecorators can be placed before or after `export` and `export default` on class declarations. Pick one style for consistency.\n\nThis rule requires a parser that supports decorators, such as `@typescript-eslint/parser`.\n\n## Examples\n\n```js\n// eslint unicorn/consistent-export-decorator-position: error\n\n// ❌\nexport default @decorator class Foo {}\n\n// ❌\n@decorator export default class Foo {}\n\n// ✅\n@decorator\nexport default class Foo {}\n```\n\n### `before`\n\n```js\n// eslint unicorn/consistent-export-decorator-position: [\"error\", \"before\"]\n\n// ❌\n@decorator\nexport default class Foo {}\n\n// ✅\n@decorator export default class Foo {}\n```\n\n### `after`\n\n```js\n// eslint unicorn/consistent-export-decorator-position: [\"error\", \"after\"]\n\n// ❌\n@decorator\nexport default class Foo {}\n\n// ✅\nexport default @decorator class Foo {}\n```\n\n## Options\n\nType: `string`\\\nDefault: `'above'`\n\nAvailable options:\n\n- `'above'` - Require decorators on the line above the export.\n- `'before'` - Require decorators before `export` on the same line.\n- `'after'` - Require decorators after `export` or `export default`.\n\n<!-- File: docs/rules/consistent-function-scoping.md (Tokens: ~876 | Category: anthropic-skill) -->\n# consistent-function-scoping\n\n📝 Move function definitions to the highest possible scope.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nA function definition should be placed as close to the top-level scope as possible without breaking its captured values. This improves readability, [directly improves performance](https://stackoverflow.com/a/81329/207247) and allows JavaScript engines to [better optimize performance](https://ponyfoo.com/articles/javascript-performance-pitfalls-v8#optimization-limit).\n\n## Examples\n\n```js\n// ❌\nexport function doFoo(foo) {\n\t// Does not capture anything from the scope, can be moved to the outer scope\n\tfunction doBar(bar) {\n\t\treturn bar === 'bar';\n\t}\n\n\treturn doBar;\n}\n```\n\n```js\n// ✅\nfunction doBar(bar) {\n\treturn bar === 'bar';\n}\n\nexport function doFoo(foo) {\n\treturn doBar;\n}\n```\n\n```js\n// ❌\nfunction doFoo() {\n\t// Does not capture anything from the scope, can be moved to the outer scope\n\treturn bar => bar === 'bar';\n}\n```\n\n```js\n// ✅\nconst doBar = bar => bar === 'bar';\n\nfunction doFoo() {\n\treturn doBar;\n}\n```\n\n```js\n// Arrow functions in return statements are also flagged\n// ❌\nexport function someAction() {\n\treturn dispatch => dispatch({type: 'SOME_TYPE'});\n}\n```\n\n```js\n// Arrow functions in return statements are also flagged\n// ✅\nconst handleDispatch = dispatch => dispatch({type: 'SOME_TYPE'});\n\nexport function someAction() {\n\treturn handleDispatch;\n}\n```\n\n```js\n// ❌\nfunction doFoo(foo) {\n\tconst doBar = bar => {\n\t\treturn bar === 'bar';\n\t};\n}\n```\n\n```js\n// ✅\nconst doBar = bar => {\n\treturn bar === 'bar';\n};\n\nfunction doFoo(foo) {}\n```\n\n```js\n// ✅\nexport function doFoo(foo) {\n\tfunction doBar(bar) {\n\t\treturn bar === 'bar' && foo.doBar(bar);\n\t}\n\n\treturn doBar;\n}\n\nconst doBar = bar => bar === 'bar';\n\nexport function doFoo() {\n\treturn doBar;\n}\n```\n\n## Options\n\n### checkArrowFunctions\n\nType: `boolean`\\\nDefault: `true`\n\nPass `\"checkArrowFunctions\": false` to disable linting of arrow functions.\n\n## Limitations\n\nThis rule does not detect or remove extraneous code blocks inside of functions:\n\n```js\nfunction doFoo(foo) {\n\t{\n\t\tfunction doBar(bar) {\n\t\t\treturn bar;\n\t\t}\n\t}\n\n\treturn foo;\n}\n```\n\n[Immediately invoked function expressions (IIFE)](https://en.wikipedia.org/wiki/Immediately_invoked_function_expression) are ignored:\n\n```js\n(function () {\n\tfunction doFoo(bar) {\n\t\treturn bar;\n\t}\n})();\n```\n\n[Built-in Hooks in React](https://reactjs.org/docs/hooks-reference.html) are ignored:\n\n```js\nuseEffect(() => {\n\tasync function getItems() {}\n\n\tgetItems();\n}, [])\n```\n\nFunctions inside `jest.mock()` factories are ignored because Jest restricts those factories from referencing out-of-scope variables:\n\n```js\njest.mock('module', () => {\n\tfunction createMock() {\n\t\treturn 'mock';\n\t}\n\n\treturn createMock;\n});\n```\n\nFunctions inside Vitest's `vi.mock()` and `vi.hoisted()` factories are also ignored because those factories run before the module's top-level code:\n\n```js\nconst mocks = vi.hoisted(() => {\n\tconst createMock = () => 'mock';\n\treturn {createMock};\n});\n\nvi.mock('module', () => {\n\tconst createMock = () => 'mock';\n\treturn {createMock};\n});\n```\n\n<!-- File: docs/rules/consistent-function-style.md (Tokens: ~1026 | Category: anthropic-skill) -->\n# consistent-function-style\n\n📝 Enforce function syntax by role.\n\n🚫 Disabled by default.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce function syntax by role.\n\nChoosing syntax by function role keeps declarations consistent and makes callbacks, methods, and standalone functions easier to distinguish.\n\nBy default, this rule reports nothing. Configure the roles you want to enforce.\n\nThis rule does not autofix. Function declarations, function expressions, arrow functions, and object methods are not always semantic equivalents, so `--fix` would be too risky for a style rule.\n\nThe rule offers editor suggestions only for simple callback conversions between anonymous function expressions and arrow functions. Suggestions are skipped when the callback contains comments, `this`, `arguments`, `super`, `new.target`, direct `eval()`, generators, named function expressions, or TypeScript type parameters.\n\n## Examples\n\n```js\n// eslint unicorn/consistent-function-style: ['error', {namedFunctions: 'declaration'}]\n\n// ❌\nconst parse = value => value;\n\n// ✅\nfunction parse(value) {\n\treturn value;\n}\n```\n\n```js\n// ✅ Reassigned variables are ignored by default.\nlet transform = value => value;\n\nif (debug) {\n\ttransform = wrap(transform);\n}\n```\n\n```js\n// ✅ Callbacks are ignored by default.\nitems.map(item => item.id);\n```\n\n```js\n// eslint unicorn/consistent-function-style: ['error', {namedFunctions: 'arrow-function'}]\n\n// ❌\nfunction parse(value) {\n\treturn JSON.parse(value);\n}\n\n// ✅\nconst parse = value => JSON.parse(value);\nexport default parse;\n```\n\n## Options\n\nType: `object`\n\nDefault:\n\n```js\n{\n\tdefault: 'ignore',\n\tnamedFunctions: 'ignore',\n\tnamedExports: 'ignore',\n\tcallbacks: 'ignore',\n\tobjectProperties: 'ignore',\n\treassignedVariables: 'ignore',\n\ttypedVariables: 'ignore',\n}\n```\n\nEach option chooses the expected style for a role.\n\nWhen multiple roles apply, the most specific role wins. Roles are checked in this order:\n\n```js\ndefaultExport\ntypedVariables\nreassignedVariables\nnamedExports\ncallbacks\nobjectProperties\nnamedFunctions\ndefault\n```\n\n### `default`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nFallback style for functions that do not match a more specific role.\n\n### `defaultExport`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for functions written directly inside `export default`. When omitted, named default-exported function declarations use the `namedFunctions` option, other named function expressions use the `default` option, and anonymous default exports are ignored. Explicitly setting `'ignore'` also suppresses syntax reports for direct default-exported functions. Exported identifiers such as `export default parse` are not followed.\n\n### `namedFunctions`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for function declarations and named variable functions.\n\n### `namedExports`\n\nAllowed values: `'declaration'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for inline named function exports, such as `export function foo() {}` and `export const foo = () => {}`. Export specifier lists like `export {foo}` are ignored.\n\n### `callbacks`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for inline functions passed as call or constructor arguments.\n\n### `objectProperties`\n\nAllowed values: `'method'`, `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for object literal function properties.\n\n### `reassignedVariables`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for variable functions whose binding is reassigned after initialization.\n\n### `typedVariables`\n\nAllowed values: `'function-expression'`, `'arrow-function'`, `'ignore'`\n\nStyle for TypeScript variable functions with an explicit type annotation.\n\n## Limitations\n\nThe rule ignores anonymous default exports when `defaultExport` is omitted or set to `'ignore'`, export specifier lists, IIFEs, accessors, class methods, class fields, destructuring and parameter defaults, TypeScript overload declarations, and generators when the expected style is `'arrow-function'`. When `defaultExport` is configured to a non-`ignore` style, anonymous default-exported functions are checked for syntax but are still handled separately by [`no-anonymous-default-export`](./no-anonymous-default-export.md) for naming. When both rules are enabled, an anonymous default can therefore produce two reports: one for its syntax and one for its missing name. Most reports do not have suggestions, because the safe rewrite surface is intentionally narrow.\n\n<!-- File: docs/rules/consistent-json-file-read.md (Tokens: ~452 | Category: anthropic-skill) -->\n# consistent-json-file-read\n\n📝 Enforce consistent JSON file reads before `JSON.parse()`.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen reading and parsing a JSON file, consistently read it using the configured style. By default, the rule prefers reading it as a string.\n\nThe default keeps the code compatible with TypeScript, where [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) accepts a string.\n\nThe rule only checks and fixes direct no-option reads and option objects where `encoding` is the only property. Reads with additional options are left unchanged to avoid dropping options.\n\n## Examples\n\n```js\n// ❌\nconst packageJson = JSON.parse(await fs.readFile('./package.json'));\n\n// ❌\nconst promise = fs.readFile('./package.json');\nconst packageJson = JSON.parse(await promise);\n\n// ✅\nconst packageJson = JSON.parse(await fs.readFile('./package.json', 'utf8'));\n```\n\n```js\n// ✅\nconst promise = fs.readFile('./package.json', {encoding: 'utf8', signal});\nconst packageJson = JSON.parse(await promise);\n```\n\n## Options\n\nType: `'string' | 'buffer'`\n\nDefault: `'string'`\n\n### `buffer`\n\nPrefer reading JSON files as buffers.\n\n```js\n// eslint unicorn/consistent-json-file-read: [\"error\", \"buffer\"]\n\n// ❌\nconst packageJson = JSON.parse(await fs.readFile('./package.json', 'utf8'));\n\n// ✅\nconst packageJson = JSON.parse(await fs.readFile('./package.json'));\n```\n\n<!-- File: docs/rules/consistent-optional-chaining.md (Tokens: ~302 | Category: anthropic-skill) -->\n# consistent-optional-chaining\n\n📝 Enforce consistent optional chaining for same-base member access.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n\nEnforce consistent optional chaining for same-base member access in logical expressions.\n\nUsing optional chaining consistently for the same base makes nullish behavior easier to see and avoids visually similar expressions that handle missing values differently.\n\nThis rule intentionally handles only direct member access on both sides of `&&` or `||`. It does not rewrite broad truthiness checks like `foo && foo.bar` to `foo?.bar`, because that can change runtime values.\n\n## Examples\n\n```js\n// ❌\nfoo?.bar || foo.baz;\n\n// ✅\nfoo?.bar || foo?.baz;\n```\n\n```js\n// ❌\nfoo.bar || foo?.baz;\n\n// ✅\nfoo.bar || foo.baz;\n```\n\n```js\n// ❌\nfoo?.bar && foo?.baz;\n\n// ✅\nfoo?.bar && foo.baz;\n```\n\n```js\n// ❌\nfoo.bar && foo?.baz;\n\n// ✅\nfoo.bar && foo.baz;\n```\n\n<!-- File: docs/rules/consistent-template-literal-escape.md (Tokens: ~431 | Category: anthropic-skill) -->\n# consistent-template-literal-escape\n\n📝 Enforce consistent style for escaping `${` in template literals.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nWhen you need to include a literal `${` in a template literal (without it being interpreted as the start of an interpolation), there are multiple ways to escape it. This rule enforces using `\\${` (escaping the dollar sign) for consistency, as it's the most intuitive and clearest approach.\n\n## Escaping methods\n\n- `\\${` — escape the dollar sign ✅ (recommended)\n- `$\\{` — escape the opening brace (works, but inconsistent)\n- `\\$\\{` — escape both (redundant)\n\n## Examples\n\n```js\n// ❌ - Escaping the brace is inconsistent\nconst template = `$\\{variableName}`;\n\n// ❌ - Escaping both is redundant\nconst template = `\\$\\{variableName}`;\n\n// ✅ - Escape the dollar sign\nconst template = `\\${variableName}`;\n```\n\n```js\n// ✅ - Common use case: template strings for users\nconst message = `Use \\${variable} in your code`;\n\n// ✅ - JavaScript regex pattern\nconst regex = `/\\${pattern}/g`;\n```\n\n```js\n// ✅ - Normal variable interpolation still works\nconst name = 'Alice';\nconst greeting = `Hello ${name}, use \\${variable} for templates`;\n// → \"Hello Alice, use ${variable} for templates\"\n```\n\n<!-- File: docs/rules/consistent-tuple-labels.md (Tokens: ~376 | Category: anthropic-skill) -->\n# consistent-tuple-labels\n\n📝 Enforce consistent labels on tuple type elements.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\n[Labeled tuple elements](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#labeled-tuple-elements) document what each position in a tuple means. Labeling only some of the elements is inconsistent: the unlabeled positions read as an oversight, and the tuple is harder to scan than one that is either fully labeled or fully unlabeled.\n\nThis rule requires that, when at least one element of a tuple type is labeled, every element is labeled. A tuple with no labels at all is left alone.\n\nA rest element counts as labeled when its label is present (`...rest: number[]`), so a fully labeled tuple that ends with a labeled rest element is not reported.\n\nThere is no autofix, since a meaningful label cannot be inferred.\n\n## Examples\n\n```ts\n// ❌\ntype Point = [x: number, number];\n\n// ✅\ntype Point = [x: number, y: number];\n```\n\n```ts\n// ✅\ntype Point = [number, number];\n```\n\n```ts\n// ❌\ntype Route = [name: string, ...string[]];\n\n// ✅\ntype Route = [name: string, ...segments: string[]];\n```\n\n<!-- File: docs/rules/custom-error-definition.md (Tokens: ~1185 | Category: anthropic-skill) -->\n# custom-error-definition\n\n📝 Enforce correct `Error` subclassing.\n\n🚫 Disabled by default.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent way of defining `Error` subclasses. It works with superclasses whose names match the rule's `*Error` naming pattern.\n\nTypeScript abstract classes are ignored. Concrete subclasses are still checked.\n\nFor native error bases that accept `ErrorOptions` as their second argument, constructors with regular parameters must accept a non-rest `options` parameter in any position and pass it second to `super()`. Rest-only constructors are exempt from this check. A constructor with a fixed message can instead pass `{cause}` inline, and a constructor with an `options` parameter can forward only its cause with `{cause: options.cause}`. `AggregateError` and `SuppressedError` use different signatures, and custom bases may too, so they are exempt.\n\n```js\nclass ApiError extends Error {\n\tconstructor(status, message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'ApiError';\n\t\tthis.status = status;\n\t}\n}\n\nclass HttpError extends Error {\n\tconstructor(response, request, options) {\n\t\tsuper(`Request failed: ${request.method} ${request.url}`, options);\n\t\tthis.name = 'HttpError';\n\t\tthis.response = response;\n\t\tthis.request = request;\n\t}\n}\n```\n\n```js\n// ✅\nclass UserNotFoundError extends GraphQLError {\n\tconstructor(userId) {\n\t\tsuper(`User \"${userId}\" does not exist`, {extensions: {code: 'NOT_FOUND'}});\n\t\tthis.name = 'UserNotFoundError';\n\t}\n}\n```\n\n## Examples\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// The `this.message` assignment is useless as it's already set via the `super()` call.\n\t\tthis.message = message;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(undefined, options);\n\t\t// Pass the error message to `super()` instead of setting `this.message`.\n\t\tthis.message = message;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// No `name` property set. The name property is needed so the\n\t\t// error shows up as `[CustomError: foo]` and not `[Error: foo]`.\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// Use a string literal to set the `name` property as it will not change after minifying.\n\t\tthis.name = this.constructor.name;\n\t}\n}\n\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\t// The `name` property should be set to the class name.\n\t\tthis.name = 'MyError';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ❌\n// The class name should be capitalized and end with `Error`.\nclass foo extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'foo';\n\t}\n}\n\n// ✅\nclass FooError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'FooError';\n\t}\n}\n```\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, details) {\n\t\tsuper(message);\n\t\tthis.details = details;\n\t\tthis.name = 'CustomError';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.details = options?.details;\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends Error {\n\tconstructor() {\n\t\tsuper('My custom error');\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\n// The message is hard-coded and the error options are passed to `super()` inline, so no `options` parameter is needed.\nclass CustomError extends Error {\n\tconstructor(cause) {\n\t\tsuper('My custom error', {cause});\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends TypeError {\n\tconstructor() {\n\t\tsuper();\n\t\tthis.name = 'CustomError';\n\t}\n}\n```\n\n```js\n// ✅\nclass CustomError extends Error {\n\tname = 'CustomError';\n}\n```\n\nWhen defining a custom `message` accessor, don't pass the message to `super()` as it would shadow the accessor with an own `message` property. Store the message somewhere else instead.\n\n```js\n// ❌\nclass CustomError extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = 'CustomError';\n\t}\n\n\tget message() {\n\t\treturn 'Custom message';\n\t}\n}\n\n// ✅\nclass CustomError extends Error {\n\t#message;\n\n\tconstructor(message, options) {\n\t\tsuper(undefined, options);\n\t\tthis.#message = message;\n\t\tthis.name = 'CustomError';\n\t}\n\n\tget message() {\n\t\treturn this.#message;\n\t}\n}\n```\n\n<!-- File: docs/rules/default-export-style.md (Tokens: ~947 | Category: anthropic-skill) -->\n# default-export-style\n\n📝 Enforce consistent default export declarations.\n\n💼🚫 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforce whether default-exported functions and classes are declared inline with `export default` or separately. For functions, separate means a `const` arrow function exported by identifier. For classes, separate means a class declaration exported by identifier.\n\nA consistent declaration style makes default exports easier to scan and avoids mixing multiple declaration forms across a codebase.\n\nThis rule controls whether local default exports are written inline or separately. Named exports are intentionally ignored. Use [`consistent-function-style`](./consistent-function-style.md) for function syntax, including direct default-exported functions through its `defaultExport` option.\n\nUse [`no-anonymous-default-export`](./no-anonymous-default-export.md) to require names for anonymous default exports.\n\n## Examples\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"inline\"}]\n\n// ❌\nconst foo = () => {};\nexport default foo;\n\n// ✅\nexport default function foo() {}\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"separate\"}]\n\n// ❌\nexport default function foo() {}\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {functions: \"ignore\"}]\n\n// ✅\nexport default function foo() {}\n\n// ✅\nconst foo = () => {};\nexport default foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"inline\"}]\n\n// ❌\nclass Foo {}\nexport default Foo;\n\n// ✅\nexport default class Foo {}\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"separate\"}]\n\n// ❌\nexport default class Foo {}\n\n// ✅\nclass Foo {}\nexport default Foo;\n```\n\n```js\n// eslint unicorn/default-export-style: [\"error\", {classes: \"ignore\"}]\n\n// ✅\nexport default class Foo {}\n\n// ✅\nclass Foo {}\nexport default Foo;\n```\n\n## Options\n\nType: `object`\n\nDefault:\n\n```js\n{\n\tfunctions: 'inline',\n\tclasses: 'inline',\n}\n```\n\n### `functions`\n\nAllowed values: `'inline'`, `'separate'`, `'ignore'`\n\n`'inline'` requires named default-exported functions to be declared inline:\n\n```js\nexport default function foo() {}\n```\n\n`'separate'` requires named default-exported functions to use a separate `const` arrow function declaration:\n\n```js\nconst foo = () => {};\nexport default foo;\n```\n\n`'ignore'` disables checks for functions.\n\n> [!NOTE]\n> When both rules are enabled, configure compatible styles. For example, `functions: 'inline'` pairs with `defaultExport: 'declaration'`, while `functions: 'separate'` pairs with `defaultExport: 'ignore'` when `namedFunctions` permits the separate `const` arrow function. The `defaultExport` option does not inspect `export default identifier`.\n\n### `classes`\n\nAllowed values: `'inline'`, `'separate'`, `'ignore'`\n\n`'inline'` requires named default-exported classes to be declared inline:\n\n```js\nexport default class Foo {}\n```\n\n`'separate'` requires named default-exported classes to use a separate class declaration:\n\n```js\nclass Foo {}\nexport default Foo;\n```\n\n`'ignore'` disables checks for classes.\n\n## Limitations\n\nThis rule intentionally ignores named exports, re-exports, CommonJS, anonymous defaults, non-adjacent declaration/export pairs, imported identifiers, values, objects, arrays, function expressions, `let`/`var` functions, multiple variable declarators, generators, later reassigned bindings, and TypeScript-specific syntax.\n\n<!-- File: docs/rules/dom-node-dataset.md (Tokens: ~863 | Category: anthropic-skill) -->\n# dom-node-dataset\n\n📝 Enforce consistent style for DOM element dataset access.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nUse [`.dataset`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset) on DOM elements over `getAttribute(…)`, `.setAttribute(…)`, `.removeAttribute(…)` and `.hasAttribute(…)`.\n\nThe `dataset` API maps `data-*` attributes to properties, avoiding repeated attribute-name strings and keeping reads and writes consistent.\n\nFor a missing attribute, `getAttribute(…)` returns `null`, but `.dataset` returns `undefined`. So reads are only offered as a suggestion, in both directions.\n\n## Examples\n\n```js\n// ❌\nconst unicorn = element.getAttribute('data-unicorn');\n\n// ✅\nconst {unicorn} = element.dataset;\n```\n\n```js\n// ❌\nelement.setAttribute('data-unicorn', '🦄');\n\n// ✅\nelement.dataset.unicorn = '🦄';\n```\n\n```js\n// ❌\nelement.removeAttribute('data-unicorn');\n\n// ✅\ndelete element.dataset.unicorn;\n```\n\n```js\n// ❌\nconst hasUnicorn = element.hasAttribute('data-unicorn');\n\n// ✅\nconst hasUnicorn = Object.hasOwn(element.dataset, 'unicorn');\n```\n\n```js\n// ✅\nconst foo = element.getAttribute('foo');\n```\n\n```js\n// ✅\nelement.setAttribute('not-dataset', '🦄');\n```\n\n```js\n// ✅\nelement.removeAttribute('not-dataset');\n```\n\n```js\n// ✅\nconst hasFoo = element.hasAttribute('foo');\n```\n\n## Options\n\n### preferAttributes\n\nType: `boolean`\\\nDefault: `false`\n\nWhen `true`, enforces the opposite direction: prefer `getAttribute(…)` / `setAttribute(…)` / `removeAttribute(…)` / `hasAttribute(…)` over named `.dataset` access — covering reads, writes, `delete`, simple destructuring, existence checks (`in`, `Object.hasOwn`, `.hasOwnProperty()`), and assigning `.dataset` to a variable (`const data = element.dataset`, which hides the attribute access from a search). Direct whole-object reads (`foo(element.dataset)`) and inherited members (`element.dataset.toString`) are not flagged. This can be useful for greppability when data attributes are also referenced in CSS/HTML.\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nconst unicorn = element.dataset.unicorn;\n\n// ✅\nconst unicorn = element.getAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nelement.dataset.unicorn = '🦄';\n\n// ✅\nelement.setAttribute('data-unicorn', '🦄');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\ndelete element.dataset.unicorn;\n\n// ✅\nelement.removeAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\n'unicorn' in element.dataset;\n\n// ✅\nelement.hasAttribute('data-unicorn');\n```\n\n```js\n/* eslint unicorn/dom-node-dataset: [\"error\", {\"preferAttributes\": true}] */\n\n// ❌\nconst data = element.dataset;\nconsole.log(data.unicorn);\n\n// ✅\nconsole.log(element.getAttribute('data-unicorn'));\n```\n\n<!-- File: docs/rules/empty-brace-spaces.md (Tokens: ~317 | Category: anthropic-skill) -->\n# empty-brace-spaces\n\n📝 Enforce no spaces between braces.\n\n💼🚫 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`. This rule is _disabled_ in the ☑️ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config).\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEmpty blocks and object literals do not need internal whitespace, so this rule enforces a compact, consistent style. It also checks objects and arrays in JSON, JSONC, JSON5, and SOML, blocks in CSS, flow mappings and sequences in YAML, and inline tables and arrays in TOML. Braces and brackets containing comments are left unchanged.\n\n## Examples\n\n```js\n// ❌\nclass Unicorn {\n}\n\n// ✅\nclass Unicorn {}\n```\n\n```js\n// ❌\ntry {\n\tfoo();\n} catch { }\n\n// ✅\ntry {\n\tfoo();\n} catch {}\n```\n\n<!-- File: docs/rules/error-message.md (Tokens: ~283 | Category: anthropic-skill) -->\n# error-message\n\n📝 Enforce passing a `message` value when creating a built-in error.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, ☑️ `unopinionated`.\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nThis rule enforces a `message` value to be passed in when creating an instance of a built-in [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, which leads to more readable and debuggable code.\n\n## Examples\n\n```js\n// ❌\nthrow new Error();\n\n// ❌\nthrow new Error('');\n\n// ✅\nthrow new Error('Unexpected property.');\n```\n\n```js\n// ❌\nthrow new TypeError();\n\n// ✅\nthrow new TypeError('Array expected.');\n```\n\n```js\n// ❌\nconst error = new AggregateError(errors);\n\n// ✅\nconst error = new AggregateError(errors, 'Promises rejected.');\n```\n\n```js\n// ❌\nconst error = new SuppressedError(error, suppressed);\n\n// ✅\nconst error = new SuppressedError(error, suppressed, 'This is a suppressed error.');\n```\n\n<!-- File: docs/rules/escape-case.md (Tokens: ~672 | Category: anthropic-skill) -->\n# escape-case\n\n📝 Require escape sequences to use uppercase or lowercase values.\n\n💼 This rule is enabled in the following [configs](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config): ✅ `recommended`, 🎨 `recommended-css`, 🧩 `recommended-json`, 💎 `recommended-soml`, 🛠️ `recommended-toml`, 📋 `recommended-yaml`, ☑️ `unopinionated`.\n\n🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).\n\n<!-- end auto-generated rule header -->\n<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->\n\nEnforces a consistent escaped value style by defining escape sequence values with uppercase or lowercase characters. The default style is uppercase, which promotes readability by making the escaped value more distinguishable from the identifier.\n\nTagged template literals are ignored because tag functions can observe the raw escape sequences.\n\nIn SOML, the configured case is ignored because Unicode escapes must use lowercase hexadecimal digits. Literal strings and keys are skipped.\n\nIn TOML, it checks basic strings and quoted keys, including multiline strings. It preserves `\\u` and `\\U` prefixes and also normalizes parser-tolerated `\\x` escapes, which TOML 1.0 does not define. Literal strings and keys are skipped.\n\nIn JSON, JSONC, and JSON5, it checks strings and quoted keys, including JSON5 hexadecimal escapes. In YAML, it checks hexadecimal and Unicode escapes in double-quoted scalars. In CSS, it checks one- to six-digit hexadecimal escapes in identifiers, strings, and URLs, preserving escape-terminating whitespace and skipping comments.\n\n## Examples\n\n```js\n// ❌\nconst foo = '\\xa9';\n\n// ✅\nconst foo = '\\xA9';\n```\n\n```js\n// ❌\nconst foo = '\\ud834';\n\n// ✅\nconst foo = '\\uD834';\n```\n\n```js\n// ❌\nconst foo = '\\u{1d306}';\n\n// ✅\nconst foo = '\\u{1D306}';\n```\n\n```js\n// ❌\nconst foo = '\\ca';\n\n// ✅\nconst foo = '\\cA';\n```\n\n## Options\n\nType: `string`\\\nDefault: `'uppercase'`\n\n- `'uppercase'` (default)\n  - Always use escape sequence values with uppercase characters.\n- `'lowercase'`\n  - Always use escape sequence values with lowercase characters.\n\nExample:\n\n```js\n{\n\t'unicorn/escape-case': ['error', 'lowercase']\n}\n```\n\n```js\n// ❌\nconst foo = '\\xA9';\n\n// ✅\nconst foo = '\\xa9';\n```\n\n```js\n// ❌\nconst foo = '\\uD834';\n\n// ✅\nconst foo = '\\ud834';\n```\n\n```js\n// ❌\nconst foo = '\\u{1D306}';\n\n// ✅\nconst foo = '\\u{1d306}';\n```\n\n```js\n// ❌\nconst foo = '\\cA';\n\n// ✅\nconst foo = '\\ca';\n```\n\n<!-- ... +348 more modular skills available via /api/skills/sindresorhus/eslint-plugin-unicorn?path={path} -->\n</yakaai_skills>"}