Check throw Object.assign(Error('...'), ...)
in throw-new-error
#2320
Labels
throw Object.assign(Error('...'), ...)
in throw-new-error
#2320
Sometimes it's useful to attach additional information to the error, so I use
throw Object.assign(Error('...'), ...)
.throw-new-error
should report on this use case.I haven't checked, but other error related rules like
prefer-type-error
,error-message
should aware this pattern too.The text was updated successfully, but these errors were encountered: