Skip to content
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

Support vue mustache expressions via defineTemplateBodyVisitor #767

Closed
bradzacher opened this issue Jul 28, 2019 · 3 comments
Closed

Support vue mustache expressions via defineTemplateBodyVisitor #767

bradzacher opened this issue Jul 28, 2019 · 3 comments
Labels
enhancement New feature or request package: parser Issues related to @typescript-eslint/parser

Comments

@bradzacher
Copy link
Member

Following on from #760 (comment)

For better interop with vue, we might want to look at implementing defineTemplateBodyVisitor.
https://github.com/mysticatea/vue-eslint-parser/blob/0f241279dc412ff4bb0faa9211233a944465f9b4/README.md#L93-L99

This will let plugins provide linting for vue expressions.

@bradzacher bradzacher added enhancement New feature or request package: parser Issues related to @typescript-eslint/parser labels Jul 28, 2019
@uniqueiniquity
Copy link
Contributor

FWIW, I'm not sure that this is a parser issue, but rather a plugin issue. From what I can tell, it has to be used in each rule. Would be curious to hear from @mysticatea why it's used instead of the built-in visitorKeys feature.

@mysticatea
Copy link
Member

Because to not break the core rules.

Vue.js templates have interpolations, floating JavaScript expressions, then those confuse the core rules seriously. Therefore, we have to separate the template's AST from the script.

@bradzacher
Copy link
Member Author

interesting, that makes sense.

Is this something we should ignore entirely then from our end, or are there some cases we could potentially be supporting from within our plugin?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request package: parser Issues related to @typescript-eslint/parser
Projects
None yet
Development

No branches or pull requests

3 participants