Releases: sindresorhus/eslint-plugin-unicorn
Releases · sindresorhus/eslint-plugin-unicorn
v11.0.1
v11.0.0
New rules
- Add
expiring-todo-comments
rule (#302) 6b6cee5 - Add
no-nested-ternary
rule (#296) 767fa8d - Add
consistent-function-scoping
rule (#309) 91bbff5 - Add
prefer-reflect-apply
rule (#239) 0b9c0fe - Add
prefer-dataset
rule (#225) 0910972
Enhancements
- Add more replacements to the
prevent-abbreviations
rule: 9b81e11 8ff4d91 dc8841a f500437param
→parameter
params
→parameters
cur
→current
curr
→current
acc
→accumulator
dir
→direction
- Add
BigInt64Array
andBigUint64Array
types to thenew-for-builtins
rule (#353) e7ff2de - Add support for
isBigInt
type check to theprefer-type-error
rule (#356) 186abd3 - Refactor the
prevent-abbreviations
rule to handle more cases (#337) 9db361f
Fixes
v10.0.0
Breaking
New rules
Enhancements
- Add
checkFilenames
option to theprevent-abbreviations
rule (#336) 4c3d61c - Allow disabling of
xo/no-abusive-eslint-disable
via a comment (#308) 0fb6fcf - prefer-flat-map: Report for common concat pattern (#323) c2b8e76
Fixes
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