Releases: sindresorhus/eslint-plugin-unicorn
Releases · sindresorhus/eslint-plugin-unicorn
v19.0.0
New rules
Breaking
string-content: Make it have no default patterns (#637) 08fad55catch-error-name: ReplacecaughtErrorsIgnorePatternoption with anignoreoption (#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.messageassign (#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-propertiesrule (#622) 8d8ce43 - Add
prefer-set-hasrule (#604) 9fa8de1
Improvements
- Add
ignoreoption toexpiring-todo-commentrule (#555) 08fabf6
Fixes
no-console-spaces: Fix crash on string contains\n(#629) 9cd01cdexplicit-length-check: Ignore computedlengthofMemberExpression(#620) 418e072prefer-spread: Insert semicolon in more cases (#615) de48b3dcatch-error-name: KeeptypeAnnotationwhen replacingidentifier(#613) 446ff37prevent-abbreviations: Fix crash onTypeParameterwith default value (#606) 2ef7a21prevent-abbreviations: Add global variables check (#603) b5c0a12- Update
regexp-treeto fix whitespace rewrite (#605) 2b78a17
v17.2.0
consistent-function-scoping: Check use ofthisandarguments(#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-contentrule (off by default) (#496) 0972a89
Breaking
Improvements
- Improve
new-for-builtinsrule (#540) fdd96cb - Expand reporting for
prefer-node-removerule (#507) b6e6b32
Fixes
prefer-spread: Insert semicolon if needed (#578) 49c4acf- Fix
prefer-negative-indexcrash on not enough arguments (#564) 50e038c - Fix scope compare in
consistent-function-scoping(#562) ec4387c - Fix
no-new-buffercrash onTypeScript-ESLint(#560) e4f4bb4 - Fix
escape-casemissing cases (#534) 892f054 - Disable auto-fix
.onmessageinprefer-add-event-listenerrule (#543) 96af562
v16.1.1
v16.1.0
v16.0.0
Breaking
- Require Node.js 10 d2ffe2c
New rules
- Add
prefer-replace-allrule (#488) d98c277
Improvements
- Allow disabling of regexp character sorting in the
regex-shorthandrule (#468) fb0268b - Deprecate our
prefer-exponentiation-operatorrule in favor of the built-in ESLint rule (#484) c4ffb1a - Improve
number-literal-caserule (#490) cea1346
Fixes
- Fix
expiring-todo-commentscrashing on invalid package version (#494) fd46adc - Fix invalid autofix with array destructuring in
no-for-loopsrule (#489) 94345a3 prefer-modern-dom-apis: Only fix when expression is not used (#503) 096feadprefer-node-remove: Only fix when expression is not used (#498) b1d3f37