Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Nuxt3 – Ignore Type checking for few files

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Here’s the tsconfig.json code

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

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading