@@ -54,6 +54,7 @@ ruleTester.run('no-unknown-property', rule, {
54
54
{ code : '<button disabled>You cannot click me</button>;' } ,
55
55
{ code : '<svg key="lock" viewBox="box" fill={10} d="d" stroke={1} strokeWidth={2} strokeLinecap={3} strokeLinejoin={4} transform="something" clipRule="else" x1={5} x2="6" y1="7" y2="8"></svg>' } ,
56
56
{ code : '<g fill="#7B82A0" fillRule="evenodd"></g>' } ,
57
+ { code : '<mask fill="#7B82A0"></mask>' } ,
57
58
{ code : '<meta property="og:type" content="website" />' } ,
58
59
{ code : '<input type="checkbox" checked={checked} disabled={disabled} id={id} onChange={onChange} />' } ,
59
60
{ code : '<video playsInline />' } ,
@@ -101,6 +102,7 @@ ruleTester.run('no-unknown-property', rule, {
101
102
{ code : '<svg><image crossOrigin /></svg>' } ,
102
103
{ code : '<details onToggle={this.onToggle}>Some details</details>' } ,
103
104
{ code : '<path fill="pink" d="M 10,30 A 20,20 0,0,1 50,30 A 20,20 0,0,1 90,30 Q 90,60 50,90 Q 10,60 10,30 z"></path>' } ,
105
+ { code : '<line fill="pink" x1="0" y1="80" x2="100" y2="20"></line>' } ,
104
106
{ code : '<link as="audio">Audio content</link>' } ,
105
107
{ code : '<video controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' } ,
106
108
{ code : '<audio 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>' } ,
@@ -392,6 +394,19 @@ ruleTester.run('no-unknown-property', rule, {
392
394
} ,
393
395
] ,
394
396
} ,
397
+ {
398
+ code : '<div fill="pink" />' ,
399
+ errors : [
400
+ {
401
+ messageId : 'invalidPropOnTag' ,
402
+ data : {
403
+ name : 'fill' ,
404
+ tagName : 'div' ,
405
+ allowedTags : 'altGlyph, circle, ellipse, g, line, mask, path, polygon, polyline, rect, svg, text, textPath, tref, tspan, use, animate, animateColor, animateMotion, animateTransform, set' ,
406
+ } ,
407
+ } ,
408
+ ] ,
409
+ } ,
395
410
{
396
411
code : '<div controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true} allowFullScreen></div>' ,
397
412
errors : [
0 commit comments