From 5ce82e21bf48647d0ac37bfc8a2111b3baca7dc9 Mon Sep 17 00:00:00 2001 From: sapphi-red Date: Fri, 20 Jan 2023 14:51:28 +0900 Subject: [PATCH] chore: try ts-ignore jest --- packages/vite/src/node/ssr/ssrModuleLoader.ts | 3 ++- packages/vite/src/node/utils.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/vite/src/node/ssr/ssrModuleLoader.ts b/packages/vite/src/node/ssr/ssrModuleLoader.ts index 2b09bc050603ff..7cad4f5d274e63 100644 --- a/packages/vite/src/node/ssr/ssrModuleLoader.ts +++ b/packages/vite/src/node/ssr/ssrModuleLoader.ts @@ -256,7 +256,8 @@ async function nodeImport( importer, // Non-external modules can import ESM-only modules, but only outside // of test runs, because we use Node `require` in Jest to avoid segfault. - // @ts-expect-error jest only exists when running Jest + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore jest only exists when running Jest typeof jest === 'undefined' ? { ...resolveOptions, tryEsmOnly: true } : resolveOptions, diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index 13ef1c8c91326e..a281e2862b4b39 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -918,7 +918,8 @@ export const multilineCommentsRE = /\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g export const singlelineCommentsRE = /\/\/.*/g export const requestQuerySplitRE = /\?(?!.*[/|}])/ -// @ts-expect-error jest only exists when running Jest +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore jest only exists when running Jest export const usingDynamicImport = typeof jest === 'undefined' /**