Skip to content

Commit

Permalink
Fix SVG tags whitelist in selector-type-no-unknown rule (#4472) (#4495)
Browse files Browse the repository at this point in the history
  • Loading branch information
webschik authored and hudochenkov committed Dec 27, 2019
1 parent 6d92b10 commit 9cd0557
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/rules/selector-type-no-unknown/__tests__/index.js
Expand Up @@ -85,6 +85,10 @@ testRule(rule, {
code: 'circle {}',
description: 'svg tags',
},
{
code: 'foreignObject {}',
description: 'case-sensitive svg tags',
},
{
code: '@media keyframes { 0.0% {} 49.1% {} 100% {} }',
description: 'standard usage of keyframe selectors',
Expand Down
3 changes: 2 additions & 1 deletion lib/rules/selector-type-no-unknown/index.js
Expand Up @@ -87,7 +87,8 @@ const rule = function(actual, options) {

if (
htmlTags.includes(tagNameLowerCase) ||
svgTags.includes(tagNameLowerCase) ||
// SVG tags are case-sensitive
svgTags.includes(tagName) ||
keywordSets.nonStandardHtmlTags.has(tagNameLowerCase) ||
mathMLTags.includes(tagNameLowerCase)
) {
Expand Down

0 comments on commit 9cd0557

Please sign in to comment.