unstale

npm / eslint-plugin-unicorn

eslint-plugin-unicorn

What changed in eslint-plugin-unicorn 20 to 80, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

99 breaking5 security3 deprecations419 new APIs and options9 performance290 behavior and defaults18 tooling334 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

eslint-plugin-unicorn 8029 changes

Breaking changes 10

  • The rule ignores underscore-only parameters in TypeScript type signatures.

    80.0.0release notes

  • The rule is no longer included in the recommended and unopinionated presets and is now opt-in.

    80.0.0release notes

  • The rule detects async callbacks in unreassigned local let and var bindings.

    80.0.0release notes

  • The rule checks generic functions and autofixes type-safe removals when type information is available.

    80.0.0release notes

  • Node.js 22.13 is now required to use the plugin.

    80.0.0release notes

  • The rule handles ternaries with a null or undefined branch in truthiness checks.

    80.0.0release notes

  • In TypeScript, the rule reports only comparisons of known numbers.

    80.0.0release notes

  • The rule now supports member chains.

    80.0.0release notes

  • The rule ignores .cts files.

    80.0.0release notes

  • The rule ignores if chains that would put an else if inside default.

    80.0.0release notes

New APIs and options 9

  • Adds a checkCollections option.

    80.0.0release notes

  • The rule simplifies longer ternary chains.

    80.0.0release notes

  • A new rule is available to prefer an options parameter.

    80.0.0release notes

  • A new rule is available to prefer RegExp.prototype.exec.

    80.0.0release notes

  • Adds a checkTypeAliases option.

    80.0.0release notes

  • Adds a checkNestedTernaries option.

    80.0.0release notes

  • Adds the checkBufferDecoding option and autofixes Buffer.fromBase64().

    80.0.0release notes

  • Adds the checkBufferDecoding option and autofixes Buffer.fromHex().

    80.0.0release notes

  • A new rule is available to require parentheses around spread expressions.

    80.0.0release notes

Performance 1

  • Rules are loaded lazily to improve import performance.

    80.0.0release notes

Behavior and default changes 5

  • The rule detects async callbacks in unreassigned local let and var bindings.

    80.0.0release notes

  • The rule autofixes more consecutive initializations.

    80.0.0release notes

  • The rule ignores Object.setPrototypeOf(foo, null).

    80.0.0release notes

  • The rule factors comparisons with any comparison operator.

    80.0.0release notes

  • The rule ignores strings in import and export specifiers.

    80.0.0release notes

Tooling 2

  • The rule now reports redundant double-negation coercions.

    80.0.0release notes

  • The rule detects JSON loaded through createRequire() and can autofix it.

    80.0.0release notes

Fixes and other changes 2

  • JSDoc type inference is preserved when an ESLint directive comment separates the JSDoc comment from the code.

    80.0.0release notes

  • The rule ignores return undefined in getters.

    80.0.0release notes

eslint-plugin-unicorn 7929 changes

Breaking changes 1

  • The no-top-level-side-effects rule is no longer included in this preset.

    79.0.0release notes

New APIs and options 2

  • Adds an ignore option to comment-content.

    79.0.0release notes

  • Enable this option to check unknown calls more strictly.

    79.0.0release notes

Performance 1

Behavior and default changes 10

  • Potentially behavior-changing fixes in rare cases are now suggestions, including fixes in several named rules.

    79.0.0release notes

  • Functions in Vitest hoisted factories are now ignored.

    79.0.0release notes

  • Rules that use type information now infer types from JSDoc @type, @param, and @returns annotations.

    79.0.0release notes

  • Shorthand destructuring is now ignored.

    79.0.0release notes

  • Unknown calls are no longer reported by default; mutations of globals are reported, including in declarations and default exports.

    79.0.0release notes

  • Checks .find() results when they are used as booleans.

    79.0.0release notes

  • Reports negated and typed loose comparisons, and preserves TypeScript union narrowing.

    79.0.0release notes

  • Uses suggestions for changes that can affect numeric results.

    79.0.0release notes

  • Handles equivalent logical expressions and factors common terms in longer chains and static templates.

    79.0.0release notes

  • Checks TypeScript type aliases.

    79.0.0release notes

Fixes and other changes 15

  • More autofixes preserve comments in affected code.

    79.0.0release notes

  • Many rules' autofixes no longer produce broken code or incorrect parentheses.

    79.0.0release notes

  • Abstract TypeScript classes are now ignored.

    79.0.0release notes

  • Recognizes more configuration helpers.

    79.0.0release notes

  • Preserves boolean return types in TypeScript.

    79.0.0release notes

  • Skips unsafe logical OR fallbacks.

    79.0.0release notes

  • Skips search values incompatible with TypeScript types.

    79.0.0release notes

  • Preserves escaped trailing spaces in templates.

    79.0.0release notes

  • Skips minimizations that would break types.

    79.0.0release notes

  • Improves handling of typeof comparisons and guards.

    79.0.0release notes

  • Preserves TypeScript literal types in autofixes.

    79.0.0release notes

  • Preserves consecutive early-return guards.

    79.0.0release notes

  • Skips methods with incompatible types.

    79.0.0release notes

  • More rules handle template literals without expressions like strings.

    79.0.0release notes

  • Ignores calls that return functions.

    79.0.0release notes

