- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 427
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
[Regression] vue-tsc
false positive with noUnusedLocals: true
#1168
Comments
@johnsoncodehk this bug is back on 0.40.1, this time it occurs to function binding to event, happens to SFC with script setup. EDITED it actually occurs to any bindings, variables, functions etc... |
@ahnpnl I can't reproduce this problem, and the repro seems not exist any more. If you can contribute a test case or provide minimal reproduction it will be helpful. |
Here is the one https://github.com/ahnpnl/volar-starter-vite/tree/bug/no-unused-option :) |
@ahnpnl Just In case you missed it, you can also update tsconfig to avoid this problem in v0.40.1. {
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
+ "jsx": "preserve",
"noEmit": true,
"strict": true,
"sourceMap": true,
"allowJs": true,
"skipLibCheck": true,
"useDefineForClassFields": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"forceConsistentCasingInFileNames": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"importsNotUsedAsValues": "error",
"lib": ["esnext", "dom"],
"types": ["vite/client"]
},
- "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx"]
+ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
} |
Summary
Setting
noUnusedLocals: true
intsconfig
madevue-tsc
produce false positive type check for object destructuring with template accessing viaref
.Reproduce steps
yarn
App.vue
to see the example codesyarn type-check
and observe the errorExtra information
This is a regression since 0.34.4
The text was updated successfully, but these errors were encountered: