Vue-tsc shows an error badge but reports 0 errors

1k Views Asked by At

After upgrading from NUXT 3 Release candidate to the latest and released version and making the changes I needed in order to get everything running smoothly, vue-tsc has started showing an error-badge just before reporting 0 errors.

Do I actually have any errors, or is there something else going on here?

Is it vue-tsc logging the badge, or something else?

[![enter image description here](https://i.stack.imgur.com/6rUlK.png)](https://i.stack.imgur.com/6rUlK.png)

Versions

  • Nuxt: 3.2.2

  • vue-tsc: 1.1.5

  • typescript: 4.8.3

Going back to Nuxt 3.0.9-rc along with downgrading vue-tsc removes the "error".

1

There are 1 best solutions below

1
On

I have the same issue with Nuxt 3.2.3 and vue-tsc 1.2.0. However, it raises only if I enable type check in development mode. I did this either by adding to nuxt.config.json the following option (like official Nuxt docs state here https://nuxt.com/docs/guide/concepts/typescript):

typescript: { typeCheck: true }

or with vite-plugin-checker and

checker({ vueTsc: true })

for vite.plugins property.

In both cases an ugly red ERROR badge followed by 0 errors is still there.

I haven't found any solution so I've just removed this in-dev check from nuxt.config.json and rely on:

  • my IDE which follows tsconfig.json rules anyways
  • pre-commit hook with explicit linting commands (eslint and nuxi typecheck in my case, though it can be vue-tsc --noEmit as well).

This way I can be sure no errors go to the repo while developers are still notified about them when writing their code.

I know this isn't an answer to your question (and probably not the best solution...) but just wanted to give more context for those who could probably clarify this one.