Skip to content

Commit 05cbb80

Browse files
committed
Add test
1 parent ef42191 commit 05cbb80

6 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/language-js/print/semicolon.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import {
77
import { shouldPrintParamsWithoutParens } from "./function.js";
88

99
function shouldPrintLeadingSemicolon(path, options) {
10-
if (options.semi || isSingleJsxExpressionStatementInMarkdown(path, options)) {
10+
if (
11+
options.semi ||
12+
isSingleJsxExpressionStatementInMarkdown(path, options) ||
13+
isSingleVueEventBindingExpressionStatement(path, options)
14+
) {
1115
return false;
1216
}
1317

tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap renamed to tests/format/vue/event-binding/__snapshots__/jsfmt.spec.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`basic.vue format 1`] = `
3+
exports[`typescript-syntax.vue format 1`] = `
44
====================================options=====================================
55
parsers: ["vue"]
66
printWidth: 80
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
run_spec(import.meta, ["vue"], { semi: false });
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<v-map @loaded="(map = $event) && initMap()"></v-map>
3+
</template>
File renamed without changes.

0 commit comments

Comments
 (0)