logger-util: Avoid no-fallthrough warnings.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-06-26 16:01:21 -07:00
parent c9249b1724
commit 1c60c335fd

View File

@@ -89,20 +89,21 @@ export default class Logger {
nodeConsole, timestamp, level, logInDevMode
} = this;
/* eslint-disable no-fallthrough */
switch (true) {
case typeof timestamp === 'function':
args.unshift(timestamp() + ' |\t');
// Fall through
case (level):
args.unshift(type.toUpperCase() + ' |');
// Fall through
case isDev || logInDevMode:
nodeConsole[type](...args);
break;
default: break;
default:
}
/* eslint-enable no-fallthrough */
console[type](...args);
}