Skip to content

Commit 9da5b34

Browse files
author
Nikita Pavlov
committed
fix: doubling new lines after format
1 parent 4537d7f commit 9da5b34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules/format.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const create = (context) => {
7777
node.quasis[0].range[0],
7878
node.quasis[node.quasis.length - 1].range[1],
7979
],
80-
'`\n' + final + '`',
80+
'`' + (final.startsWith('\n') ? final : '\n' + final) + '`',
8181
);
8282
},
8383
message: 'Format the query',

0 commit comments

Comments
 (0)