metamigo-common: build, fmt, lint

This commit is contained in:
Abel Luck 2023-03-13 11:46:12 +00:00
parent 2a1ced5383
commit 75fb3f84c4
21 changed files with 95 additions and 156 deletions

View file

@ -1,7 +1,9 @@
import pino, { LoggerOptions } from "pino";
import { IMetamigoConfig } from "./config";
export const getPrettyPrint = <T extends IMetamigoConfig>(config: T): boolean => {
export const getPrettyPrint = <T extends IMetamigoConfig>(
config: T
): boolean => {
const { prettyPrint } = config.logging;
if (prettyPrint === "auto") return config?.isDev || false;
return prettyPrint === true;