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.
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
Vetur config file RFC #2378
Vetur config file RFC #2378
Changes from 9 commits
234e630
1b7b439
1bff568
d4df749
2a3858c
cb77392
e2c6396
27a8a37
04dfb56
a06587a
0ea29db
156cb96
dbc38bf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repos
is more connected to git repositories, and I get it, it's coming from monorepos but I feel it's not conveying the purpose.Suggestion: We can call it
projects
. (typescript has project references and that makes it some what similar)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe workspaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
projects
is better.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the "workspaces" name or maybe workingDirectories (stolen from eslint extension 😜)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workspaces also sounds good as package managers have those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
workspaces
word is also used for multi roots in VSCode.It's a bit confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as it's clear what it meant, it's ok, so +1 for projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably also allow a shorthand form, so
Where
string
value isroot
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good idea.
I changed the RFC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
"extends"
option to share configurations?e.g.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what this setting means.
I think if we're going to share configurations, we can only use JS. Like
require
.PS. When you use
vuetify
on package.json, we use component date to completion.So you don't really need to define
vuetify
here!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to tsconfig but it doesn't makes sense in cjs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@znck I don't feel we need this. When you have:
vuetify
listed in pointed package.json's dependenciesnode_modules/vuetify/package.json
hasvetur
keyEverything should work from there.
Unless you meant something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to support opt-in for external global components. (user can register, only a few components)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@znck What's a use case for that? If I understand you correctly, do you mean for the case when you have 2 UI lib and only want auto-completion for one of them (or only a few components out of a full library)? I feel there isn't much downside to just registering a whole library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly for type checking global components. If it's opt-in you can control what components are allowed globally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to use cjs directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think there's no point in adding an external lib.
We don't know the details of external libs.
It may be difficult to get the correct TypeScript type when no correct
tsconfig.json
.I would be inclined to expand the support for component data.
Let it have a type of marker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the TS plugin, I am using this to infer component meta. (It has a different structure compared to vetur's spec but includes verbose static information).