Releases: sindresorhus/eslint-plugin-unicorn
Releases · sindresorhus/eslint-plugin-unicorn
v20.0.0
Breaking
New rules
- Add
prefer-optional-catch-binding
rule (#671) efdb03a - Add
no-useless-undefined
rule (#718) 30dbe6d - Add
no-reduce
rule (#704) 06ed7ee
Improvements
throw-new-error
: CheckMemberExpression
customError (#716) a28aad5prefer-starts-ends-with
: Add auto-fix (#711) da978e3consistent-function-scoping
: Ignore IIFE (#707) 1f4413dprefer-set-has
: Ignore arrays only checking existence once (#706) 54c6f54
Fixes
v19.0.1
v19.0.0
New rules
Breaking
string-content
: Make it have no default patterns (#637) 08fad55catch-error-name
: ReplacecaughtErrorsIgnorePattern
option with anignore
option (#661) 5a27f04
Improvements
custom-error-definition
: Support class properties (#673) 9cc8d60catch-error-name
: SupportPromise#then
(#660) edcf73cprefer-set-has
: Supports more types of array (#641) 29f3c9c
Fixes
escape-case
: Fix missing characters (#678) d986427no-nested-ternary
: Fix incorrect result with TypeScript parser (#664) cb08ed0custom-error-definition
: Fix duplicated reports onthis.message
assign (#669) aa00647custom-error-definition
: Fix crash on@typescript-eslint/parser
(#659) e8cb921catch-error-name
: Improve error message (#665) 8ac9a90catch-error-name
: Fix error renaming (#654) cc2d1b1catch-error-name
: Only allow_
when it's not used (#650) 0c31a0bcatch-error-name
: Ignore destructuring (#649) b2838fd
v18.0.1
v18.0.0
New rules
- Add
prefer-number-properties
rule (#622) 8d8ce43 - Add
prefer-set-has
rule (#604) 9fa8de1
Improvements
- Add
ignore
option toexpiring-todo-comment
rule (#555) 08fabf6
Fixes
no-console-spaces
: Fix crash on string contains\n
(#629) 9cd01cdexplicit-length-check
: Ignore computedlength
ofMemberExpression
(#620) 418e072prefer-spread
: Insert semicolon in more cases (#615) de48b3dcatch-error-name
: KeeptypeAnnotation
when replacingidentifier
(#613) 446ff37prevent-abbreviations
: Fix crash onTypeParameter
with default value (#606) 2ef7a21prevent-abbreviations
: Add global variables check (#603) b5c0a12- Update
regexp-tree
to fix whitespace rewrite (#605) 2b78a17
v17.2.0
consistent-function-scoping
: Check use ofthis
andarguments
(#590) 8b417e6prevent-abbreviations
: Fix inappropriate suggestion (#592) 2e20294consistent-function-scoping
: Ignore within React hooks (#588) 7126d6dstring-content
: Ignore someTaggedTemplateExpression
(#585) 92f3f3dconsistent-function-scoping
: Display function name in error message (#589) e7e49ecconsistent-function-scoping
: Fix uninitialized variable check (#587) 4c48c02
v17.1.0
v17.0.1
v17.0.0
New rules
- Add
string-content
rule (off by default) (#496) 0972a89
Breaking
Improvements
- Improve
new-for-builtins
rule (#540) fdd96cb - Expand reporting for
prefer-node-remove
rule (#507) b6e6b32
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 onTypeScript-ESLint
(#560) e4f4bb4 - Fix
escape-case
missing cases (#534) 892f054 - Disable auto-fix
.onmessage
inprefer-add-event-listener
rule (#543) 96af562