Skip to content

Releases: sindresorhus/eslint-plugin-unicorn

v43.0.0

30 Jun 16:44
Compare
Choose a tag to compare

New rules

Breaking

  • Require Node.js 14

Improvements

  • Add prefer-top-level-await rule to recommended preset (#1803) 6f5ecf5
  • Deprecate import-index rule (#1787) 0034e69
  • Update abbreviations to support Next.js functions (#1804) 4b96057
  • text-encoding-identifier-case: Ignore JSX meta[charset="utf-8"] (#1817) c67a70f
  • prefer-number-properties: Check any use of global functions (#1834) 51d7e06
  • prefer-number-properties: Detect usage via global object (#1832) 80c4af2
  • no-array-for-each: Check reassign in for..in and for..of (#1824) d3b2548
  • no-useless-undefined: Ignore ref(undefined) in Vue project (#1828) e7306e5
  • prefer-node-protocol: Always check require() (#1827) 2c914d4
  • no-array-for-each: Improve parameter reassign detection (#1823) 56df468
  • no-array-for-each: Add fix for arrow function body (#1785) 59218e3

Fixes

  • no-array-for-each: Fix auto-fix causing SyntaxError (#1813) 47c8337

v42.0.0...v43.0.0

v42.0.0

01 Apr 14:39
Compare
Choose a tag to compare

The project has passed 100 lint rules 🎉

Thanks to everyone that has contributed so far.

And special thanks to our team member @fisker for doing most of the work on this project. We could not have gotten this far without him.

New rules

Improvements

  • template-indent: Set the rule error instead of warn in recommended preset (#1781) 09923af
  • prefer-json-parse-buffer: Remove from recommended preset (#1750) 93f49f2
  • no-array-for-each: Add fixer for parenthesized call (#1784) 5f39c37
  • no-array-for-each: Handle optional chaining (#1753) 1d32db4
  • prefer-object-from-entries: Stop checking unknown cases (#1771) 309771d
  • prefer-string-trim-start-end: Check optional chaining (#1768) 1920597
  • no-useless-undefined: Ignore arguments in Function#bind() (#1762) c501243
  • prefer-ternary: Skip fix if there are comments (#1763) 3013565
  • text-encoding-identifier-case: Auto-fix encoding in fs.{readFile,readFileSync}() (#1755) 5e1c932
  • Add dist and dst abbreviations (#1756) dffcea8

Fixes

  • no-array-for-each: Handle ChainExpression correctly (#1772) e615a37

v41.0.1...v42.0.0

v41.0.1

17 Mar 09:41
Compare
Choose a tag to compare

v41.0.0...v41.0.1

v41.0.0

16 Feb 16:20
Compare
Choose a tag to compare

New rules

Breaking

Fixes

  • prefer-export-from: Fix TypeScript compatibility (#1728) f14aa95
  • prefer-at: Remove auto-fix for arguments (#1705) bba518e

v40.1.0...v41.0.0

v40.1.0

16 Jan 06:54
Compare
Choose a tag to compare
  • expiring-todo-comments: Add date option (#1683) 16bc33a
  • consistent-function-scoping: Allow React.useHook (#1691) e910633
  • no-useless-undefined: Allow React.createContext(undefined) (#1688) 40bc603

v40.0.0...v40.1.0

v40.0.0

31 Dec 12:52
Compare
Choose a tag to compare

New rules

Improvements

  • prefer-object-has-own: Deprecate in favor of the built-in prefer-object-has-own rule (#1646) e59a856
  • filename-case: Ignore $ in filenames (#1628) a43a174
  • no-useless-promise-resolve-reject: Detect unnecessary Promise.resolve/reject in promise callback functions (#1666) f6215f3
  • prefer-export-from: Support import assertions (#1618) 1d7a6b6
  • prefer-top-level-await: Improve top-level expression detection (#1526) b054d65
  • prefer-dom-node-dataset: Check .hasAttribute() and .getAttribute() (#1673) 152f153
  • prefer-dom-node-dataset: Check .removeAttribute() (#1668) 22d8d03
  • prefer-string-slice: Improve fix (#1675) 267115a
  • prefer-math-trunc: Improve fix logic (#1670) 784c7a8
  • prefer-string-slice: Improve argument type detection (#1664) 03b0946
  • prefer-add-event-listener: Remove fix for onerror (#1650) 7bf63bb
  • no-array-push-push: Ignore process.{stdin,stdout,stderr} (#1654) 10ad699
  • no-new-array & no-new-buffer: Improve argument type detection (#1648) 9b04e43
  • no-array-for-each: Ignore pIteration.forEach (#1649) 2b92385
  • no-array-callback-reference: Ignore primitive wrappers in Array#map() (#1642) 0362c09
  • prefer-export-from: Support "string literal specifier" (#1636) 0866b41
  • template-indent: Check Jest inline snapshots by default (#1637) 64460e2

Fixes

  • prefer-dom-node-dataset: Fix name conversion (#1674) 7fb6f7b
  • prefer-export-from: Fix crash in TypeScript files (#1647) 1ff8e42

v39.0.0...v40.0.0

v39.0.0

21 Nov 11:58
Compare
Choose a tag to compare

New rules

Improvements

Fixes

  • no-empty-file: Fix false positive with triple-slash directives (#1605) 6354bb8
  • require-number-to-fixed-digits-argument: Ignore .toFixed from new expression (#1601) 20d61e7
  • prefer-export-from: Fix bug on fixing export namespace as default (#1583) b564ff1
  • Add missing additionalProperties to schema (#1589) 579d05d

v38.0.1...v39.0.0

v38.0.1

08 Nov 10:45
Compare
Choose a tag to compare
  • prefer-export-from: Ignore variables with type (#1580) ea49b21

v38.0.0...v38.0.1

v38.0.0

04 Nov 13:31
Compare
Choose a tag to compare

New rules

Improvements

  • Ignore Ramda methods in rules (#1557) 5f3bad5
  • no-array-callback-reference: Only ignore Boolean in reasonable places (#1570) 46f8638
  • require-array-join-separator: Check optional member (#1569) 15f9028

v37.0.1...v38.0.0

v37.0.1

12 Oct 04:49
Compare
Choose a tag to compare

v37.0.0...v37.0.1