-
Notifications
You must be signed in to change notification settings - Fork 20
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
Extend invalid escape sequences rule to other tagged template literals #179
Comments
i think you're right so far we've stayed away from the we should probably create some util function like we don't need to update the other rules to use that yet, so we can keep this tightly scoped. then just need to update the docs to mention that we check all 3 for this rule |
Template literals used as values for the
css
andsvg
tag functions are vulnerable to the same issues with invalid escape sequences as thehtml
tag function.For example the following code leads to an empty CSS result with no error or warning to indicate what's gone wrong:
I'd be in favour of expanding the
no-invalid-escape-sequences
rule to cover these other kinds of template literals.Happy to do a PR for this with docs changes if that's helpful.
The text was updated successfully, but these errors were encountered: