Skip to content

Releases: sindresorhus/eslint-plugin-unicorn

v50.0.1

Choose a tag to compare

@fisker fisker released this 21 Dec 07:52

Fixes

  • no-unnecessary-polyfills: Fix missing dependency error (#2242) 3df1606

v50.0.0...v50.0.1

v50.0.0

Choose a tag to compare

@sindresorhus sindresorhus released this 21 Dec 03:30

New rules

Improvements

  • Support ESLint's new config system (#1886) 65711f9
  • no-useless-undefined: Add checkArrowFunctionBody option (#2232) 9d7048c
  • prefer-negative-index: Check TypedArray#subarray() (#2237) 6708a30
  • no-useless-undefined: Ignore React state setters (#2223) 42881ba
  • prefer-module: Allow module as TSTypeParameter name (#2213) 8f61f7c

Fixes

  • string-content: Fix JSX autofix for newlines, etc. (#2222) b95e75e

v49.0.0...v50.0.0

v49.0.0

Choose a tag to compare

@sindresorhus sindresorhus released this 29 Oct 19:53

Improvements

  • expiring-todo-comments: Support monorepos (#2159) ac51d40
  • prefer-module: Allow module as TSIndexSignature names or TSTypeAliasDeclaration ids (#2209) ea94b3b
  • Support RegExp v flag (#2195) 28e7498
  • prefer-event-target: Ignore EventEmitter from @angular/core and eventemitter3 (#2197) 1629ebe

v48.0.1...v49.0.0

v48.0.1

Choose a tag to compare

@sindresorhus sindresorhus released this 25 Jul 16:06
  • no-empty-file: Fix directive check for TypeScript parser (#2180) 1bb9ce8

v48.0.0...v48.0.1

v48.0.0

Choose a tag to compare

@sindresorhus sindresorhus released this 15 Jul 12:11

Improvements

  • Deprecate no-unsafe-regex rule (#2135) 7b473aa
  • prefer-top-level-await: Ignore promises inside Promise.{all,allSettled,any,race}() (#2139) d3f6b60
  • no-process-exit: Ignore when using node:worker_threads module (#2136) 2907805
  • prefer-array-some: Ignore filter calls with literal argument (#2097) 7a32edb
  • prefer-modern-math-api: Check cases that Math.hypot() should be preferred (#2080) 9bbc948
  • explicit-length-check: Ignore .length || number (#1977) b9b8794

Fixes

  • Fix crash on array holes (#2129) f10f1a6
  • prefer-dom-node-dataset: Fix edge cases (#2171) b2d7378
  • prefer-dom-node-dataset: Remove broken fix for element.setAttribute (#2169) 61234af
  • no-lonely-if: Fix an edge case (#2168) ca837a8
  • no-useless-undefined: Turn parameter with undefined default value into optional parameter (#2138) 4aa7d60
  • no-thenable: Fix Object.fromEntries() check (#2130) f3265b9
  • prefer-dom-node-remove: Fix incorrect auto-fix (#2084) 74bb36d

v47.0.0...v48.0.0

v47.0.0

Choose a tag to compare

@sindresorhus sindresorhus released this 06 May 07:48

Breaking

  • Require Node.js 16 (#2073) a3bc120
  • Require eslint@>=8.38.0 (#2066) 04af765
  • Enable prefer-at, prefer-event-target, and prefer-string-replace-all in recommended config (#2073) a3bc120

New rules

Improvements

  • prefer-top-level-await: Ignore .cjs files (#2072) 0c3ccb1
  • prefer-spread: Stop checking Array.from call with map function (#2064) f5beccb
  • prefer-dom-node-text-content: Check optional chaining (#2062) 8d6d007
  • prefer-dom-node-{append,remove}: Check optional chaining (#2061) 443999b

Fixes

  • prefer-number-properties: Fix false positives (#2050) 124bfa7

v46.0.0...v47.0.0

v46.0.1

Choose a tag to compare

@sindresorhus sindresorhus released this 06 May 07:35

v46.0.0...v46.0.1

v46.0.0

Choose a tag to compare

@sindresorhus sindresorhus released this 03 Mar 15:29

Improvements

  • Add elems to abbreviations (#2040) 2a9c840
  • no-useless-spread: Check Array#{toReversed,toSorted,toSpliced,with} (#2030) 55469e5
  • prefer-set-has: Support Array#{toReversed,toSorted,toSpliced,with} (#2032) fea5b42
  • prefer-spread: Forbid use of Array#toSpliced() to copy array (#2034) 4ada50e
  • prefer-negative-index: Check .toSpliced() and .with() (#2031) 7ed738a
  • no-empty-file: Support .jsx and .tsx extensions (#2002) ba1a00e

Fixes

v45.0.2...v46.0.0

v45.0.2

Choose a tag to compare

@sindresorhus sindresorhus released this 12 Dec 11:57
  • prefer-string-replace-all: Don't crash on invalid pattern (#2011) 3bbe027
  • prevent-abbreviations: Skip fix for variables used in Vue template (#2012) 8cd1ded

v45.0.1...v45.0.2

v45.0.1

Choose a tag to compare

@sindresorhus sindresorhus released this 28 Nov 09:47

v45.0.0...v45.0.1