@@ -23,7 +23,7 @@ ruleTester.run('no-system-props', rule, {
23
23
invalid : [
24
24
{
25
25
code : `import {Button} from '@primer/components'; <Button width={200} />` ,
26
- output : `import {Button} from '@primer/components'; <Button sx={{width: 200}} />` ,
26
+ output : `import {Button} from '@primer/components'; <Button sx={{width: 200}} />` ,
27
27
errors : [
28
28
{
29
29
messageId : 'noSystemProps' ,
@@ -33,7 +33,7 @@ ruleTester.run('no-system-props', rule, {
33
33
} ,
34
34
{
35
35
code : `import {Button} from '@primer/components'; <Button width="200" />` ,
36
- output : `import {Button} from '@primer/components'; <Button sx={{width: "200"}} />` ,
36
+ output : `import {Button} from '@primer/components'; <Button sx={{width: "200"}} />` ,
37
37
errors : [
38
38
{
39
39
messageId : 'noSystemProps' ,
@@ -43,7 +43,7 @@ ruleTester.run('no-system-props', rule, {
43
43
} ,
44
44
{
45
45
code : `import {Button} from '@primer/components'; <Button width={"200"} />` ,
46
- output : `import {Button} from '@primer/components'; <Button sx={{width: "200"}} />` ,
46
+ output : `import {Button} from '@primer/components'; <Button sx={{width: "200"}} />` ,
47
47
errors : [
48
48
{
49
49
messageId : 'noSystemProps' ,
@@ -53,7 +53,7 @@ ruleTester.run('no-system-props', rule, {
53
53
} ,
54
54
{
55
55
code : `import {Button} from '@primer/components'; <Button width={myWidth} />` ,
56
- output : `import {Button} from '@primer/components'; <Button sx={{width: myWidth}} />` ,
56
+ output : `import {Button} from '@primer/components'; <Button sx={{width: myWidth}} />` ,
57
57
errors : [
58
58
{
59
59
messageId : 'noSystemProps' ,
@@ -63,7 +63,7 @@ ruleTester.run('no-system-props', rule, {
63
63
} ,
64
64
{
65
65
code : `import {Button} from '@primer/components'; <Button width={200} height={100} />` ,
66
- output : `import {Button} from '@primer/components'; <Button sx={{width: 200, height: 100}} />` ,
66
+ output : `import {Button} from '@primer/components'; <Button sx={{width: 200, height: 100}} />` ,
67
67
errors : [
68
68
{
69
69
messageId : 'noSystemProps' ,
@@ -110,6 +110,16 @@ ruleTester.run('no-system-props', rule, {
110
110
data : { propNames : 'width' , componentName : 'Button' }
111
111
}
112
112
]
113
+ } ,
114
+ {
115
+ code : `import {Label} from '@primer/components'; <Label width={200} outline />` ,
116
+ output : `import {Label} from '@primer/components'; <Label outline sx={{width: 200}} />` ,
117
+ errors : [
118
+ {
119
+ messageId : 'noSystemProps' ,
120
+ data : { propNames : 'width' , componentName : 'Label' }
121
+ }
122
+ ]
113
123
}
114
124
]
115
125
} )
0 commit comments