Skip to content

Commit

Permalink
[Fix] no-unknown-property viewBox for pattern, symbol, view
Browse files Browse the repository at this point in the history
  • Loading branch information
MNBuyskih committed Sep 8, 2022
1 parent fd90b0e commit e258873
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/no-unknown-property.js
Expand Up @@ -63,7 +63,7 @@ const ATTRIBUTE_TAGS_MAP = {
imageSizes: ['link'],
imageSrcSet: ['link'],
property: ['meta'],
viewBox: ['svg', 'marker'],
viewBox: ["marker", "pattern", "svg", "symbol", "view"],
as: ['link'],
valign: ['tr', 'td', 'th', 'thead', 'tbody', 'tfoot', 'colgroup', 'col'], // deprecated, but known
noModule: ['script'],
Expand Down
3 changes: 3 additions & 0 deletions tests/lib/rules/no-unknown-property.js
Expand Up @@ -123,6 +123,9 @@ ruleTester.run('no-unknown-property', rule, {
{ code: '<video controlsList="nodownload" controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' },
{ code: '<audio controlsList="nodownload" controls={this.controls} crossOrigin="anonymous" disableRemotePlayback loop muted preload="none" src="something" onAbort={this.abort} onDurationChange={this.durationChange} onEmptied={this.emptied} onEnded={this.end} onError={this.error}></audio>' },
{ code: '<marker id={markerId} viewBox="0 0 2 2" refX="1" refY="1" markerWidth="1" markerHeight="1" orient="auto" />' },
{ code: `<pattern id="pattern" viewBox="0,0,10,10" width="10%" height="10%" />`},
{ code: `<symbol id="myDot" width="10" height="10" viewBox="0 0 2 2" />`},
{ code: `<view id="one" viewBox="0 0 100 100" />`},
{
code: `
<table>
Expand Down

0 comments on commit e258873

Please sign in to comment.