npm / eslint-plugin-unicorn
eslint-plugin-unicorn
What changed in eslint-plugin-unicorn 62 to 78, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
37 breaking5 security297 new APIs and options8 performance162 behavior and defaults7 tooling165 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initeslint-plugin-unicorn 7836 changes
Breaking changes 1
Rules that skipped code with comments now report it, withholding fixes only when they would remove comments.
Security 2
Prevents unsafe TypeScript object autofixes.
Prevents unsafe TypeScript autofixes.
New APIs and options 4
Adds a rule for detecting repeated call wrappers.
Adds a rule for detecting unnecessary default arguments.
Checks TypeScript instantiation expressions.
Combines non-literal exits in TypeScript when type information is available.
Behavior and default changes 10
Allows the does prefix by default.
Supports && and || chains of negated operands.
Allows known pure imported helpers, such as defineConfig() and React memo(), and checks default-exported expressions.
Supports static template literal fallbacks.
Supports fallbacks to earlier bindings.
Checks let and var listener functions, and ignores reassigned listeners.
Supports destructuring assignments.
Supports statements that differ in only one part, such as call(test ? a : b).
Allows cached promise assignments.
Adds support for complex Markdown labels, embedded HTML in Markdown, JSX, URL.canParse(), URL.parse(), and more HTML attributes.
Fixes and other changes 19
Recognizes promise-returning functions.
Fixes cyclic type parameter resolution.
Removes shared indentation.
Clarifies the message for nested await.
Combines a declaration with an assignment that follows it immediately.
Fixes a false positive for recursive defaults.
Ignores parameters named by type predicates.
Fixes false positives for DOM collections.
Suggests opposite relational comparisons.
Handles nullable fallback types.
Suggests opposite relational comparisons.
Handles non-boolean conditions.
Ignores formatting differences in shared expressions.
Does not autofix reassigned methods and suggests private arrow functions for bound methods.
Ignores queries on more non-element roots, such as ownerDocument and getRootNode().
Avoids false positives on non-promise calls.
Allows bare export {} in declaration files.
Ignores templates with content on the opening line.
Fixes cyclic resolution in type-aware checks.
eslint-plugin-unicorn 7770 changes
Breaking changes 17
In logical mode, the rule now reports unnecessary boolean casts.
eslint-disable comments now suppress reports instead of making rules skip the code, avoiding directives that look unused.
Deprecated flat/all config was removed; use all instead.
Deprecated flat/recommended config was removed; use recommended instead.
Rule now supports CSS and JSON and is enabled in the recommended preset.
Rule now reports nested await expressions.
CSS-only rule moved to eslint-cssicorn as cssicorn/no-deprecated-features.
CSS-only rule moved to eslint-cssicorn as cssicorn/no-duplicate-selectors.
CSS-only rule moved to eslint-cssicorn as cssicorn/no-duplicate-font-family-names.
CSS-only rule moved to eslint-cssicorn as cssicorn/no-invalid-media-features.
CSS-only rule moved to eslint-cssicorn as cssicorn/no-nesting-with-mixed-specificity.
CSS-only rule moved to eslint-cssicorn as cssicorn/no-redundant-nested-style-rules.
CSS-only rule moved to eslint-cssicorn as cssicorn/no-unknown-annotations.
CSS-only rule moved to eslint-cssicorn as cssicorn/no-unknown-pseudo-selectors.
CSS-only rule moved to eslint-cssicorn as cssicorn/no-unscoped-nesting-selector.
CSS-only rule moved to eslint-cssicorn as cssicorn/prefer-explicit-viewport-units.
CSS-only rule moved to eslint-cssicorn as cssicorn/prefer-media-feature-range-syntax.
New APIs and options 36
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
Adds the checkMultiStatementBodies option.
New rule is available.
New rule is available.
New rule is available.
New rule is available.
Adds the negatedConditions option.
Recommended preset for CSS is now available.
Recommended preset for HTML is now available.
Recommended preset for JSON is now available.
Recommended preset for Markdown is now available.
Recommended preset for TOML is now available.
Recommended preset for YAML is now available.
New rule is available.
Performance 1
Rule performance improved.
Behavior and default changes 10
Rule now supports computed properties.
Rule now prefers repository over repo.
Rule now supports block comments and CSS.
Rule now removes unnecessary singleton array wrappers.
Rule moved from the unopinionated preset to the recommended preset.
Rule now reports bindings with consistent fallback expressions.
Rule now simplifies only boolean branches.
Rule now handles typeof guards.
Rule now inlines local sources.
Rule now recognizes more encoding patterns.
Fixes and other changes 6
Rule avoids false positives for spread arguments.
Shorthand detection improved.
Checks guards after other statements in checkShortBodies.
Type inference for destructured bindings is fixed.
Checks guards after other statements in checkShortBodies.
Array call autofixes are now safe.
eslint-plugin-unicorn 768 changes
New APIs and options 3
Adds the checkContinue option and defaults it to off.
Adds the checkConditionals option and defaults it to off.
Adds the checkCompoundConditions option and defaults it to off.
Behavior and default changes 4
The rule now ignores TypeScript ambient variables.
The rule now handles boolean expressions.
The rule now provides an autofix.
The rule now preserves readable branches.
Fixes and other changes 1
Autofixes no longer hardcode a tab for inserted indentation.
eslint-plugin-unicorn 7543 changes
New APIs and options 26
Adds the directoryRoots option.
Adds a rule against async iterator callbacks.
Adds a rule for deprecated CSS features.
Adds a rule for duplicate CSS selectors.
Adds a rule for duplicate font family names.
Adds a rule for invalid media features.
Adds a rule for nesting with mixed specificity.
Adds a rule for redundant nested style rules.
Adds a rule for unknown CSS annotations.
Adds a rule for unknown pseudo-selectors.
Adds a rule for unscoped CSS nesting selectors.
Adds a rule for unused built-in method return values.
Adds a rule for unused iterator helpers.
Checks for…of loops.
Adds a rule for useless Set construction.
Adds a rule for resource escapes from using declarations.
Adds a rule for preferring combined guards.
Adds the checkShortBodies option.
Adds a rule preferring iterator helpers.
Adds a rule preferring iterator zip.
Adds a rule preferring JSON imports.
Adds a rule preferring media feature range syntax.
Checks property reads with checkComputedMemberAccess.
Adds a rule preferring Temporal conversion.
Adds a rule preferring Uint8Array hexadecimal conversion.
Adds TOML support.
Performance 1
Improves performance.
Behavior and default changes 8
Allows flexible options placement.
Supports conditionals.
Allows safe repeated strings.
Supports trailing conditionals.
Combines consecutive mutations.
Supports objects, arrays, and constructors.
Extends supported methods.
Checks initialized declarations.
Tooling 1
Prefers native encoding options.
Fixes and other changes 7
Recognizes function return types.
Preserves comments in autofixes.
Fixes identifier lookup across @eslint/css-tree versions.
Prevents unsafe combined fixes.
Recognizes ordinary serial mapping loops.
Recognizes accumulation loops.
Handles flat return statements.
eslint-plugin-unicorn 7414 changes
Performance 1
Rule performance was improved.
Behavior and default changes 10
The rule now handles JSDoc syntax.
The rule now supports possibly async boolean callbacks.
Custom error bases no longer require native
ErrorOptions.The rule now supports TypeScript parameter properties.
The rule now supports YAML.
The rule now allows the
ProcessEnvtype.The rule now ignores canvas contexts.
The rule now supports YAML.
The rule now supports stage 4 proposals.
The rule now supports logical assignment operators.
Fixes and other changes 3
Fixes indentation and handling of the
inoperator.Fixes false positives when the return value is used.
Fixes a false positive in mutable branch conditions.
eslint-plugin-unicorn 7321 changes
Security 1
Adds the no-unsafe-sqlite-interpolation rule.
New APIs and options 8
Adds the consistent-arrow-return-style rule.
Adds granular check options, including checkVariables, to consistent-boolean-name.
Adds the wrappers option to consistent-boolean-name.
Adds the defaultExport option to consistent-function-style.
Adds the iteration-fallback-style rule.
Adds the no-barrel-files rule.
Adds the ignore option to prefer-https.
Adds the single-line-block-comment-style rule.
Performance 1
Improves performance.
Behavior and default changes 4
Ignores type-only imports.
No longer checks relational operators.
Allows explicit TypeScript this parameters.
Treats == null checks as simple conditions.
Fixes and other changes 7
Handles Unicode word boundaries.
Fixes decorator position reporting.
Handles TypeScript parameter properties.
Handles Zod string schemas.
Handles existing else-if chains.
Fixes false positives for computed members.
Fixes control-flow analysis for process.exit.
eslint-plugin-unicorn 7229 changes
Breaking changes 2
Adds the rule to the recommended preset.
Renames the checkVaryingCallee option to checkVaryingBase.
New APIs and options 12
Adds a rule for detecting missing local resources.
Adds a rule for detecting multiple promise resolver calls.
Adds a rule for detecting shorthand property overrides.
Adds a rule for detecting transition-all usage.
Adds a rule for detecting unnecessary string trimming.
Adds a rule for detecting useless re-exports.
Adds an async IIFE suggestion.
Adds options to the rule.
Adds a rule for preferring explicit viewport units.
Adds the consistent-as-needed option.
Adds a rule for preferring then-catch promise handling.
Adds a rule for requiring frontmatter fields.
Performance 1
Improves performance.
Behavior and default changes 11
The rule now supports Vue refs.
The rule now ignores Unicode code point escapes.
The rule now ignores relational comparisons with optional chaining.
The rule now ignores <script setup>.
The rule uses type information for narrowed property keys.
The rule now ignores expect assertions.
The rule now handles awaited calls.
The rule now ignores const assertions.
By default, the rule no longer reports object-varying member access.
The rule now supports array destructuring.
The rule now detects slice comparisons.
Fixes and other changes 3
The rule now handles TypeScript Vue files.
The rule now preserves JSDoc comments on single-const re-exports.
Fixes the rule's logic.
eslint-plugin-unicorn 719 changes
Behavior and default changes 7
The rule now allows async boolean predicates.
The rule now allows boolean-like React refs with a Ref suffix.
The rule ignores destructured variables.
React hooks are skipped by default.
The rule ignores repeated boolean guard clauses.
The rule ignores Svelte files.
The rule is removed from presets.
Fixes and other changes 2
The rule respects configured globals in isolated functions.
In TypeScript, the rule ignores conditional flatMap fixes.
eslint-plugin-unicorn 7021 changes
New APIs and options 10
Adds a rule for detecting async Promise finally callbacks.
Adds an ignore option to the rule.
Adds a rule for detecting unnecessary fetch options.
Adds a rule for detecting unsafe Promise.allSettled values.
Adds a rule for preferring AbortSignal.any.
Adds a rule for preferring Array.flatMap.
Adds a rule for preferring Array.from for ranges.
Adds a rule for preferring block statements over IIFEs.
Adds a rule for preferring groupBy.
Adds a rule for preferring simplified conditions.
Behavior and default changes 8
The rule now supports inverse boolean names.
The rule now reports unsupported catalog versions.
The rule adds defaults for workerize and common evaluate APIs.
The rule now supports methods.
The rule now handles more cases.
The rule now recognizes process.exit() as an exiting branch.
The rule now ignores empty statements.
The rule now catches more callback methods.
Fixes and other changes 3
The rule now handles conditional member keys.
Fixes false positives from the rule.
The rule now ignores empty statements.
eslint-plugin-unicorn 6938 changes
New APIs and options 15
Adds an
ignoreoption and supports plural prefixes.Adds a rule for consistent tuple labels.
Adds a rule for invalid well-known symbol methods.
Adds a rule for late event control.
Allows the
voidoperator to opt out.Adds a rule preferring AbortSignal timeout usage.
Adds a rule preferring AggregateError.
Adds a rule preferring DOM node replaceChildren.
Adds a rule preferring Error.isError.
Adds a
checkVaryingCalleeoption.Adds a rule preferring observer APIs.
Adds a rule preferring Promise.try.
Adds a rule preferring Set methods.
Adds a rule preferring toggleAttribute.
Adds a rule preferring URL search parameters.
Behavior and default changes 7
Treats
undefinedandnullfallbacks as an empty branch.Allows dynamic access to a known boolean value.
Allows
stackonErrorinstances.Allows type-only exports.
No longer reports existence checks.
Allows computed keys when a rest element is present.
Only checks positive string index access when
checkAllIndexAccessis enabled.
Fixes and other changes 16
No longer mutates commented-out multi-line code.
No longer crashes on Svelte
{#each}bindings.Allows a no-substitution template literal for
name.Does not require an
optionsparameter when it is forwarded tosuper()inline.Excludes Vite type declarations.
Ignores braces inside block comments.
Does not report custom
pushmethods that do not return arrays.Fixes false positives for destructured parameters and yield expressions.
Ignores non-string receivers.
Restricts
values()reporting to arrays.Keeps
Boolean()around possibly-undefinedvalues.Skips concatenations that form a
${…}placeholder.Autofixes
elsebodies containing JSX.Improves fixes.
Does not suggest the swap when the result feeds arithmetic.
Does not report when the
ifbody exits the loop.
eslint-plugin-unicorn 6864 changes
Breaking changes 2
Replaces the
prevent-abbreviationsrule name; update configurations to usename-replacements.Removes
prefer-type-literal-lastfrom theunopinionatedpreset.
Security 1
Rules are hardened.
New APIs and options 38
Adds the
consistent-conditional-object-spreadrule.Adds the
default-export-stylerule.Adds the
no-accidental-bitwise-operatorrule.Adds the
no-array-concat-in-looprule.Adds the
no-array-front-mutationrule.Adds the
no-array-sort-for-min-maxrule.Adds the
no-boolean-sort-comparatorrule.Adds the
no-chained-comparisonrule.Adds the
no-collection-bracket-accessrule.Adds the
no-constant-zero-expressionrule.Adds the
no-double-comparisonrule.Adds the
no-duplicate-if-branchesrule.Adds the
no-duplicate-logical-operandsrule.Adds the
no-impossible-length-comparisonrule.Adds the
no-invalid-character-comparisonrule.Adds the
no-loop-iterable-mutationrule.Adds the
no-misrefactored-assignmentrule.Adds the
no-nonstandard-builtin-propertiesrule.Adds the
no-selector-as-dom-namerule.Adds the
no-unnecessary-boolean-comparisonrule.Flags
+value,value + '', andvalue.toString()idioms.Adds the
no-useless-compound-assignmentrule.Adds the
no-useless-delete-checkrule.Adds the
no-useless-logical-operandrule.Adds the
no-xor-as-exponentiationrule.Adds the
prefer-array-from-asyncrule.Adds the
prefer-array-iterable-methodsrule.Adds the
prefer-boolean-returnrule.Adds the
prefer-continuerule.Adds the
prefer-flat-math-min-maxrule.Adds the
prefer-hoisting-branch-coderule.Adds the
prefer-math-constantsrule.Adds the
prefer-promise-with-resolversrule.Adds the
prefer-regexp-escaperule.Adds the
prefer-single-replacerule.Adds the
prefer-unary-minusrule.Adds the
prefer-url-can-parserule.Adds the
prefer-while-loop-conditionrule.
Behavior and default changes 12
No longer checks destructured bindings.
Adds more default replacements.
Covers more builtins.
Only reports fresh, non-escaping local arrays.
Removes the rule from the
unopinionatedpreset.Allows intrinsic string-mapping types as keys.
Flags
return undefinedforvoidreturn type.Adds support for
.filter(…).slice(-1).Reports dynamic computed-key swaps.
Adds
parseFloatsupport.Removes
prefer-short-arrow-methodfrom therecommendedpreset, so the preset no longer enables it.Stops checking intersection types.
Fixes and other changes 11
No longer assumes the base rule's
defaultOptionsexist.Improves the rule's error message.
Handles unlabeled
continuein nestedswitchstatements.Ignores initializers containing
awaitoryield.Fixes a false positive.
Ignores some more comments.
Autofixes no longer drop comments.
Fixes lexical declaration autofixes.
Checks import attribute keys.
Ignores distinct expressions compared against
undefined.Preserves TypeScript casts on value access.
eslint-plugin-unicorn 6735 changes
Breaking changes 1
Disallows property targets in object destructuring.
Security 1
Hardens the rule.
New APIs and options 15
Adds a rule for enforcing consistent names for boolean variables.
Adds a rule for logical assignment operators.
Adds a rule for disallowing array splice.
Adds a rule for invalid argument counts.
Adds a rule for non-function names with verb prefixes.
Adds a rule for top-level assignments in functions.
Adds a rule for uncalled methods.
Adds a rule for unreadable for-of expressions.
Adds a rule for useless continue statements.
Adds a rule for useless overrides.
Adds a rule for operator assignments.
Adds a rule for preferring array slice.
Adds a rule for preferring else-if.
Adds a rule for preferring has checks.
Adds a rule for preferring Map.fromEntries.
Behavior and default changes 10
Removes the rule from the recommended preset, so it is no longer enabled by that preset.
Skips non-prose comments.
Groups static methods with other static members.
With preferAttributes, flags .dataset when it is assigned to a variable.
Suggests Math.sumPrecise() for sum reduces.
Disallows property targets in array destructuring.
Removes the rule from the recommended preset, so it is no longer enabled by that preset.
Ignores template literal types.
Reports partially-scoped selector lists.
Keeps null and undefined last.
Tooling 1
Disallows using push() and unshift() return values.
Fixes and other changes 7
Improves the rule's error message.
Hardens side-effect detection.
Ignores React hook calls.
Does not report non-empty files parsed by a plain-text parser.
Does not flag unique symbol keys.
Improves detection of nullish ternaries.
Applies only to combined selectors.
eslint-plugin-unicorn 66139 changes
Breaking changes 6
The rule stops expanding destructuring.
ESLint 10.4 is now required to use this release.
The no-array-for-each rule is renamed to no-for-each; update rule configuration accordingly.
This rule is dropped and replaced by prefer-unicode-code-point-escapes, which covers more cases.
Node.js 22 is now required to use this release.
A new rule is available and replaces no-hex-escape while covering more cases.
New APIs and options 76
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
The rule adds a peer condition.
A new rule is available to configure.
The rule adds the camelCaseWithAcronyms case.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
A new rule is available to configure.
The rule adds a single-statement option.
Performance 1
The rule's performance is improved.
Behavior and default changes 40
The rule now ignores props.children.
The rule now allows the newLine word.
The rule now tracks JSX references.
The rule detects length <= 0 as a zero-length check.
The rule now allows acronyms in pascal case.
The rule now supports node: builtins.
The rule now ignores JSX wrappers.
The rule now ignores non-array TypeScript receivers.
The rule now supports all file extensions.
The rule now supports cached length loops.
The rule normalizes legacy MIME types.
The rule now respects Browserslist configuration.
The rule now supports inline TypeScript object type literals.
The rule now supports ternary expressions.
The rule now checks object spread in Object.assign().
In TypeScript files, case null and case undefined are allowed before default.
The rule now handles guarded indexed access.
The rule now ignores TypeScript call arguments.
The rule stops reporting plain concat normalization.
The rule now supports .filter(…).flatMap(…).
The rule now supports for-of array mapping.
The rule now prefers at() for string indexing.
The rule now ignores well-known XML namespace URIs.
The rule simplifies boolean array predicates.
The rule now checks parseInt.
The rule now handles .replaceChildren().
The rule now ignores type predicates.
The rule now checks legacy integer patterns.
The rule auto-fixes isNaN/isFinite when the argument is a number.
The rule now checks for-of loops.
The rule's TypeScript support is improved and it supports String#search() checks.
The rule now supports String#search() checks.
The rule handles trivial for...of copies and improves concat() array detection; it stops checking String#split('').
The rule stops checking String#split('').
The rule allows more regex flags for string fixes.
The rule now detects indexOf() === 0.
The rule now ignores literal discriminants.
The rule no longer flags typeof x === 'undefined' existence checks.
The rule now ignores e2e and a11y.
The rule ignores sql tagged templates.
Tooling 2
The rule checks single-character substring calls and prefers at() for string indexing.
The rule now provides an autofix.
Fixes and other changes 14
Fixes false positives involving loop captures.
The rule now preserves Error#cause.
Fixes false positives.
The rule's autofix reliability is improved.
The rule now guards unsafe .entries() autofixes.
The rule now handles TypeScript wrappers.
The rule can autofix the first element of Promise.all.
The rule has fewer false positives.
The rule now ignores non-array find checks.
The rule no longer flags typeof existence checks.
The rule improves concat() array detection.
The rule detects let declarations reassigned in an if statement and only reports captured values.
The rule only reports captured values.
Fixes an incorrect autofix involving a comment.
eslint-plugin-unicorn 6591 changes
Breaking changes 7
The rule was dropped because it is too broken and not feasible to fix.
Renames the
prefer-dom-node-datasetrule todom-node-dataset.Renames
ignoreDatestocheckDatesand makescheckDatestrue by default.Renames
ignoreDatesOnPullRequeststocheckDatesOnPullRequests.Checks directories as well as filenames.
Renames
ignoreUsedVariablestocheckUsedVariables.The rule no longer exempts WebWorker-specific APIs.
New APIs and options 42
Adds the
better-dom-traversingrule.Adds the
consistent-compound-wordsrule.Adds the
consistent-json-file-readrule.Adds the
preferAttributesoption todom-node-dataset.Adds an
ignoreoption.Adds the
no-array-fill-with-reference-typerule.Adds the
no-array-from-fillrule.Adds the
no-blob-to-filerule.Adds the
no-canvas-to-imagerule.Adds the
no-confusing-array-splicerule.Adds the
no-duplicate-set-valuesrule.Adds an
allowCommentsoption.Adds the
no-exports-in-scriptsrule.Adds the
no-incorrect-query-selectorrule.Adds the
no-invalid-file-input-acceptrule.Adds the
no-late-current-target-accessrule.Adds the
no-manually-wrapped-commentsrule.Adds a
checkArgumentsoption.Adds the
no-this-outside-of-classrule.Adds the
no-unnecessary-nested-ternaryrule.Adds the
no-unused-array-method-returnrule.Adds a
fractionGroupLengthoption.Adds the
prefer-array-last-methodsrule.Adds the
prefer-get-or-insert-computedrule.Adds the
prefer-httpsrule.Adds the
prefer-includes-over-repeated-comparisonsrule.Adds the
prefer-iterator-concatrule.Adds the
prefer-iterator-to-array-at-endrule.Adds the
prefer-math-absrule.Adds an
allowWithVariablesoption.Adds the
prefer-queue-microtaskrule.Adds a
minimumItemsoption.Adds the
prefer-split-limitrule.Adds the
prefer-string-match-allrule.Adds the
prefer-string-pad-start-endrule.Adds the
prefer-string-repeatrule.Enforces
replaceAlloversplit().join().Adds the
require-css-escaperule.Adds the
require-passive-eventsrule.Adds a
caseSensitiveoption.Adds a
selectorsoption.Adds the
try-complexityrule.
Performance 1
Improves rule performance.
Behavior and default changes 8
Adds CSS support.
Allows
$-prefixed filenames.Reports spreading into collection constructors.
Ignores
arguments.Allows compatible extra usages.
Adds
unshift()support.Adds suggestions for ambiguous replacements.
Allows bare
export {}as a module marker.
Tooling 2
Adds autofix support.
Forbids unnecessary
String.raw.
Fixes and other changes 31
Fixes false positives on type assertions.
Fixes false positives on XML namespace URIs.
Fixes type guards.
Ignores functions in Jest mock factories.
Handles custom error message accessors.
Ignores nullable property guards.
Fixes a false positive.
Warns about misuse when all styles are set to
false.Uses singular callback parameter names.
Fixes handling of local callbacks.
Ignores
strict-callbag-basicsnamespaces.Fixes fixer overlap with whole-range fixes.
Fixes false positives for multi-feature imports.
Ignores
Promise.resolve(undefined)in TypeScript.Detects assigned
findresults.Avoids reporting object index access.
Fixes the append API label.
Improves the fixer.
Handles more cases.
Fixes length checks.
Ignores RTK action matchers.
Improves the TypeScript autofix.
Fixes false positives for strings.
Improves autofix.
Ignores variable initializers.
Fixes behavior under
@typescript-eslint/parser.Ignores Zod schema catch fallback.
Avoids unsafe parameter autofixes.
Fixes tagged template escape rules.
Fixes root indentation detection.
Fixes a decorator false positive.
eslint-plugin-unicorn 6429 changes
Breaking changes 1
The rule now flags
return undefinedwhen the return type explicitly includes undefined.
New APIs and options 5
Adds a rule for consistent escaping in template literals.
Adds the
ignoreDatesoption.Adds a rule for detecting useless conversions of iterators to arrays.
Adds a rule for putting the simpler condition first.
Adds a rule for switch-case break placement.
Performance 1
The rule's performance is improved.
Behavior and default changes 6
The rule now skips TypeScript type predicate callbacks.
The rule now ignores Date objects.
The rule now handles exported TypeScript interfaces and enums.
The rule now recognizes jQuery.
The rule now supports template literals.
Many rules now support TypeScript type assertions.
Fixes and other changes 16
Fixes the empty-pattern autofix.
Fixes a false positive for nested rest destructuring.
Fixes a false positive after reassignment.
Fixes TypeScript false positives for lexical
this.Fixes the class field autofix.
Fixes partial version comparison.
Fixes false positives involving
||fallbacks.Avoids unsafe autofixes in negated comparisons.
Fixes a false positive for type-only imports.
Fixes handling of JSX member access.
Fixes handling of window-specific
inchecks.Fixes false positives for TypeScript type predicates.
The rule avoids auto-fixing generic reduce calls.
Fixes false positives involving strings.
Autofix is skipped when it would drop comments.
Fixes a false positive involving
Promise.all.
eslint-plugin-unicorn 6319 changes
New APIs and options 1
Adds the isolated-functions rule.
Behavior and default changes 3
Adds support for signed numbers and strings.
Checks
Iterator#toArray()andString#split().Adds Array.from() support.
Tooling 1
Adds support for ESLint 10.
Fixes and other changes 14
Explicitly checks the specifier node type.
Does not flag ESLint disable comments.
Ignores
||with a string fallback value.Fixes a crash on
export {x}without afromclause.Ignores TypeScript types.
Ignores
.sort()calls with non-function arguments.Skips autofixes for string types when
.entries()would be needed.Fixes false positives for graduated
esnextfeatures.Uses suggestions to remove empty arrays that have comments.
Fixes a false positive on
Iterator.Avoids autofixing non-function assignments.
Prevents type-imports from being removed when using a namespace import.
Skips TypedArray and ArrayBuffer constructor calls.
Excludes inline snapshots.
eslint-plugin-unicorn 6215 changes
New APIs and options 6
Adds the no-immediate-mutation rule.
Adds the no-useless-collection-argument rule.
Adds the prefer-response-static-json rule.
Checks optional chaining.
Adds the withDash option.
Enforces 'utf-8' in form[acceptCharset] and TextDecoder.
Behavior and default changes 4
Ignores forEach for the Effect library.
Checks one undefined at a time.
Adds navigation to windowSpecificAPIs.
Adds support for template literals.
Fixes and other changes 5
Fixes inconsistent behavior.
Safely removes empty arrays and objects.
Reports cases where String.fromCharCode is not called directly.
Handles TypeScript import types.
Ignores more places that require a string.