-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
Rule Proposal: sfc-language #1458
Comments
I find it very useful, I'd definitely use it. |
I looked around a while ago to see if it was feasible for me to implement this. It seems this would require more information from the vue parser, as there is little info of the top level tag attributes @ota-meshi is that a correct finding? |
Came here looking for a solution to this very "problem". I think if this were to be implemented it could be a good idea to allow for multiple languages to be configured per block. Say for example you use both SCSS and CSS. {
"script": ["scss", "css"]
} |
Please describe what the rule should do:
Limit the languages used in all Vue SFC files for template, script and style blocks.
What category should the rule belong to?
[ ] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ X] Other (please specify:)
Enforces code language.
Provide 2-3 code examples that this rule should warn about:
Using rule config:
Additional context
We're using Typescript and Vue SFC files, but it is very easy to create a new component file and forget to add a
lang="ts"
attribute to the script tag, and missing out on some type checking.We also use
<style lang="scss">
.The text was updated successfully, but these errors were encountered: