@@ -15,13 +15,13 @@ const excludedComponentProps = new Map([
15
15
[ 'AnchoredOverlay' , new Set ( [ 'width' , 'height' ] ) ] ,
16
16
[ 'Avatar' , new Set ( [ 'size' ] ) ] ,
17
17
[ 'Dialog' , new Set ( [ 'width' , 'height' ] ) ] ,
18
- [ 'Flash' , new Set ( [ 'variant' ] ) ] ,
19
- [ 'Label' , new Set ( [ 'variant' ] ) ] ,
20
18
[ 'ProgressBar' , new Set ( [ 'bg' ] ) ] ,
21
19
[ 'Spinner' , new Set ( [ 'size' ] ) ] ,
22
20
[ 'StyledOcticon' , new Set ( [ 'size' ] ) ]
23
21
] )
24
22
23
+ const alwaysExcludedProps = new Set ( [ 'variant' ] )
24
+
25
25
module . exports = {
26
26
meta : {
27
27
type : 'suggestion' ,
@@ -65,12 +65,12 @@ module.exports = {
65
65
// Create an array of system prop attribute nodes
66
66
let systemProps = Object . values ( pick ( propsByNameObject ) )
67
67
68
+ let excludedProps = excludedComponentProps . has ( jsxNode . name . name )
69
+ ? new Set ( [ ...alwaysExcludedProps , ...excludedComponentProps . get ( jsxNode . name . name ) ] )
70
+ : alwaysExcludedProps
71
+
68
72
// Filter out our exceptional props
69
73
systemProps = systemProps . filter ( prop => {
70
- const excludedProps = excludedComponentProps . get ( jsxNode . name . name )
71
- if ( ! excludedProps ) {
72
- return true
73
- }
74
74
return ! excludedProps . has ( prop . name . name )
75
75
} )
76
76
0 commit comments