Skip to content

Releases: sindresorhus/eslint-plugin-unicorn

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

v34.0.1

30 Jun 09:43
Compare
Choose a tag to compare
  • no-array-method-this-argument: Fix false positives (#1386) d364d67

v34.0.0...v34.0.1

v34.0.0

28 Jun 10:44
Compare
Choose a tag to compare

New rules

Improvements

  • prefer-module: Ignore .cjs files (#1355) ebdc3c2
  • error-message: Support AggregateError (#1351) e7b4300
  • filename-case: Enforce lowercased file extension (#1336) 119615b
  • expiring-todo-comments: More helpful error when no conditions (#1375) 914a996
  • prefer-array-some and prefer-regexp-test: Support Vue SFC (#1364) a46050e
  • explicit-length-check: Support v-show directive (#1363) f163c4a
  • explicit-length-check: Support Vue SFC files (#1360) 9199611
  • prefer-type-error: Improve report location (#1354) bc3d58b
  • no-useless-undefined: Ignore Set#add() Map#set() Array#{push,unshift}() (#1353) c6359c3
  • prefer-prototype-methods: Only check methods from [] and {} (#1347) 29a4e75
  • prefer-array-some: Report non-zero check on array.filter().length (#1337) f8aaac2
  • Use context.getPhysicalFilename() (#1344) e2540cb

Fixes

  • prefer-array-find and prefer-at: Fix crash on LHS zero index access (#1373) da1f6d8
  • prefer-prototype-methods: Fix a missing condition on object literal check (#1332) cec7f11

v33.0.1...v34.0.0

v33.0.1

03 Jun 09:49
Compare
Choose a tag to compare
  • prefer-prototype-methods: Ignore known object literal methods (#1330) 639e7af

v33.0.0...v33.0.1

v33.0.0

02 Jun 09:40
Compare
Choose a tag to compare

New rules

Improvements

  • no-array-for-each: Handle only return statement inside if or else (#1319) 298a104
  • new-for-builtins & no-new-buffer: Handle line breaks after new keyword (#1301) d37439f
  • prefer-array-flat-map: Remove check on [].concat(...array.map(…)) (#1299) 128b5aa
  • prefer-spread: Ignore {arrayBuffer,blob,buffer,file,this}.slice() (#1287) e18d5f2
  • prefer-string-starts-ends-with: Add suggestions for safely handling non-strings (#1277) f14a9d1
  • explicit-length-check: Ignore this.{size,length} (#1289) ed85d00
  • prefer-string-starts-ends-with-rule: Don't autofix known non-string values (#1281) a1c8984
  • explicit-length-check: Ignore known, non-number length properties (#1264) 42f6487
  • empty-brace-spaces: Support experimental syntax (#1276) fa68b6f
  • prefer-dom-node-remove: Improve parentheses handling (#1254) 74e4d39

Fixes

  • prefer-array-flat: Fix incorrect fix, check Array.prototype.concat.call (#1317) f6a939c

v32.0.1...v33.0.0