Skip to content

Commit

Permalink
Chore: use includes instead of indexOf
Browse files Browse the repository at this point in the history
  • Loading branch information
Connormiha committed May 21, 2021
1 parent 2466a05 commit afe0c7f
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 afe0c7f

Please sign in to comment.