Releases: sindresorhus/eslint-plugin-unicorn
Releases Β· sindresorhus/eslint-plugin-unicorn
v57.0.0
Breaking
- This package is now pure ESM. Please read this.
- Flat config is now required c44ea26
- ESLint 9.20.0 or later is required c44ea26
New rules
consistent-date-clone
(#2544) 8cebcf4no-named-default
(#2538) ed8da1bconsistent-assert
(#2535) f3fc973no-instanceof-builtins
8197574 41548c4no-accessor-recursion
(#2525) 92b5671
Improvements
- Deprecate
no-instanceof-array
(#2534) c9c056c- Replaced by
no-instanceof-builtin-object
which covers more cases.
- Replaced by
prefer-includes
: Support Vue template (#2526) 4e539b4prevent-abbreviations
: Addutil
andutils
to abbreviations (#2507) 5ba9f0aprefer-math-min-max
: Ignore BigInt (#2467) 8b7c5fcprefer-global-this
: Also excludeouterWidth
andouterHeight
(#2549) 8f00f76prefer-at
: Remove unsafe autofix for.slice
with 1 argument (#2476) 2985eccprefer-math-min-max
: Reduce false positives in TypeScript (#2527) 1cbc561prefer-string-raw
: IgnoreImportAttribute
(#2551) d963ccd
Fixes
new-for-builtins
: Correct fix forDate()
(#2543) e5e17f8prefer-global-this
: Fix auto-fix fortypeof window
(#2501) b95dc12
v56.0.1
v56.0.0
New rules
prefer-global-this
(#2410) 1558cbeprefer-math-min-max
(#2432) 7369077consistent-existence-index-check
(#2425) d3e4b80
Breaking
Improvements
v55.0.0
v54.0.0
New rules
Breaking
prefer-array-find
: ChangecheckFromLast
default value totrue
(#2367) a449af9
Improvements
- Add name to flat configs (#2377) ac8536e
prefer-array-some
: CheckArray#{findIndex,findLastIndex}()
(#2370) 10568abprefer-includes
: Check.lastIndexOf()
(#2368) d812ad1prefer-string-raw
: Ignore strings in Enums (#2354) 175ea04
Fixes
v53.0.0
New rules
consistent-empty-array-spread
(#2349) 8d7954cprefer-string-raw
(#2339) 4f1400ano-invalid-fetch-options
(#2338) 342aafbno-magic-array-flat-depth
(#2335) bc17428prefer-structured-clone
(#2329) 497519e
Breaking
Meta
- You can now sponsor @fisker for his work on this project (#2348) b82542d
Improvements
- Support ESLint 9 (#2250) 598f57b
no-array-method-this-argument
: CheckArray.fromAsync()
(#2330) 99489b9prefer-number-properties
: AddcheckNaN
option (#2315) d30de50template-indent
: Support member expression paths intags
andfunctions
(#2346) aabcf1dprefer-number-properties
: Don't require by default forInfinity
/-Infinity
to be written asNumber.POSITIVE_INFINITY
/Number.NEGATIVE_INFINITY
(#2312) e0dfed2escape-case
: IgnoreString.raw
(#2342) 45bd444no-hex-escape
: IgnoreString.raw
(#2343) cc02a7fprefer-dom-node-dataset
: Ignoreawait
edgetAttribute
call (#2334) 45f23d5prevent-abbreviations
: Support non-ASCII filenames (#2308) 28762c8throw-new-error
: Check all call expressions instead of just argument ofThrowStatement
(#2332) 1626852
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