From 73d833f0ceb735e69995b756b4c66ae93fcf8545 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 9 Sep 2024 23:23:30 +0200 Subject: [PATCH] chore: enable `noUncheckedSideEffectImports` (#28903) --- packages/nuxt/src/app/entry.ts | 2 ++ packages/ui-templates/styles.ts | 2 ++ tsconfig.json | 1 + 3 files changed, 5 insertions(+) diff --git a/packages/nuxt/src/app/entry.ts b/packages/nuxt/src/app/entry.ts index e60a48bd8f..7f29843c8c 100644 --- a/packages/nuxt/src/app/entry.ts +++ b/packages/nuxt/src/app/entry.ts @@ -2,6 +2,7 @@ import { createApp, createSSRApp, nextTick } from 'vue' import type { App } from 'vue' // This file must be imported first as we set globalThis.$fetch via this import +// @ts-expect-error virtual file import '#build/fetch.mjs' import { applyPlugins, createNuxtApp } from './nuxt' @@ -9,6 +10,7 @@ import type { CreateOptions } from './nuxt' import { createError } from './composables/error' +// @ts-expect-error virtual file import '#build/css' // @ts-expect-error virtual file import plugins from '#build/plugins' diff --git a/packages/ui-templates/styles.ts b/packages/ui-templates/styles.ts index 7f20ae0835..71cffbe488 100644 --- a/packages/ui-templates/styles.ts +++ b/packages/ui-templates/styles.ts @@ -1,2 +1,4 @@ +// @ts-expect-error untyped css file import '@unocss/reset/tailwind.css' +// @ts-expect-error untyped css file import 'uno.css' diff --git a/tsconfig.json b/tsconfig.json index 43fdd95674..ac3f465074 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,7 @@ "strict": true, // TODO: enable noUncheckedIndexedAccess // "noUncheckedIndexedAccess": true, + "noUncheckedSideEffectImports": true, "forceConsistentCasingInFileNames": true, "noImplicitOverride": true, /* If NOT transpiling with TypeScript: */