-
-
Notifications
You must be signed in to change notification settings - Fork 681
vue/no-bare-strings-in-template: per-component ignoring of slot content #2613
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
As a workaround, you can use the plain text whitelist Providing a new option to ignore slots might not be a general solution, so I'll leave this open for others to share their opinions. |
If |
Allowing regexp patterns in |
Uh oh!
There was an error while loading. Please reload this page.
The
v-icon
component in Vuetify for Vue 2 uses the default slot to define the icon ID. This is not user-readable text, so I'd like to disablevue/no-bare-strings-in-template
for all contents of any<v-icon>
components.For Vue3, this has been moved from a slot to an
icon
prop, so it's a non-issue there. But ignoring slot contents for some components seems like a good addition to this rule.What rule do you want to change?
vue/no-bare-strings-in-template
Does this change cause the rule to produce more or fewer warnings?
Fewer
How will the change be implemented? (New option, new default behavior, etc.)?
New option to allow some components or tags to be exempted (by name). For example:
Please provide some example code that this change will affect:
What does the rule currently do for this code?
Error, because the rule thinks that
$power
should be localized.What will the rule do after it's changed?
No error.
Additional context
The text was updated successfully, but these errors were encountered: