-
-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vue-tsc
throws unused variable error while tsc
does not
#4575
Comments
What if you change that rule to |
Yeah, just tried it. Oddly though, if I remove the rule completely, tsc goes back to just giving a warning. Could've sworn error was the default. There's also the vanilla Though, knowing nothing, my guess is that vue-tsc just doesn't support ESLint v9 yet because it only came out a few months ago? If that's the case, I figured this could be the issue to track v9 support. |
Just curious, did it support v8? Another view is that |
Ah okay, I saw this: typescript-eslint/typescript-eslint#8211 But since it was closed as completed, I had assumed it was in a stable release, but it's not. I tried force-installing typescript-lint v8 (alpha), and vue-tsc still threw an error even with that rule on warn. I'm having a hard time following the thread of package dependencies here. Looks like in my lockfile I have v7, coming from vuejs/eslint-config-typescript#76 So perhaps when that package upgrades its dependencies, this issue will go away. Not sure if there's anything to be done in the |
I don't think tsc will read your eslint config. You should configure it in |
Sorry, I've confused myself on the different parts of this. This has nothing to do with ESLint I guess. I'll rename the issue accordingly. I think it comes down to the issue of Thanks for your help. |
vue-tsc
ignoring ESLint v9 eslint.config.mjs
config file? vue-tsc
throws unused variable error while tsc
does not
Tsc doesn't run on |
I suppose my brain just isn't working today. Feel free to straight up delete this issue. Not sure it has any value and might end up making someone confused. |
Never mind! As long as your problem is solved, everything is fine. |
Vue - Official extension or vue-tsc version
2.0.26
VSCode version
n/a (1.91.0)
Vue version
3.4.31
TypeScript version
5.5.3
System Info
No response
Steps to reproduce
I have the following ESLint config, in the ESLint v9.0.0
eslint.config.mjs
file format. It specifies that unused variables should be a warning, not an error.But running
vue-tsc
, it seems to ignore the configuration and throw an error for unused vars.I have another
package.json
script for testing types that usestsc --noemit
, and it correctly flags it as a warning.What is expected?
vue-tsc
should respect ESLint v9 config in my repo, liketsc
does.What is actually happening?
vue-tsc
seems to ignore the config file (at least for this one rule).Link to minimal reproduction
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: