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
Use correct parser plugins for TS and Vue #91
Use correct parser plugins for TS and Vue #91
Changes from 5 commits
0c3be1b
37f3deb
65b7530
b6ed0c0
2d4be8f
45f6855
c975b6b
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.
I’m uncomfortable with injecting
decorators
, because I’ve seen people fork every plugin. I worry that we’ll always be injecting decorators-legacy.I’d be less uncomfortable if you were to shift this logic into the conditional-injection of the
‘typescript’
plugin. (Move the latter if-block to line 77).I’d be least uncomfortable if this logic only happened if users omitted
importOrderParserPlugins
entirely. Then we definitely have permission to do automatic behavior. — If users are passing us plugins, I worry that manipulating it could only lead to more, painful errors.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.
One problem we have is that we always inject
typescript
andjsx
, and there's no way to know whether it was us or the user who did it. I'd like to get to the point where we can remove those defaults and be smart about when we default to various plugins, but I'm not all the way there yet. I'll see what it would take to do that as part of 4.0.As for the decorators specifically, that was something I copied straight from vue (see vuejs/vue@326d24a). I'm not a vue user, so I'm not sure why it's important to include a decorator plugin, but I think it might be related to the older class-based component definition in Vue 2: https://v2.vuejs.org/v2/guide/typescript.html#Class-Style-Vue-Components.
So, I'm happy to remove the injection of the decorators plugin. Are you okay with the rest of it staying as-is?