We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b056134 commit 4ed6fd9Copy full SHA for 4ed6fd9
src/rules/accessible-emoji.js
@@ -24,12 +24,9 @@ module.exports = {
24
25
create: context => ({
26
JSXOpeningElement: (node) => {
27
- const literalChildValue = node.parent.children.find((child) => {
28
- if (child.type === 'Literal') {
29
- return child.value;
30
- }
31
- return false;
32
- });
+ const literalChildValue = node.parent.children.find(
+ child => child.type === 'Literal',
+ );
33
34
if (literalChildValue && emojiRegex().test(literalChildValue.value)) {
35
const rolePropValue = getLiteralPropValue(getProp(node.attributes, 'role'));
0 commit comments