eslint: Fix unicorn/error-message.

https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v24.0.0/docs/rules/error-message.md

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-12-22 02:23:33 -08:00 committed by Tim Abbott
parent 0c4239e387
commit 6acbcec39d
2 changed files with 2 additions and 2 deletions

View File

@ -237,7 +237,7 @@ exports.warn = function blueslip_warn(msg, more_info) {
exports.error = function blueslip_error(msg, more_info, stack) {
if (stack === undefined) {
stack = new Error().stack;
stack = new Error("dummy").stack;
}
const args = build_arg_list(msg, more_info);
logger.error(...args);

View File

@ -82,7 +82,7 @@ async function get_context(location: StackFrame): Promise<NumberedLine[] | undef
}
export async function display_stacktrace(error: string, stack: string): Promise<void> {
const ex = new Error();
const ex = new Error("dummy");
ex.stack = stack;
const stackframes: CleanStackFrame[] = await Promise.all(