Releases: sindresorhus/eslint-plugin-unicorn
Releases Β· sindresorhus/eslint-plugin-unicorn
v46.0.1
v46.0.0
Improvements
- Add
elems
to abbreviations (#2040) 2a9c840 no-useless-spread
: CheckArray#{toReversed,toSorted,toSpliced,with}
(#2030) 55469e5prefer-set-has
: SupportArray#{toReversed,toSorted,toSpliced,with}
(#2032) fea5b42prefer-spread
: Forbid use ofArray#toSpliced()
to copy array (#2034) 4ada50eprefer-negative-index
: Check.toSpliced()
and.with()
(#2031) 7ed738ano-empty-file
: Support.jsx
and.tsx
extensions (#2002) ba1a00e
Fixes
v45.0.2
v45.0.1
v45.0.0
New rules
no-typeof-undefined
(#1966) d7f7341no-negated-condition
(#1963) e4aaa42prefer-set-size
(#1952) 5f23c98
Improvements
prefer-at
: Support private fields (#1929) 60bb455no-useless-undefined
: IgnoreArray#includes()
andSet#has()
(#1951) 8dfd5a7no-useless-spread
: Check cloning inline arrays (#1980) 5d90d73prefer-top-level-await
: Ignore expressions in class (#1976) b90a3aaprefer-string-replace-all
: Improve RegExp to string fix (#1971) b844dbcprefer-string-replace-all
: Check pattern even if it's already using.replaceAll
(#1981) e8c5156prefer-string-replace-all
: Report allString#replace()
when the pattern hasg
flag (#1965) 6316f05prefer-string-replace-all
: Ignore regex with pipe (#1962) 76deaa3prefer-regexp-test
: Use suggestions if not sure regexp withoutg
flag (#1954) 505a203no-array-for-each
: Skip fix for some edge cases (#1979) 48efc7aprefer-add-event-listener
: Only fixExpressionStatement
, checkoperator
(#1955) aca21f2prevent-abbreviations
: Improve fix forretVal
(#1953) 25cd810
Fixes
v44.0.2
v44.0.1
v44.0.0
New rules
Improvements
prefer-array-find
: Add option to also prefer.findLast()
(#1900) 02252c7template-indent
: Preserve trailing spaces (#1872) e4071f5no-document-cookie
: Checkwindow.document.cookie
(#1833) 0886544prefer-array-index-of
: Prefer.lastIndexOf()
over.findLastIndex()
(#1896) 70e5bddprefer-array-some
: Check.findLast()
(#1897) 3e6ae43prefer-native-coercion-functions
: Check.findLast
and.findLastIndex
(#1893) f2c6accno-array-method-this-argument
: Check.findLast
and.findLastIndex
(#1890) 3bc28adno-array-callback-reference
: Check.findLast
and.findLastIndex
(#1889) 37a5cdaprefer-negative-index
: RemoveArrayBuffer#at
(#1899) a10e3f6prefer-at
: Improve fix (#1901) 1c457bb
Fixes
v43.0.2
v43.0.1
- Remove
prefer-event-target
from the recommended preset 4d2faacEventTarget
requires Node.js 16 and we target Node.js 14. We'll enable it again in a year when we can target Node.js 16.