Releases: sindresorhus/eslint-plugin-unicorn
Releases Β· sindresorhus/eslint-plugin-unicorn
v52.0.0
New rules
no-single-promise-in-promise-methods
(#2258) 8f0ee89no-await-in-promise-methods
(#2259) a3be554no-anonymous-default-export
(#2273) c035216
Improvements
filename-case
: Add option for multiple file extensions (#2186) 4594020import-style
: Supportnode:
protocol (#2297) c28a086prefer-array-find
: Checkarray.filter().at(0)
(#2284) e6074feprefer-prototype-methods
: CheckObject.prototype
methods fromglobalThis
(#2286) 1792d33no-array-callback-reference
: Check logical expressions and check ternaries deeply (#2289) 231529a
Fixes
v51.0.1
v51.0.0
v50.0.1
v50.0.0
New rules
Improvements
- Support ESLint's new config system (#1886) 65711f9
no-useless-undefined
: AddcheckArrowFunctionBody
option (#2232) 9d7048cprefer-negative-index
: CheckTypedArray#subarray()
(#2237) 6708a30no-useless-undefined
: Ignore React state setters (#2223) 42881baprefer-module
: Allowmodule
as TSTypeParameter name (#2213) 8f61f7c
Fixes
v49.0.0
Improvements
v48.0.1
v48.0.0
Improvements
- Deprecate
no-unsafe-regex
rule (#2135) 7b473aa prefer-top-level-await
: Ignore promises insidePromise.{all,allSettled,any,race}()
(#2139) d3f6b60no-process-exit
: Ignore when usingnode:worker_threads
module (#2136) 2907805prefer-array-some
: Ignore filter calls with literal argument (#2097) 7a32edbprefer-modern-math-api
: Check cases thatMath.hypot()
should be preferred (#2080) 9bbc948explicit-length-check
: Ignore.length || number
(#1977) b9b8794
Fixes
- Fix crash on array holes (#2129) f10f1a6
prefer-dom-node-dataset
: Fix edge cases (#2171) b2d7378prefer-dom-node-dataset
: Remove broken fix forelement.setAttribute
(#2169) 61234afno-lonely-if
: Fix an edge case (#2168) ca837a8no-useless-undefined
: Turn parameter withundefined
default value into optional parameter (#2138) 4aa7d60no-thenable
: FixObject.fromEntries()
check (#2130) f3265b9prefer-dom-node-remove
: Fix incorrect auto-fix (#2084) 74bb36d
v47.0.0
Breaking
- Require Node.js 16 (#2073) a3bc120
- Require
eslint@>=8.38.0
(#2066) 04af765 - Enable
prefer-at
,prefer-event-target
, andprefer-string-replace-all
in recommended config (#2073) a3bc120
New rules
Improvements
prefer-top-level-await
: Ignore.cjs
files (#2072) 0c3ccb1prefer-spread
: Stop checkingArray.from
call with map function (#2064) f5beccbprefer-dom-node-text-content
: Check optional chaining (#2062) 8d6d007prefer-dom-node-{append,remove}
: Check optional chaining (#2061) 443999b