fix(typecheck): use resolve vue-tsc
and typescript
path
#264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is motivated by the removal of shameless hoisting in Nuxt 🎉
It replaces the custom
tryResolveModule
utility with the export from@nuxt/kit
. I hope it's synonymous 🙏Also, more importantly, it reworks the resolution of
vue-tsc
. Background being: imagine a layer definingvue-tsc
andtypescript
asdependency
(notdevDependency
!) so that projects using that layer do not have to importvue-tsc
themself but can lint right away.To achieve that - I tested it with one of my projects - I was able to make⚠️
vue-tsc
discoverable by calling the function withoutcwd
and with/bin/vue-tsc.js
suffix instead of/package.json
I hope this PR is a helpful contribution. If I got something wrong, just tell me, no worries, I'm always willing to learn! ❤️