Skip to content

Commit fe39525

Browse files
committed
refactor(prefer-wait-for): use ternary
1 parent ea8fcce commit fe39525

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/rules/prefer-wait-for.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ module.exports = {
3030
const { parent } = node;
3131
const [arg] = parent.arguments;
3232

33-
if (arg) {
34-
return fixer.replaceText(node, 'waitFor');
35-
}
36-
return fixer.replaceText(parent, 'waitFor(() => {})');
33+
return arg
34+
? fixer.replaceText(node, 'waitFor')
35+
: fixer.replaceText(parent, 'waitFor(() => {})');
3736
},
3837
});
3938
};

0 commit comments

Comments
 (0)