Skip to content

Releases: sindresorhus/eslint-plugin-unicorn

v64.0.0

27 Mar 20:06

Choose a tag to compare

New rules

Improvements

  • Support TypeScript type assertions in many rules (#2909) 6b41299
  • text-encoding-identifier-case: Support template literals (#2905) 9448c8c
  • prefer-math-min-max: Ignore Date objects (#2903) cd53d9e
  • prevent-abbreviations: Handle exported TS interfaces and enums (#2898) 6dc01d2
  • no-array-callback-reference: Skip TypeScript type predicate callbacks (#2897) 02364c8
  • prefer-spread: Skip autofix when it would drop comments (#2896) 6ff1467
  • no-useless-undefined: Flag return undefined for explicit undefined return types (#2876) 41fc9c2
  • no-unnecessary-polyfills: Improve performance (#2874) c88bf29
  • expiring-todo-comments: Add ignoreDates option (#2892) 95a288b
  • prevent-abbreviations: Recognize jQuery 42f5364
  • prefer-object-from-entries: Avoid auto-fixing generic reduce (#2878) bea9b20

Fixes

  • expiring-todo-comments: Fix partial version comparison (#2895) 51390e9
  • consistent-destructuring: Fix false positive for nested rest destructuring (#2894) 1cddfb5
  • consistent-destructuring: Fix false positive after reassignment (#2893) c7f57d0
  • consistent-function-scoping: Fix TypeScript false positives for lexical this (#2885) a383657
  • custom-error-definition: Fix class field autofix (#2887) 1359726
  • explicit-length-check: Fix || fallback false positives (#2889) 84246ec
  • explicit-length-check: Avoid unsafe autofix in negated comparisons (#2883) 73b043b
  • import-style: Fix false positive for type-only import (#2891) aea9954
  • no-unused-properties: Fix for JSX member access (#2890) 0ff698b
  • better-regex: Fix empty-pattern autofix (#2881) c201987
  • prefer-global-this: Fix for window-specific in checks (#2879) 6bf7537
  • prefer-native-coercion-functions: Fix false positive for TS type predicates (#2888) 4c4b565
  • prefer-set-has: Fix string false positives (#2882) c230c22
  • prefer-top-level-await: Fix false positive with Promise.all (#2884) 67faa7a

v63.0.0...v64.0.0

v63.0.0

10 Feb 16:20

Choose a tag to compare

New rules

Improvements

  • Support ESLint 10 (#2823) bd0901b
  • prefer-set-size: Add Array.from() support (#2857) e556143
  • prefer-bigint-literals: Support signed numbers and strings (#2784) a332a50
  • prefer-export-from: Fix type-import being removed when using namespace import (#2771) ab4b779
  • prefer-spread: Fix: Skip TypedArray and ArrayBuffer constructor calls (#2871) 42a558f
  • no-array-sort: Ignore .sort() calls with non-function arguments (#2862) cbb2377
  • prefer-add-event-listener: Don't autofix non-function assignments (#2865) 989ec61
  • explicit-length-check: Ignore || with string fallback value (#2861) 4806f7e
  • no-unnecessary-polyfills: Fix false positive for graduated esnext features (#2864) d6c13ab
  • no-for-loop: Skip auto-fix for string types when .entries() would be needed (#2869) 08a591a
  • import-style: Fix crash on export {x} without from clause (#2868) 141c8c5
  • expiring-todo-comments: Should not flag ESLint disable comments (#2828) 3568daf
  • no-useless-collection-argument: Use suggestions to remove empty array with comments (#2838) c0d0687
  • prefer-set-has: Check Iterator#toArray() and String#split() (#2829) ab8970e
  • no-useless-spread: Fix false positive on Iterator (#2831) 994e31c
  • isolated-functions: Ignore TypeScript types (#2822) c3479c0
  • prefer-string-raw: Exclude inline snapshot (#2811) 6e7f93c
  • consistent-assert: Explicitly check specifier node type (#2803) 396a8fa

v62.0.0...v63.0.0

v62.0.0

26 Oct 07:00

Choose a tag to compare

New rules

Improvements

  • text-encoding-identifier-case: Add withDash option (#2780) 9025386
  • no-useless-undefined: Check one undefined at a time (#2792) 27f7509
  • prefer-single-call: Check optional chaining (#2788) 8a132ac
  • text-encoding-identifier-case: Enforce 'utf-8' in form[acceptCharset] and TextDecoder (#2785) 46b3974
  • prefer-node-protocol: Handle TypeScript import types (#2774) 13a37a0
  • no-array-for-each: Ignore forEach for Effect library (#2783) 2ef6f83
  • prefer-string-raw: Ignore more places that requires a string (#2776) 43bc429
  • prefer-string-raw: Add support for template literals (#2691) 52723a2
  • prefer-global-this: Add navigation to windowSpecificAPIs (#2770) 0c93998
  • prefer-code-point: Report cases where String.fromCharCode is not called directly (#2766) 1d682a1
  • no-useless-spread: Safely remove empty array and object (#2764) 7aeabab

Fixes

  • consistent-function-scoping: Fix inconsistent behavior (#2748) a546444

v61.0.2...v62.0.0

v61.0.2

08 Sep 09:24

Choose a tag to compare

  • throw-new-error: Fix false positive for Effect library (#2740) 0ddf5ea
  • no-useless-undefined: Ignore Set#delete(undefined) (#2739) 99acd27
  • prefer-includes and prefer-array-index-of: Prevent crash on Vue files (#2645) a1da518

v61.0.1...v61.0.2

v61.0.1

06 Sep 07:56

Choose a tag to compare

  • prefer-classlist-toggle: Omit Element#classList.contains() call when fixing (#2732) 066f96b

v61.0.0...v61.0.1

v61.0.0

05 Sep 17:42

Choose a tag to compare

New rules

Improvements

  • Add unopinionated config (#2715) c13d09b
  • Improve compatibility with optional chaining (#2727) 60b2ec5
  • no-array-reduce: Report optional chaining and calling of .reduce() (#2721) caa1f8b
  • prefer-type-error: Ignore error type check (#2729) d12fc01

Fixes

  • prefer-includes: Fix compatibility with Vue SFC (#2704) 540a4d4

v60.0.0...v61.0.0

v60.0.0

21 Jul 11:23

Choose a tag to compare

Breaking

New rules

Improvements

Fixes

  • no-array-callback-reference: Fix optional chaining expressions being ignored (#2694) ad27922
  • no-unnecessary-await: Fix handling of experimental pipeline operator (#2658) 2b8ebe5

v59.0.1...v60.0.0

v59.0.1

06 May 07:12

Choose a tag to compare

  • prefer-single-call: Fix crash on CallExpression followed by FunctionDeclaration (#2639) 3114dd9

v59.0.0...v59.0.1

v59.0.0

27 Apr 13:46

Choose a tag to compare

Breaking

  • Rename no-array-push-push rule to prefer-single-call (#2617) e117783
  • Rename no-length-as-slice-end rule to no-unnecessary-slice-end (#2614) 1922df1

New rules

Improvements


v58.0.0...v59.0.0

v58.0.0

24 Mar 09:21

Choose a tag to compare

Potentially breaking

  • Update engines.node in package.json to match real compatibility (#2581) e48a620

Improvements

Fixes

  • no-unnecessary-polyfills: Fix browserslist field name (#2603) 1a4c76f
  • no-unnecessary-polyfills: Fix crash on checking es6-error module (#2582) 66de41a
  • no-accessor-recursion: Fix exception when used in CommonJS (#2574) ca1e432

v57.0.0...v58.0.0