-
-
Notifications
You must be signed in to change notification settings - Fork 48
New rule: block-lang
#380
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
Comments
Thank you for suggesting the new rule. I think it's similar to |
That's a great catch, I'll try to come up with a better proposal :) Also, The question I am thinking about is how to handle multiple values having the same effect:
|
Hi, @ota-meshi - I tried to design a more general rule, could you please take a look? It breaks the options format you set in vue, but this seems a little bit more easily usable to me - am I missing something? Regarding the 2 questions I posted previously:
|
Thank you for the question.
Yeah,I don't think normalization is necessary.
I think using |
Motivation
This rule disallows the use of languages other than those available in your application for the lang attribute of block elements.
On top of that, this would complement #345, #346 and #347
Description
This rule would report all components not in the given language.
Rule configuration example:
So you can set for both
<script>
and<style>
blocks a list of allowed languages (wherenull
means no language set). Default value would be{script: null, style: null}
- using a shorthand omitting the array would be allowed like thisExamples
with
{script: ["ts", "typescript"]}
:with
{script: ["js", "null"]}
:Additional comments
No response
The text was updated successfully, but these errors were encountered: