missingCaptureStackTraceCall 'Error.captureStackTrace' on this error before throwing it so the stack trace points to the throw site.small-rules/require-throw-error-captureRequire 'Error.captureStackTrace' before directly throwing new Error instances in named functions.
missingCaptureStackTraceCall 'Error.captureStackTrace' on this error before throwing it so the stack trace points to the throw site.This rule accepts one options object after the severity.
function foo() { throw new Error('bad');}After auto-fix
function foo() { const error = new Error('bad');Error.captureStackTrace(error, foo);throw error;}function good() { const err = new Error('msg'); Error.captureStackTrace(err, good); throw err;}