@@ -20,7 +20,7 @@ ruleTester.run('no-system-props', rule, {
20
20
`import {ProgressBar} from '@primer/react'; <ProgressBar bg="howdy" />` ,
21
21
`import {Button} from '@primer/react'; <Button {...someExpression()} />` ,
22
22
`import {Button} from '@primer/react'; <Button variant="large" />` ,
23
- `import {Button} from '@primer/react'; <Button size="large" />` ,
23
+ `import {Button} from '@primer/react'; <Button size="large" />`
24
24
] ,
25
25
invalid : [
26
26
{
@@ -144,6 +144,28 @@ ruleTester.run('no-system-props', rule, {
144
144
data : { propNames : 'width' , componentName : 'Text' }
145
145
}
146
146
]
147
+ } ,
148
+ {
149
+ code : `import {Button} from '../Button'; <Button width={200} />` ,
150
+ options : [ { skipImportCheck : true } ] ,
151
+ output : `import {Button} from '../Button'; <Button sx={{width: 200}} />` ,
152
+ errors : [
153
+ {
154
+ messageId : 'noSystemProps' ,
155
+ data : { propNames : 'width' , componentName : 'Button' }
156
+ }
157
+ ]
158
+ } ,
159
+ {
160
+ code : `import {Foo} from '../Foo'; <Foo width={200} />` ,
161
+ options : [ { skipImportCheck : true } ] ,
162
+ output : `import {Foo} from '../Foo'; <Foo sx={{width: 200}} />` ,
163
+ errors : [
164
+ {
165
+ messageId : 'noSystemProps' ,
166
+ data : { propNames : 'width' , componentName : 'Foo' }
167
+ }
168
+ ]
147
169
}
148
170
]
149
171
} )
0 commit comments