eslint-plugin-unicorn 7835 changes

Breaking changes 1

  • Rules that skipped code with comments now report it, withholding fixes only when they would remove comments.

    78.0.0release notes

Security 2

New APIs and options 4

  • Adds a rule for detecting repeated call wrappers.

    78.0.0release notes

  • Adds a rule for detecting unnecessary default arguments.

    78.0.0release notes

  • Checks TypeScript instantiation expressions.

    78.0.0release notes

  • Combines non-literal exits in TypeScript when type information is available.

    78.0.0release notes

Behavior and default changes 10

  • Allows the does prefix by default.

    78.0.0release notes

  • Supports && and || chains of negated operands.

    78.0.0release notes

  • Allows known pure imported helpers, such as defineConfig() and React memo(), and checks default-exported expressions.

    78.0.0release notes

  • Supports static template literal fallbacks.

    78.0.0release notes

  • Supports fallbacks to earlier bindings.

    78.0.0release notes

  • Checks let and var listener functions, and ignores reassigned listeners.

    78.0.0release notes

  • Supports destructuring assignments.

    78.0.0release notes

  • Supports statements that differ in only one part, such as call(test ? a : b).

    78.0.0release notes

  • Allows cached promise assignments.

    78.0.0release notes

  • Adds support for complex Markdown labels, embedded HTML in Markdown, JSX, URL.canParse(), URL.parse(), and more HTML attributes.

    78.0.0release notes

Fixes and other changes 18

eslint-plugin-unicorn 7769 changes

Breaking changes 17

  • In logical mode, the rule now reports unnecessary boolean casts.

    77.0.0release notes

  • eslint-disable comments now suppress reports instead of making rules skip the code, avoiding directives that look unused.

    77.0.0release notes

  • Deprecated flat/all config was removed; use all instead.

    77.0.0release notes

  • Deprecated flat/recommended config was removed; use recommended instead.

    77.0.0release notes

  • Rule now supports CSS and JSON and is enabled in the recommended preset.

    77.0.0release notes

  • Rule now reports nested await expressions.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/no-deprecated-features.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/no-duplicate-selectors.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/no-duplicate-font-family-names.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/no-invalid-media-features.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/no-nesting-with-mixed-specificity.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/no-redundant-nested-style-rules.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/no-unknown-annotations.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/no-unknown-pseudo-selectors.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/no-unscoped-nesting-selector.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/prefer-explicit-viewport-units.

    77.0.0release notes

  • CSS-only rule moved to eslint-cssicorn as cssicorn/prefer-media-feature-range-syntax.

    77.0.0release notes

New APIs and options 36

Performance 1

Behavior and default changes 10

Fixes and other changes 5

eslint-plugin-unicorn 768 changes

New APIs and options 3

  • Adds the checkContinue option and defaults it to off.

    76.0.0release notes

  • Adds the checkConditionals option and defaults it to off.

    76.0.0release notes

  • Adds the checkCompoundConditions option and defaults it to off.

    76.0.0release notes

Behavior and default changes 4

Fixes and other changes 1

  • Autofixes no longer hardcode a tab for inserted indentation.

    76.0.0release notes

eslint-plugin-unicorn 7543 changes

New APIs and options 26

Performance 1

Behavior and default changes 8

Tooling 1

Fixes and other changes 7

eslint-plugin-unicorn 7414 changes

Performance 1

Behavior and default changes 10

Fixes and other changes 3

  • Fixes indentation and handling of the in operator.

    74.0.0release notes

  • Fixes false positives when the return value is used.

    74.0.0release notes

  • Fixes a false positive in mutable branch conditions.

    74.0.0release notes

eslint-plugin-unicorn 7321 changes

Security 1

New APIs and options 8

  • Adds the consistent-arrow-return-style rule.

    73.0.0release notes

  • Adds granular check options, including checkVariables, to consistent-boolean-name.

    73.0.0release notes

  • Adds the wrappers option to consistent-boolean-name.

    73.0.0release notes

  • Adds the defaultExport option to consistent-function-style.

    73.0.0release notes

  • Adds the iteration-fallback-style rule.

    73.0.0release notes

  • Adds the no-barrel-files rule.

    73.0.0release notes

  • Adds the ignore option to prefer-https.

    73.0.0release notes

  • Adds the single-line-block-comment-style rule.

    73.0.0release notes

Performance 1

Behavior and default changes 4

Fixes and other changes 7

eslint-plugin-unicorn 7228 changes

Breaking changes 2

  • Adds the rule to the recommended preset.

    72.0.0release notes

  • Renames the checkVaryingCallee option to checkVaryingBase.

    72.0.0release notes

New APIs and options 12

  • Adds a rule for detecting missing local resources.

    72.0.0release notes

  • Adds a rule for detecting multiple promise resolver calls.

    72.0.0release notes

  • Adds a rule for detecting shorthand property overrides.

    72.0.0release notes

  • Adds a rule for detecting transition-all usage.

    72.0.0release notes

  • Adds a rule for detecting unnecessary string trimming.

    72.0.0release notes

  • Adds a rule for detecting useless re-exports.

    72.0.0release notes

  • Adds an async IIFE suggestion.

    72.0.0release notes

  • Adds options to the rule.

    72.0.0release notes

  • Adds a rule for preferring explicit viewport units.

    72.0.0release notes

  • Adds the consistent-as-needed option.

    72.0.0release notes

  • Adds a rule for preferring then-catch promise handling.

    72.0.0release notes

  • Adds a rule for requiring frontmatter fields.

    72.0.0release notes

