File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -31,20 +31,16 @@ module.exports = {
31
31
return false ;
32
32
} ) ;
33
33
34
- if ( literalChildValue ) {
35
- const containsEmoji = emojiRegex ( ) . test ( literalChildValue . value ) ;
36
-
37
- if ( containsEmoji ) {
38
- const roleProp = getProp ( node . attributes , 'role' ) ;
39
- const rolePropValue = getLiteralPropValue ( roleProp ) ;
40
- const ariaLabelProp = getProp ( node . attributes , 'aria-label' ) ;
41
- const isSpan = elementType ( node ) === 'span' ;
42
- if ( ariaLabelProp === 'undefined' || rolePropValue !== 'img' || isSpan === false ) {
43
- context . report ( {
44
- node,
45
- message : errorMessage ,
46
- } ) ;
47
- }
34
+ if ( literalChildValue && emojiRegex ( ) . test ( literalChildValue . value ) ) {
35
+ const rolePropValue = getLiteralPropValue ( getProp ( node . attributes , 'role' ) ) ;
36
+ const ariaLabelProp = getProp ( node . attributes , 'aria-label' ) ;
37
+ const isSpan = elementType ( node ) === 'span' ;
38
+
39
+ if ( ariaLabelProp === 'undefined' || rolePropValue !== 'img' || isSpan === false ) {
40
+ context . report ( {
41
+ node,
42
+ message : errorMessage ,
43
+ } ) ;
48
44
}
49
45
}
50
46
} ,
You can’t perform that action at this time.
0 commit comments