Skip to content

Commit ee17e72

Browse files
committed
fix: semicolon position
1 parent 15781f5 commit ee17e72

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

rules/prefer-string-raw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const create = context => {
9595
* fix(fixer) {
9696
const tokenBefore = sourceCode.getTokenBefore(node);
9797
if (needsSemicolon(tokenBefore, sourceCode, suggestion)) {
98-
yield fixer.insertTextAfter(tokenBefore, ';');
98+
yield fixer.insertTextBefore(node, ';');
9999
}
100100

101101
yield fixer.replaceText(node, suggestion);

test/snapshots/prefer-string-raw.js.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ Generated by [AVA](https://avajs.dev).
354354
> Output
355355
356356
`␊
357-
1 | a;
358-
2 | \`a${b}\`␊
357+
1 | a␊
358+
2 | ;\`a${b}\`␊
359359
`
360360

361361
> Error 1/1
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)