Behavior and default changes 11

Fixes and other changes 3

eslint-plugin-unicorn 719 changes

Behavior and default changes 7

Fixes and other changes 2

  • The rule respects configured globals in isolated functions.

    71.0.0release notes

  • In TypeScript, the rule ignores conditional flatMap fixes.

    71.0.0release notes

eslint-plugin-unicorn 7021 changes

New APIs and options 10

  • Adds a rule for detecting async Promise finally callbacks.

    70.0.0release notes

  • Adds an ignore option to the rule.

    70.0.0release notes

  • Adds a rule for detecting unnecessary fetch options.

    70.0.0release notes

  • Adds a rule for detecting unsafe Promise.allSettled values.

    70.0.0release notes

  • Adds a rule for preferring AbortSignal.any.

    70.0.0release notes

  • Adds a rule for preferring Array.flatMap.

    70.0.0release notes

  • Adds a rule for preferring Array.from for ranges.

    70.0.0release notes

  • Adds a rule for preferring block statements over IIFEs.

    70.0.0release notes

  • Adds a rule for preferring groupBy.

    70.0.0release notes

  • Adds a rule for preferring simplified conditions.

    70.0.0release notes

Behavior and default changes 8

Fixes and other changes 3

eslint-plugin-unicorn 6938 changes

New APIs and options 15

Behavior and default changes 7

  • Treats undefined and null fallbacks as an empty branch.

    69.0.0release notes

  • Allows dynamic access to a known boolean value.

    69.0.0release notes

  • Allows stack on Error instances.

    69.0.0release notes

  • Allows type-only exports.

    69.0.0release notes

  • No longer reports existence checks.

    69.0.0release notes

  • Allows computed keys when a rest element is present.

    69.0.0release notes

  • Only checks positive string index access when checkAllIndexAccess is enabled.

    69.0.0release notes

