Skip to content

Releases: sindresorhus/eslint-plugin-unicorn

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

v37.0.0

11 Oct 12:45
Compare
Choose a tag to compare

New rules

Improvements

v36.0.0...v37.0.0

v36.0.0

11 Sep 04:27
Compare
Choose a tag to compare

New rules

Improvements

  • Add all config (#1512) a512ad1
    • This config includes all the rules, except deprecated ones.
  • prefer-spread: Check String#split('') (#1489) d51a197
  • prefer-module: Use suggestions for 'use strict' directive (#1470) 57c7906
  • error-message: Handle shadowed Error constructor (#1496) fdadd88

Fixes

  • prefer-spread: Fix false negative on array constants (#1474) 4162145

v35.0.0...v36.0.0

v35.0.0

03 Aug 14:49
Compare
Choose a tag to compare

New rules

Breaking

  • explicit-length-check: Remove greater-than-or-equal option (#1397) db1a2b5
    • It enabled a style that no one actually uses.

Improvements

  • no-array-reduce: Add allowSimpleOperations option (#1418) 153eb2c
  • no-array-callback-reference: Ignore jQuery methods (#1457) 7af9a6f
  • prevent-abbreviations: Ignore i18n and l10n (#1445) efdd90e
  • no-array-callback-reference: Ignore mobx-state-tree usage (#1455) 73c0dfd
  • new-for-builtins: Check WeakRef and FinalizationRegistry (#1450) fce9d1d
  • no-zero-fractions: Handle .0 correctly (#1444) fcca35d
  • new-for-builtins: Enforce new for SharedArrayBuffer and Proxy (#1438) 2ba83ad
  • no-null: Allow Object.create(null, …) (#1432) 768f301
  • number-literal-case: Support Vue SFC (#1434) ee9f609
  • no-object-as-default-parameter: Forbid destructuring (#1433) 3fcc4bb
  • prefer-spread: Better auto-fix (#1426) 7bdf0dd
  • prefer-array-some: Check cases comparing .find() with undefined (#1422) 3dc2f77
  • no-useless-spread: Check useless "iterable to array" (#1414) 61bc6a3
  • prefer-dom-node-text-content: Check destructuring, Use suggestion instead of auto-fix (#1417) c4bfc42
  • require-post-message-target-origin: Disable for TypeScript files (#1415) 741484a
  • prefer-add-event-listener: Update event types list (#1412) 7f88b2f
  • no-instanceof-array: Support Vue SFC (#1410) 3b22917
  • prevent-abbreviations: Add def (#1402) f783472
  • no-instanceof-array: Improve report location (#1389) 6512fbd
  • Use original quote when auto-fixing (#1411) bb81582

Fixes

v34.0.1...v35.0.0