Home > Enterprise >  Nuxt3 - Ignore Type checking for few files
Nuxt3 - Ignore Type checking for few files

Time:11-11

I'm working on a Nuxt3 project, and I want to ignore type checking for few files. I use UnoCSS and for UnoCSS configuration I create unocss.config.ts file and in this config file I extend the fontSize but it gave type error.
Anyone knows how can I ignore few files for type checking?

enter image description here

I also add exclude unocss.config.js in tsconfig.json

Here's the tsconfig.json code

{
  // https://v3.nuxtjs.org/concepts/typescript
  "extends": "./.nuxt/tsconfig.json",
  "exclude": [
    "unocss.config.ts"
  ]
}

CodePudding user response:

You could put // @ts-nocheck at the top of the file, as explained here.

PS: Otherwise, renaming it to .js doesn't work? Not sure.

  • Related