Skip to content

Commit 92ba227

Browse files
committed
fix(prefer-in-document): update comment on comma removal logic
1 parent 078f793 commit 92ba227

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules/prefer-in-document.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export const create = (context) => {
125125
const sourceCode = context.getSourceCode();
126126
const token = sourceCode.getTokenAfter(argument);
127127
if (token.value === "," && token.type === "Punctuator") {
128-
// Remove commas if toHaveLength had more than one argument
128+
// Remove commas if toHaveLength had more than one argument or a trailing comma
129129
operations.push(fixer.replaceText(token, ""));
130130
}
131131
operations.push(fixer.remove(argument));

0 commit comments

Comments
 (0)