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
Fix SVG tags whitelist in selector-type-no-unknown rule (#4472) #4495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to change this line to compare tags in correct case, rather ignoring case completely:
- svgTags.includes(tagNameLowerCase) ||
+ svgTags.includes(tagName) ||
While in HTML tag case is ignored, for SVG it's important. It will help user to find typo in their tags, if we compare case for SVG tags.
@@ -85,6 +85,10 @@ testRule(rule, { | |||
code: 'circle {}', | |||
description: 'svg tags', | |||
}, | |||
{ | |||
code: '.test foreignObject { color: white }', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, didn't spot it right away:
code: '.test foreignObject { color: white }', | |
code: 'foreignObject { }', |
It's for consistency with other test cases. Could you also adjust description to case-sensitive svg tags
, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
|
Fix for
selector-type-no-unknown
ruleCloses #4472