eslint vs typescript 5.4
5.4.3 is being pulled by nuxt but eslint doesn't like it even if I explictly install the latest
vite-plugin-eslint@latest
and @typescript-eslint/typescript-estree
. any idea what else needs upgrading?
13 Replies
just wait until typescript-estree will get an update I'd say 🙂
I had assumed nuxt developers wouldn't have pushed into 5.4.x territory before eslint would support it. but if everyone else is getting the same message I'll just wait 🙂
5.4 support was added in v7.2 (7.4 is latest) so it’s likely estree hasn’t updated given its way down the dependency tree. I’d nuke your lock file and node_modules to refresh, and try again.
I tried nuking the lock file and deleting every node_modules directory, and explicitly installing typescript 5.3.3. same issue.
and tried the other way, explicitly installing
[email protected]
and @typescript-eslint/[email protected]
and again deleting the lock file and every node_modules directory. no luck.
could it be pnpm's fault?Not sure. I use pnpm also, but I don’t have these issues. Might be an issue exclusive to the vite plugin? I don’t use it.
how do you lint/reformat?
With eslint. Linting rules are afforded by
@nuxt/eslint-config
and formatting I extend with additional rules.I use the same rules. I'll disable the vite plugin and trust the IDE's eslint plugin for to save things tidy
Check this out for more info https://github.com/nuxt/eslint
GitHub
GitHub - nuxt/eslint: Collection of ESLint-related packages for Nuxt
Collection of ESLint-related packages for Nuxt. Contribute to nuxt/eslint development by creating an account on GitHub.
so,
vite-plugin-eslint
hasn't been touched in 2 years, so I should be using a fork instead. @nabla/vite-plugin-eslint
nope. wronghttps://github.com/nuxt/eslint/releases beta.7 is newer than beta.8 😭
GitHub
Releases · nuxt/eslint
Collection of ESLint-related packages for Nuxt. Contribute to nuxt/eslint development by creating an account on GitHub.
I found the root problem, I was using
@nuxtjs/eslint-module
instead of @nuxt/eslint
as module
and remove all references to vite-plugin-eslint
thank you the link @cuebit 🙂
it took me too long to see my mistake 😕Glad you found a solution in the end!