Releases: sindresorhus/eslint-plugin-unicorn
Releases · sindresorhus/eslint-plugin-unicorn
v9.1.1
v9.1.0
Enhancements
- Apply the
escape-case
rule to regex literals and remove transformation of\c
escape on string literals (#294) 79748e1 - Add
BigInt
type to thenew-for-builtins
rule (#310) e17f0fd
Fixes
- Do not warn if
.flat()
has more than one parameter or if the one parameter is not1
(#317) 6f10722 custom-error-definition
: Cover exports name (#313) 3f2e9a6
Meta
v9.0.0
Breaking
New rules
- Add
prefer-event-key
rule (#226) 9bede78 - Add
prefer-flat-map
rule (#284) d440daa
Enhancements
- Add
cases
option to thefilename-case
rule (#291) 43a6e9a - Make the
no-for-loop
rule handle more cases (#297) 3c0c7b9 - Make the
import-index
rule handle more cases (#293) f0c0a4f
Fixes
v8.0.2
v8.0.1
v8.0.0
This release is focused on helping you write more readable code and to adopt modern APIs. My favorite is the prevent-abbreviations
rule, which encourages you to pick readable variable names.
New rules
- Add
prevent-abbreviations
rule (#237) 76ff30e - Add
no-for-loop
rule (#221) b94ab9a - Add
no-zero-fractions
rule (#244) 75b8192 - Add
prefer-includes
rule (#214) a330d74 - Add
prefer-text-content
rule (#223) c493115 - Add
prefer-node-remove
rule (#222) fda5517
Enhancements
- Add
meta.type
to rules (#241) 610a901 - Add
excludedPackages
option to theprefer-add-event-listener
rule (#235) f141a4c - Add event clearing to
prefer-add-event-listener
rule (#216) 7503d12
Fixes
- Fix the default value for the
filename-case
rule 139ac16 - Fix ES2015 exports not counting an object as used (#217) 6d5bb10
- Fix
catch-error-name
fixer not renaming all references in.catch
case (#258) c2e4a9d - Don't fix
onbeforeunload
unless it's handler does not return anything (#218) db2f192 - Prevent false-positives in the
no-fn-reference-in-iterator
rule (#172) 73e8d5d
v7.1.0
v7.0.0
- Add
prefer-query-selector
rule (#198) a44e16c - Add
prefer-node-append
rule (#201) 9da5e6a - Add
no-unused-properties
rule (#195) 0179443 - Add
no-unreadable-array-destructuring
rule (#199) 62c51a7 - Add
no-console-spaces
rule (#191) 5dd529f - custom-error-definition - Fix null reference (#188) cf3e22d
- Support parsing ES2019 42e1af8
It's a major release as the recommended config received new rules which could potentially break your build.
v6.0.1
v6.0.0
- Add
prefer-exponentiation-operator
rule. (#185) 9f7f811 - Change the default
name
option of thecatch-error-name
rule to beerror
instead oferr
. 7a1f1a1 - Re-enable the
catch-error-name
rule. 341ee3a - Include the plugin itself in the recommended preset. a41a77b
regex-shorthand
rule: Escape backslash and apostrophe. (#183) 8a50f40filename-case
rule: Survive missing options block. (#184) 2283cda