From 04fdacb4f7c3f934601b97ba2867d26058b9905e Mon Sep 17 00:00:00 2001 From: Mister-Hope Date: Tue, 11 Feb 2025 17:43:43 +0800 Subject: [PATCH] chore: tweaks --- tools/shiki-twoslash/src/node/transformerTwoslashFactory.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/shiki-twoslash/src/node/transformerTwoslashFactory.ts b/tools/shiki-twoslash/src/node/transformerTwoslashFactory.ts index f9034da00..b16d2be3c 100644 --- a/tools/shiki-twoslash/src/node/transformerTwoslashFactory.ts +++ b/tools/shiki-twoslash/src/node/transformerTwoslashFactory.ts @@ -38,10 +38,8 @@ export const transformerTwoslashFactory = async ( const shouldThrow = // respect user option options.throws ?? - // ci env - process.env.CI ?? - // production env - process.env.NODE_ENV === 'production' + // in CI or production mode + (process.env.CI || process.env.NODE_ENV === 'production') const onError = (error: unknown, code: string): string => { logger.error(