Skip to content

Commit

Permalink
Print semicolon for accessor and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Dec 5, 2022
1 parent 929c2dd commit c641b96
Show file tree
Hide file tree
Showing 4 changed files with 366 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/language-js/print/statement.js
Expand Up @@ -177,7 +177,10 @@ const isClassProperty = ({ type }) =>
function shouldPrintSemicolonAfterClassProperty(node, nextNode) {
const name = node.key && node.key.name;
if (
(name === "static" || name === "get" || name === "set") &&
(name === "static" ||
name === "get" ||
name === "set" ||
name === "accessor") &&
!node.value &&
!node.typeAnnotation
) {
Expand Down

0 comments on commit c641b96

Please sign in to comment.