Skip to content

Commit

Permalink
Chore: use includes instead of indexOf (#14607)
Browse files Browse the repository at this point in the history
  • Loading branch information
Connormiha committed May 21, 2021
1 parent c0f418e commit afe9569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/comma-spacing.js
Expand Up @@ -181,7 +181,7 @@ module.exports = {

validateCommaItemSpacing({
comma: token,
left: astUtils.isCommaToken(previousToken) || commaTokensToIgnore.indexOf(token) > -1 ? null : previousToken,
left: astUtils.isCommaToken(previousToken) || commaTokensToIgnore.includes(token) ? null : previousToken,
right: astUtils.isCommaToken(nextToken) ? null : nextToken
}, token);
});
Expand Down

0 comments on commit afe9569

Please sign in to comment.