Skip to content

Releases: sindresorhus/eslint-plugin-unicorn

v20.0.0

13 May 07:06
Compare
Choose a tag to compare

Breaking

New rules

Improvements

  • throw-new-error: Check MemberExpression customError (#716) a28aad5
  • prefer-starts-ends-with: Add auto-fix (#711) da978e3
  • consistent-function-scoping: Ignore IIFE (#707) 1f4413d
  • prefer-set-has: Ignore arrays only checking existence once (#706) 54c6f54

Fixes

  • prefer-starts-ends-with: Fix bug with m flag (#721) 83bbabc
  • prefer-string-slice: Handle negative length in .substr() (#709) 7439465

v19.0.1...v20.0.0

v19.0.1

26 Apr 03:28
Compare
Choose a tag to compare
  • no-fn-reference-in-iterator: Ignore this. and Vue.filter (#699) b02a9c6
  • no-fn-reference-in-iterator: Ignore cases obviously not a function reference (#697) dae5107

v19.0.0...v19.0.1

v19.0.0

25 Apr 15:15
Compare
Choose a tag to compare

New rules

Breaking

  • string-content: Make it have no default patterns (#637) 08fad55
  • catch-error-name: Replace caughtErrorsIgnorePattern option with an ignore option (#661) 5a27f04

Improvements

  • custom-error-definition: Support class properties (#673) 9cc8d60
  • catch-error-name: Support Promise#then (#660) edcf73c
  • prefer-set-has: Supports more types of array (#641) 29f3c9c

Fixes

  • escape-case: Fix missing characters (#678) d986427
  • no-nested-ternary: Fix incorrect result with TypeScript parser (#664) cb08ed0
  • custom-error-definition: Fix duplicated reports on this.message assign (#669) aa00647
  • custom-error-definition: Fix crash on @typescript-eslint/parser (#659) e8cb921
  • catch-error-name: Improve error message (#665) 8ac9a90
  • catch-error-name: Fix error renaming (#654) cc2d1b1
  • catch-error-name: Only allow _ when it's not used (#650) 0c31a0b
  • catch-error-name: Ignore destructuring (#649) b2838fd

v18.0.1...v19.0.0

v18.0.1

27 Mar 07:21
Compare
Choose a tag to compare
  • prefer-number-properties: Fix suggestion description (#635) d410ca3

v18.0.0...v18.0.1

v18.0.0

26 Mar 12:51
Compare
Choose a tag to compare

New rules

Improvements

Fixes

  • no-console-spaces: Fix crash on string contains \n (#629) 9cd01cd
  • explicit-length-check: Ignore computed length of MemberExpression (#620) 418e072
  • prefer-spread: Insert semicolon in more cases (#615) de48b3d
  • catch-error-name: Keep typeAnnotation when replacing identifier (#613) 446ff37
  • prevent-abbreviations: Fix crash on TypeParameter with default value (#606) 2ef7a21
  • prevent-abbreviations: Add global variables check (#603) b5c0a12
  • Update regexp-tree to fix whitespace rewrite (#605) 2b78a17

v17.2.0...v18.0.0

v17.2.0

11 Mar 10:33
Compare
Choose a tag to compare
  • consistent-function-scoping: Check use of this and arguments (#590) 8b417e6
  • prevent-abbreviations: Fix inappropriate suggestion (#592) 2e20294
  • consistent-function-scoping: Ignore within React hooks (#588) 7126d6d
  • string-content: Ignore some TaggedTemplateExpression (#585) 92f3f3d
  • consistent-function-scoping: Display function name in error message (#589) e7e49ec
  • consistent-function-scoping: Fix uninitialized variable check (#587) 4c48c02

v17.1.0...v17.2.0

v17.1.0

10 Mar 04:07
Compare
Choose a tag to compare
  • Allow descriptive error names by default in catch-error-name rule (#581) 7bd8687

v17.0.1...v17.1.0

v17.0.1

08 Mar 18:14
Compare
Choose a tag to compare

v17.0.0...v17.0.1

v17.0.0

08 Mar 11:22
Compare
Choose a tag to compare

New rules

Breaking

  • Rename regex-shorthand rule to better-regex (#522) a5e5405

Improvements

Fixes

  • prefer-spread: Insert semicolon if needed (#578) 49c4acf
  • Fix prefer-negative-index crash on not enough arguments (#564) 50e038c
  • Fix scope compare in consistent-function-scoping (#562) ec4387c
  • Fix no-new-buffer crash on TypeScript-ESLint (#560) e4f4bb4
  • Fix escape-case missing cases (#534) 892f054
  • Disable auto-fix .onmessage in prefer-add-event-listener rule (#543) 96af562

v16.1.1...v17.0.0

v16.1.1

12 Feb 08:24
Compare
Choose a tag to compare
  • Fix escape-case fixer bug on template literals (#525) cb24d44

v16.1.0...v16.1.1