Skip to content

Releases: sindresorhus/eslint-plugin-unicorn

v46.0.1

06 May 07:35
Compare
Choose a tag to compare

v46.0.0...v46.0.1

v46.0.0

03 Mar 15:29
Compare
Choose a tag to compare

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

12 Dec 11:57
Compare
Choose a tag to compare
  • 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

28 Nov 09:47
Compare
Choose a tag to compare

v45.0.0...v45.0.1

v45.0.0

20 Nov 18:25
Compare
Choose a tag to compare

New rules

Improvements

  • prefer-at: Support private fields (#1929) 60bb455
  • no-useless-undefined: Ignore Array#includes() and Set#has() (#1951) 8dfd5a7
  • no-useless-spread: Check cloning inline arrays (#1980) 5d90d73
  • prefer-top-level-await: Ignore expressions in class (#1976) b90a3aa
  • prefer-string-replace-all: Improve RegExp to string fix (#1971) b844dbc
  • prefer-string-replace-all: Check pattern even if it's already using .replaceAll (#1981) e8c5156
  • prefer-string-replace-all: Report all String#replace() when the pattern has g flag (#1965) 6316f05
  • prefer-string-replace-all: Ignore regex with pipe (#1962) 76deaa3
  • prefer-regexp-test: Use suggestions if not sure regexp without g flag (#1954) 505a203
  • no-array-for-each: Skip fix for some edge cases (#1979) 48efc7a
  • prefer-add-event-listener: Only fix ExpressionStatement, check operator (#1955) aca21f2
  • prevent-abbreviations: Improve fix for retVal (#1953) 25cd810

Fixes

  • prefer-top-level-await: Fix crash on for..of loop (#1950) 00a29c8

v44.0.2...v45.0.0

v44.0.2

07 Oct 05:17
Compare
Choose a tag to compare
  • no-array-method-this-argument: Ignore lodash.findLast and lodash.findLastIndex (#1927) 86e8add

v44.0.1...v44.0.2

v44.0.1

05 Oct 05:32
Compare
Choose a tag to compare
  • prefer-array-index-of: Add missing message (#1924) a981a13

v44.0.0...v44.0.1

v44.0.0

01 Oct 07:13
Compare
Choose a tag to compare

New rules

Improvements

  • prefer-array-find: Add option to also prefer .findLast() (#1900) 02252c7
  • template-indent: Preserve trailing spaces (#1872) e4071f5
  • no-document-cookie: Check window.document.cookie (#1833) 0886544
  • prefer-array-index-of: Prefer .lastIndexOf() over .findLastIndex() (#1896) 70e5bdd
  • prefer-array-some: Check .findLast() (#1897) 3e6ae43
  • prefer-native-coercion-functions: Check .findLast and .findLastIndex (#1893) f2c6acc
  • no-array-method-this-argument: Check .findLast and .findLastIndex (#1890) 3bc28ad
  • no-array-callback-reference: Check .findLast and .findLastIndex (#1889) 37a5cda
  • prefer-negative-index: Remove ArrayBuffer#at (#1899) a10e3f6
  • prefer-at: Improve fix (#1901) 1c457bb

Fixes

  • no-await-expression-member: Fix crash on TypeScript parser (#1910) b002e75
  • prevent-abbreviations: Skip fix when variable is JSX component (#1907) 9ed08ab
  • better-regexp: Don't fix if .source or .toString() is used (#1903) 8ad592b

v43.0.2...v44.0.0

v43.0.2

18 Jul 12:34
Compare
Choose a tag to compare
  • prefer-spread: Ignore Array#join().concat() and (a + b).concat() (#1859) ab71971

v43.0.1...v43.0.2

v43.0.1

07 Jul 21:45
Compare
Choose a tag to compare
  • Remove prefer-event-target from the recommended preset 4d2faac
    • EventTarget 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.

v43.0.0...v43.0.1