@@ -54,6 +54,7 @@ ruleTester.run('no-unknown-property', rule, {
5454 { code : '<button disabled>You cannot click me</button>;' } ,
5555 { 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>' } ,
5656 { code : '<g fill="#7B82A0" fillRule="evenodd"></g>' } ,
57+ { code : '<mask fill="#7B82A0"></mask>' } ,
5758 { code : '<meta property="og:type" content="website" />' } ,
5859 { code : '<input type="checkbox" checked={checked} disabled={disabled} id={id} onChange={onChange} />' } ,
5960 { code : '<video playsInline />' } ,
@@ -101,6 +102,7 @@ ruleTester.run('no-unknown-property', rule, {
101102 { code : '<svg><image crossOrigin /></svg>' } ,
102103 { code : '<details onToggle={this.onToggle}>Some details</details>' } ,
103104 { 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>' } ,
104106 { code : '<link as="audio">Audio content</link>' } ,
105107 { code : '<video controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' } ,
106108 { 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, {
392394 } ,
393395 ] ,
394396 } ,
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+ } ,
395410 {
396411 code : '<div controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true} allowFullScreen></div>' ,
397412 errors : [
0 commit comments