Fixes and other changes 16

  • No longer mutates commented-out multi-line code.

    69.0.0release notes

  • No longer crashes on Svelte {#each} bindings.

    69.0.0release notes

  • Allows a no-substitution template literal for name.

    69.0.0release notes

  • Does not require an options parameter when it is forwarded to super() inline.

    69.0.0release notes

  • Excludes Vite type declarations.

    69.0.0release notes

  • Ignores braces inside block comments.

    69.0.0release notes

  • Does not report custom push methods that do not return arrays.

    69.0.0release notes

  • Fixes false positives for destructured parameters and yield expressions.

    69.0.0release notes

  • Ignores non-string receivers.

    69.0.0release notes

  • Restricts values() reporting to arrays.

    69.0.0release notes

  • Keeps Boolean() around possibly-undefined values.

    69.0.0release notes

  • Skips concatenations that form a ${…} placeholder.

    69.0.0release notes

  • Autofixes else bodies containing JSX.

    69.0.0release notes

  • Improves fixes.

    69.0.0release notes

  • Does not suggest the swap when the result feeds arithmetic.

    69.0.0release notes

  • Does not report when the if body exits the loop.

    69.0.0release notes

eslint-plugin-unicorn 6864 changes

Breaking changes 2

  • Replaces the prevent-abbreviations rule name; update configurations to use name-replacements.

    68.0.0release notes

  • Removes prefer-type-literal-last from the unopinionated preset.

    68.0.0release notes

Security 1

New APIs and options 38

Behavior and default changes 12

Fixes and other changes 11

eslint-plugin-unicorn 6735 changes

Breaking changes 1

  • Disallows property targets in object destructuring.

    67.0.0release notes

Security 1

New APIs and options 15

Behavior and default changes 10

  • Removes the rule from the recommended preset, so it is no longer enabled by that preset.

    67.0.0release notes

  • Skips non-prose comments.

    67.0.0release notes

  • Groups static methods with other static members.

    67.0.0release notes

  • With preferAttributes, flags .dataset when it is assigned to a variable.

    67.0.0release notes

  • Suggests Math.sumPrecise() for sum reduces.

    67.0.0release notes

  • Disallows property targets in array destructuring.

    67.0.0release notes

  • Removes the rule from the recommended preset, so it is no longer enabled by that preset.

    67.0.0release notes

  • Ignores template literal types.

    67.0.0release notes

  • Reports partially-scoped selector lists.

    67.0.0release notes

  • Keeps null and undefined last.

    67.0.0release notes

Tooling 1

  • Disallows using push() and unshift() return values.

    67.0.0release notes

Fixes and other changes 7

eslint-plugin-unicorn 66139 changes

Breaking changes 6

  • The rule stops expanding destructuring.

    66.0.0release notes

  • ESLint 10.4 is now required to use this release.

    66.0.0release notes

  • The no-array-for-each rule is renamed to no-for-each; update rule configuration accordingly.

    66.0.0release notes

  • This rule is dropped and replaced by prefer-unicode-code-point-escapes, which covers more cases.

    66.0.0release notes

  • Node.js 22 is now required to use this release.

    66.0.0release notes

  • A new rule is available and replaces no-hex-escape while covering more cases.

    66.0.0release notes

New APIs and options 76

Performance 1

Behavior and default changes 40

  • The rule now ignores props.children.

    66.0.0release notes

  • The rule now allows the newLine word.

    66.0.0release notes

  • The rule now tracks JSX references.

    66.0.0release notes

  • The rule detects length <= 0 as a zero-length check.

    66.0.0release notes

  • The rule now allows acronyms in pascal case.

    66.0.0release notes

  • The rule now supports node: builtins.

    52.0.0, 66.0.0release notesrelease notes

  • The rule now ignores JSX wrappers.

    66.0.0release notes

  • The rule now ignores non-array TypeScript receivers.

    66.0.0release notes

  • The rule now supports all file extensions.

    66.0.0release notes

  • The rule now supports cached length loops.

    66.0.0release notes

  • The rule normalizes legacy MIME types.

    66.0.0release notes

  • The rule now respects Browserslist configuration.

    66.0.0release notes

  • The rule now supports inline TypeScript object type literals.

    66.0.0release notes

  • The rule now supports ternary expressions.

    66.0.0release notes

  • The rule now checks object spread in Object.assign().

    66.0.0release notes

  • In TypeScript files, case null and case undefined are allowed before default.

    66.0.0release notes

  • The rule now handles guarded indexed access.

    66.0.0release notes

  • The rule now ignores TypeScript call arguments.

    66.0.0release notes

  • The rule stops reporting plain concat normalization.

    66.0.0release notes

  • The rule now supports .filter(…).flatMap(…).

    66.0.0release notes

  • The rule now supports for-of array mapping.

    66.0.0release notes

  • The rule now prefers at() for string indexing.

    66.0.0release notes

  • The rule now ignores well-known XML namespace URIs.

    66.0.0release notes

  • The rule simplifies boolean array predicates.

    66.0.0release notes

  • The rule now checks parseInt.

    66.0.0release notes

  • The rule now handles .replaceChildren().

    66.0.0release notes

  • The rule now ignores type predicates.

    66.0.0release notes

  • The rule now checks legacy integer patterns.

    66.0.0release notes

  • The rule auto-fixes isNaN/isFinite when the argument is a number.

    66.0.0release notes

  • The rule now checks for-of loops.

    66.0.0release notes

  • The rule's TypeScript support is improved and it supports String#search() checks.

    66.0.0release notes

  • The rule now supports String#search() checks.

    66.0.0release notes

  • The rule handles trivial for...of copies and improves concat() array detection; it stops checking String#split('').

    66.0.0release notes

  • The rule stops checking String#split('').

    66.0.0release notes

  • The rule allows more regex flags for string fixes.

    66.0.0release notes

  • The rule now detects indexOf() === 0.

    66.0.0release notes

  • The rule now ignores literal discriminants.

    66.0.0release notes

  • The rule no longer flags typeof x === 'undefined' existence checks.

    66.0.0release notes

  • The rule now ignores e2e and a11y.

    66.0.0release notes

  • The rule ignores sql tagged templates.

    66.0.0release notes

Tooling 2

  • The rule checks single-character substring calls and prefers at() for string indexing.

    66.0.0release notes

  • The rule now provides an autofix.

    66.0.0release notes

Fixes and other changes 14

eslint-plugin-unicorn 6591 changes

Breaking changes 7

  • The rule was dropped because it is too broken and not feasible to fix.

    65.0.0release notes

  • Renames the prefer-dom-node-dataset rule to dom-node-dataset.

    65.0.0release notes

  • Renames ignoreDates to checkDates and makes checkDates true by default.

    65.0.0release notes

  • Renames ignoreDatesOnPullRequests to checkDatesOnPullRequests.

    65.0.0release notes

  • Checks directories as well as filenames.

    65.0.0release notes

  • Renames ignoreUsedVariables to checkUsedVariables.

    65.0.0release notes

  • The rule no longer exempts WebWorker-specific APIs.

    65.0.0release notes

New APIs and options 42

Performance 1

Behavior and default changes 8

Tooling 2

Fixes and other changes 31

eslint-plugin-unicorn 6429 changes

Breaking changes 1

  • The rule now flags return undefined when the return type explicitly includes undefined.

    64.0.0release notes

New APIs and options 5

  • Adds a rule for consistent escaping in template literals.

    64.0.0release notes

  • Adds the ignoreDates option.

    64.0.0release notes

  • Adds a rule for detecting useless conversions of iterators to arrays.

    64.0.0release notes

  • Adds a rule for putting the simpler condition first.

    64.0.0release notes

  • Adds a rule for switch-case break placement.

    64.0.0release notes

Performance 1

Behavior and default changes 6

Fixes and other changes 16

eslint-plugin-unicorn 6319 changes

New APIs and options 1

Behavior and default changes 3

Tooling 1

Fixes and other changes 14

  • Explicitly checks the specifier node type.

    63.0.0release notes

  • Does not flag ESLint disable comments.

    63.0.0release notes

  • Ignores || with a string fallback value.

    63.0.0release notes

  • Fixes a crash on export {x} without a from clause.

    63.0.0release notes

  • Ignores TypeScript types.

    63.0.0release notes

  • Ignores .sort() calls with non-function arguments.

    63.0.0release notes

  • Skips autofixes for string types when .entries() would be needed.

    63.0.0release notes

  • Fixes false positives for graduated esnext features.

    63.0.0release notes

  • Uses suggestions to remove empty arrays that have comments.

    63.0.0release notes

  • Fixes a false positive on Iterator.

    63.0.0release notes

  • Avoids autofixing non-function assignments.

    63.0.0release notes

  • Prevents type-imports from being removed when using a namespace import.

    63.0.0release notes

  • Skips TypedArray and ArrayBuffer constructor calls.

    63.0.0release notes

  • Excludes inline snapshots.

    63.0.0release notes

eslint-plugin-unicorn 6215 changes

New APIs and options 6

Behavior and default changes 4

Fixes and other changes 5

eslint-plugin-unicorn 619 changes

New APIs and options 5

Behavior and default changes 2

Fixes and other changes 2

eslint-plugin-unicorn 609 changes

Breaking changes 2

  • Node.js 20.10 is now required to use eslint-plugin-unicorn.

    60.0.0release notes

  • The rule no longer ignores optional chaining expressions.

    60.0.0release notes

New APIs and options 4

  • A new rule is available to flag uses of Array#reverse.

    60.0.0release notes

  • A new rule is available to flag useless Error.captureStackTrace calls.

    60.0.0release notes

  • A new rule is available to enforce preferring class fields.

    60.0.0release notes

  • A new rule is available to require module specifiers.

    60.0.0release notes

Tooling 1

  • eslint-plugin-unicorn now supports SuppressedError.

    60.0.0release notes

Fixes and other changes 2

  • The rule now handles the experimental pipeline operator correctly.

    60.0.0release notes

  • The rule now preserves escapes.

    60.0.0release notes

eslint-plugin-unicorn 598 changes

Breaking changes 2

  • The rule was renamed from no-length-as-slice-end to no-unnecessary-slice-end.

    59.0.0release notes

  • The rule was renamed from no-array-push-push to prefer-single-call.

    59.0.0release notes

New APIs and options 4

Behavior and default changes 2

eslint-plugin-unicorn 587 changes

New APIs and options 2

Fixes and other changes 5

  • Update the declared Node.js engine compatibility to match real compatibility.

    58.0.0release notes

  • Fix an exception when the rule is used in CommonJS.

    58.0.0release notes

  • Fix the browserslist field name used by the rule.

    58.0.0release notes

  • Fix a crash when checking the es6-error module.

    58.0.0release notes

  • Preserve iOS when checking for abbreviations.

    58.0.0release notes

eslint-plugin-unicorn 5716 changes

Breaking changes 3

  • The plugin now requires ESLint 9.20.0 or later.

    57.0.0release notes

  • The rule now treats util and utils as abbreviations.

    57.0.0release notes

  • The package is now pure ESM, changing how developers import and use it.

    57.0.0release notes

Deprecations 1

  • Deprecates no-instanceof-array and recommends no-instanceof-builtins instead.

    57.0.0release notes

New APIs and options 4

Behavior and default changes 3

Fixes and other changes 5

eslint-plugin-unicorn 568 changes

New APIs and options 3

  • Adds a new rule that developers can enable in their ESLint configuration.

    56.0.0release notes

  • Adds a new rule that developers can enable in their ESLint configuration.

    56.0.0release notes

  • Adds a new rule that developers can enable in their ESLint configuration.

    56.0.0release notes

Behavior and default changes 3

  • Removes better-regex from the recommended rules, so users relying on the recommended configuration will no longer have it enabled automatically.

    56.0.0release notes

  • The rule now ignores React 19 useRef calls.

    56.0.0release notes

  • The rule now supports getElementsByName.

    56.0.0release notes

Fixes and other changes 2

eslint-plugin-unicorn 555 changes

New APIs and options 1

Behavior and default changes 1

Tooling 1

Fixes and other changes 2

eslint-plugin-unicorn 547 changes

Breaking changes 1

  • Changes the checkFromLast default value to true.

    54.0.0release notes

New APIs and options 2

  • Adds the no-negation-in-equality-check rule.

    54.0.0release notes

  • Checks Array#findIndex() and Array#findLastIndex().

    54.0.0release notes

Behavior and default changes 1

Tooling 1

Fixes and other changes 2

eslint-plugin-unicorn 5315 changes

Breaking changes 2

  • Node.js 18.18 is now required to use the project.

    53.0.0release notes

  • The rule checks all call expressions instead of only arguments of ThrowStatement.

    53.0.0release notes

New APIs and options 6

Behavior and default changes 3

  • The rule ignores String.raw.

    53.0.0release notes

  • The rule now checks Array.fromAsync() calls.

    53.0.0release notes

  • Supports member expression paths in the tags and functions options.

    53.0.0release notes

Tooling 1

Fixes and other changes 3

eslint-plugin-unicorn 529 changes

New APIs and options 4

  • Adds an option for handling multiple file extensions.

    52.0.0release notes

  • Adds a rule for detecting anonymous default exports.

    52.0.0release notes

  • Adds a rule for detecting await in promise methods.

    52.0.0release notes

  • Adds a rule for detecting a single promise inside promise methods.

    52.0.0release notes

Behavior and default changes 3

  • Now checks logical expressions and analyzes ternaries more deeply.

    52.0.0release notes

  • Now checks array.filter().at(0).

    52.0.0release notes

  • Now checks Object.prototype methods accessed from globalThis.

    52.0.0release notes

Fixes and other changes 2

eslint-plugin-unicorn 514 changes

Behavior and default changes 2

  • Removed from the recommended preset, so projects using that preset no longer enable this rule by default.

    51.0.0release notes

  • The rule now checks Array.from() calls.

    51.0.0release notes

Fixes and other changes 2

  • Fixed a crash when the rule encounters {[Symbol.prototype]: 0}.

    51.0.0release notes

  • Fixed the argument passed to isMethodCall.

    51.0.0release notes

eslint-plugin-unicorn 506 changes

New APIs and options 2

Behavior and default changes 2

Fixes and other changes 2

  • The rule now allows module as a TSTypeParameter name.

    50.0.0release notes

  • Fixes JSX autofix behavior for newlines and related cases.

    50.0.0release notes

eslint-plugin-unicorn 494 changes

New APIs and options 1

Behavior and default changes 2

  • The rule now supports monorepos.

    49.0.0release notes

  • The rule now ignores EventEmitter from @angular/core and eventemitter3.

    49.0.0release notes

Fixes and other changes 1

  • The rule allows module as a TSIndexSignature name or a TSTypeAliasDeclaration id.

    49.0.0release notes

eslint-plugin-unicorn 4813 changes

Deprecations 1

Behavior and default changes 5

  • The rule ignores .length || number expressions.

    48.0.0release notes

  • The rule ignores process exits when using the node:worker_threads module.

    48.0.0release notes

  • The rule turns a parameter with an undefined default value into an optional parameter.

    48.0.0release notes

  • The rule ignores filter calls with a literal argument.

    48.0.0release notes

  • The rule ignores promises inside Promise.all, Promise.allSettled, Promise.any, and Promise.race.

    48.0.0release notes

Tooling 1

  • The rule checks cases where Math.hypot() should be preferred.

    48.0.0release notes

Fixes and other changes 6

eslint-plugin-unicorn 4710 changes

Breaking changes 3

New APIs and options 1

  • A new rule is available to prefer Blob reading methods.

    47.0.0release notes

Behavior and default changes 4

Fixes and other changes 2

eslint-plugin-unicorn 467 changes

Breaking changes 1

  • Forbids using Array#toSpliced() to copy an array.

    46.0.0release notes

Behavior and default changes 4

Fixes and other changes 2

  • Stops normalizing package.json.

    46.0.0release notes

  • Supports Array methods toReversed, toSorted, toSpliced, and with.

    46.0.0release notes

eslint-plugin-unicorn 4515 changes

Breaking changes 1

  • The rule now reports all String#replace() calls when the pattern has the g flag.

    45.0.0release notes

New APIs and options 3

Behavior and default changes 6

  • The rule now checks cloning inline arrays.

    45.0.0release notes

  • The rule now ignores Array#includes() and Set#has().

    45.0.0release notes

  • The rule now supports private fields.

    45.0.0release notes

  • The rule now uses suggestions when it is unsure about a regex without the g flag.

    45.0.0release notes

  • The rule now ignores regexes with a pipe.

    45.0.0release notes

  • The rule now ignores expressions in classes.

    45.0.0release notes

Fixes and other changes 5

eslint-plugin-unicorn 4415 changes

Breaking changes 1

  • The prefer-negative-index rule no longer includes ArrayBuffer#at.

    44.0.0release notes

New APIs and options 6

Behavior and default changes 2

Tooling 1

Fixes and other changes 5

eslint-plugin-unicorn 4315 changes

Breaking changes 2

Deprecations 1

New APIs and options 2

  • Adds the prefer-event-target rule.

    43.0.0release notes

  • Adds a rule that prefers logical operators over ternary expressions.

    43.0.0release notes

Behavior and default changes 5

Fixes and other changes 5

eslint-plugin-unicorn 4215 changes

New APIs and options 4

Behavior and default changes 4

  • The recommended preset no longer enables this rule.

    42.0.0release notes

  • The rule now checks optional chaining.

    42.0.0release notes

  • Adds dist and dst as recognized abbreviations.

    42.0.0release notes

  • The recommended preset sets this rule to error instead of warn.

    42.0.0release notes

Fixes and other changes 7

eslint-plugin-unicorn 414 changes

Breaking changes 2

New APIs and options 1

  • Adds the text-encoding-identifier-case ESLint rule.

    41.0.0release notes

Fixes and other changes 1

  • Fixes TypeScript compatibility for the prefer-export-from rule.

    41.0.0release notes

eslint-plugin-unicorn 4020 changes

Breaking changes 2

  • The rule no longer offers a fix for onerror.

    40.0.0release notes

  • The rule now checks Jest inline snapshots by default.

    40.0.0release notes

New APIs and options 4

Behavior and default changes 8

  • The rule now ignores $ in filenames.

    40.0.0release notes

  • The rule now ignores primitive wrappers in Array#map().

    40.0.0release notes

  • The rule now ignores pIteration.forEach.

    40.0.0release notes

  • The rule now ignores process.stdin, process.stdout, and process.stderr.

    40.0.0release notes

  • The rule now detects unnecessary Promise.resolve and Promise.reject calls in promise callback functions.

    40.0.0release notes

  • The rule now checks .hasAttribute() and .getAttribute().

    40.0.0release notes

  • The rule now checks .removeAttribute().

    40.0.0release notes

  • The rule now supports import assertions.

    40.0.0release notes

Fixes and other changes 6

eslint-plugin-unicorn 398 changes

New APIs and options 3

Behavior and default changes 2

  • Shows the file basename instead of the full path.

    39.0.0release notes

  • Removes the rule from the recommended config; users relying on that config will no longer enable it automatically.

    39.0.0release notes

Fixes and other changes 3

  • Fixes a false positive with triple-slash directives.

    39.0.0release notes

  • Fixes a bug when fixing an export namespace as default.

    39.0.0release notes

  • Ignores .toFixed calls from new expressions.

    39.0.0release notes

eslint-plugin-unicorn 385 changes

New APIs and options 2

Behavior and default changes 2

Fixes and other changes 1

  • The rule now ignores Boolean only in reasonable places.

    38.0.0release notes

eslint-plugin-unicorn 372 changes

Breaking changes 1

New APIs and options 1

eslint-plugin-unicorn 367 changes

New APIs and options 3

  • Adds a rule for detecting invalid removeEventListener calls.

    36.0.0release notes

  • Adds a rule for detecting useless fallbacks in spread syntax.

    36.0.0release notes

  • Adds a config that enables all rules except deprecated ones.

    36.0.0release notes

Behavior and default changes 2

  • The rule now uses suggestions for the 'use strict' directive.

    36.0.0release notes

  • The rule now checks String#split(''), helping identify cases where spread should be preferred.

    36.0.0release notes

Fixes and other changes 2

  • Handles cases where the Error constructor is shadowed.

    36.0.0release notes

  • Fixes a false negative involving array constants.

    36.0.0release notes

eslint-plugin-unicorn 3524 changes

Breaking changes 3

  • Removes the greater-than-or-equal option because it enabled a style that no one actually uses.

    35.0.0release notes

  • The rule now enforces new for SharedArrayBuffer and Proxy.

    35.0.0release notes

  • The rule now forbids destructuring.

    35.0.0release notes

New APIs and options 3

  • Adds a rule for detecting useless length checks.

    35.0.0release notes

  • Adds a rule for detecting useless spread operations.

    35.0.0release notes

  • Adds a rule that checks for cases where Object.fromEntries() can be used.

    35.0.0release notes

Behavior and default changes 11

Fixes and other changes 7

eslint-plugin-unicorn 3414 changes

Breaking changes 2

  • The rule now enforces a lowercased file extension.

    34.0.0release notes

  • The rule now checks only methods from [] and {}.

    34.0.0release notes

New APIs and options 4

  • Adds the no-array-method-this-argument rule.

    34.0.0release notes

  • Adds the prefer-at rule; it is disabled in the recommended preset.

    34.0.0release notes

  • Adds the prefer-top-level-await rule; it is disabled in the recommended preset.

    34.0.0release notes

  • Adds the require-post-message-target-origin rule.

    34.0.0release notes

Behavior and default changes 4

  • The rule now supports AggregateError.

    34.0.0release notes

  • The rule now ignores calls to Set#add(), Map#set(), Array#push(), and Array#unshift().

    34.0.0release notes

  • The rule now ignores .cjs files.

    34.0.0release notes

  • The rule now supports Vue SFC.

    34.0.0release notes

Fixes and other changes 4

  • The rule gives a more helpful error when no conditions are specified.

    34.0.0release notes

  • Fixes a crash on left-hand-side zero index access.

    34.0.0release notes

  • Fixes a missing condition on object literal checks.

    34.0.0release notes

  • The rule's report location is improved.

    34.0.0release notes

eslint-plugin-unicorn 3313 changes

Breaking changes 1

  • Removes the check for [].concat(...array.map(…)).

    33.0.0release notes

New APIs and options 4

  • Adds a rule that prefers Object.hasOwn; it is not enabled in the recommended preset.

    33.0.0release notes

  • Adds a rule that prefers prototype methods.

    33.0.0release notes

  • Adds a rule for requiring a separator argument to Array.join().

    33.0.0release notes

  • Adds a rule for requiring an argument to Number.toFixed().

    33.0.0release notes

Behavior and default changes 3

Tooling 1

  • Adds suggestions for safely handling non-strings.

    33.0.0release notes

Fixes and other changes 4

  • Ignores known, non-number length properties.

    33.0.0release notes

  • Handles cases with only a return statement inside an if or else branch.

    33.0.0release notes

  • Fixes an incorrect autofix and checks Array.prototype.concat.call.

    33.0.0release notes

  • Improves parentheses handling.

    33.0.0release notes

eslint-plugin-unicorn 3214 changes

Breaking changes 3

  • Support for babel-eslint was dropped; migrate to @babel/eslint-parser.

    32.0.0release notes

  • Support for Node.js v10 was dropped, so users need a newer Node.js version.

    32.0.0release notes

  • The rule no longer adds braces to the default case.

    32.0.0release notes

Behavior and default changes 6

Fixes and other changes 5

  • The rule's report position is improved.

    32.0.0release notes

  • The rule provides a better error message.

    32.0.0release notes

  • The rule handles numeric separators, fixes missing parentheses, and improves report location.

    32.0.0release notes

  • The rule now avoids conflicts with no-unreachable.

    32.0.0release notes

  • Shorthand import and export detection is fixed.

    32.0.0release notes

eslint-plugin-unicorn 312 changes

New APIs and options 2

eslint-plugin-unicorn 3018 changes

Breaking changes 3

  • Renames the no-keyword-prefix option blacklist to disallowedPrefixes.

    30.0.0release notes

  • The rule no longer fixes code when the callback parameter has a type annotation.

    30.0.0release notes

  • Renames options for this rule, so existing configurations may need updating.

    30.0.0release notes

New APIs and options 2

Behavior and default changes 1

Fixes and other changes 12

  • The rule now reports parsing errors.

    30.0.0release notes

  • Fixes the optional MemberExpression check when ecmaVersion is 2019.

    30.0.0release notes

  • Suggestion filenames are now unique.

    30.0.0release notes

  • Improves detection of parameters that can be fixed automatically.

    30.0.0release notes

  • The rule now excludes the second argument of Node.insertBefore().

    30.0.0release notes

  • The rule no longer reports return undefined when the function has a returnType.

    30.0.0release notes

  • The rule now handles parenthesized undefined.

    30.0.0release notes

  • Fixes a crash on parenthesized cases.

    30.0.0release notes

  • The rule excludes React.Children.map().flat().

    30.0.0release notes

  • Fixes some edge cases in the rule.

    30.0.0release notes

  • Uses suggestions instead of fixes when the node has a type annotation.

    30.0.0release notes

  • Adds support for PropertyDefinition.

    30.0.0release notes

eslint-plugin-unicorn 295 changes

New APIs and options 2

Behavior and default changes 1

Fixes and other changes 2

eslint-plugin-unicorn 2812 changes

Behavior and default changes 4

Fixes and other changes 8

eslint-plugin-unicorn 2710 changes

New APIs and options 3

Tooling 2

Fixes and other changes 5

eslint-plugin-unicorn 268 changes

Breaking changes 1

New APIs and options 4

Behavior and default changes 2

  • Removes the import-index rule from the recommended preset.

    26.0.0release notes

  • Ignores AwaitExpression except for reduce and reduceRight.

    26.0.0release notes

Fixes and other changes 1

eslint-plugin-unicorn 2516 changes

Breaking changes 12

  • Renames no-fn-reference-in-iterator to no-array-callback-reference; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames no-reduce to no-array-reduce; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames no-array-instanceof to no-instanceof-array; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames prefer-flat-map to prefer-array-flat-map; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames prefer-node-append to prefer-dom-node-append; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames prefer-dataset to prefer-dom-node-dataset; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames prefer-node-remove to prefer-dom-node-remove; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames prefer-text-content to prefer-dom-node-text-content; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames prefer-event-key to prefer-keyboard-event-key; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames prefer-replace-all to prefer-string-replace-all; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames prefer-starts-ends-with to prefer-string-starts-ends-with; update any rule configuration that uses the old name.

    25.0.0release notes

  • Renames prefer-trim-start-end to prefer-string-trim-start-end; update any rule configuration that uses the old name.

    25.0.0release notes

New APIs and options 2

Fixes and other changes 2

  • The rule now handles more cases, including unsafe LogicalExpressions and Boolean(foo.length).

    25.0.0release notes

  • The rule ignores Object(x) === x and Object(x) !== x.

    25.0.0release notes

eslint-plugin-unicorn 2426 changes

Breaking changes 1

  • Removes auto-fix for new String, new Boolean(), and new Number().

    24.0.0release notes

New APIs and options 7

Behavior and default changes 5

Fixes and other changes 13

eslint-plugin-unicorn 238 changes

Breaking changes 1

  • Uses 'greater-than' as the default for 'non-zero'.

    23.0.0release notes

New APIs and options 4

Behavior and default changes 1

Fixes and other changes 2

  • Tracks JSX presence per-function, fixing some false negatives.

    23.0.0release notes

  • Excludes .flat() when its depth is not 1.

    23.0.0release notes

eslint-plugin-unicorn 227 changes

New APIs and options 1

Behavior and default changes 2

Fixes and other changes 4

  • Allows Children in the rule.

    22.0.0release notes

  • Fixes an error thrown when using rest in object destructuring.

    22.0.0release notes

  • Fixes a false positive when using @typescript-eslint/parser.

    22.0.0release notes

  • Fixes the error message and improves the report location.

    22.0.0release notes

eslint-plugin-unicorn 2111 changes

New APIs and options 2

Behavior and default changes 2

  • Is no longer enabled by default in the recommended config.

    21.0.0release notes

  • Adds ev as a default replacement for event.

    21.0.0release notes

Fixes and other changes 7

eslint-plugin-unicorn 2010 changes

Breaking changes 1

  • ESLint 7 is now required to use eslint-plugin-unicorn.

    20.0.0release notes

New APIs and options 3

Behavior and default changes 3

Fixes and other changes 3