Skip to content

Bug: Prettier errorneously removes semicolon in-between expressions #431

Description

@lephuongbg

Info

Tool Version
Plugin v2.4.1
Prettier v2.8.3
Framework vue
Node v16
OS linux

Prettier config

{
    "printWidth": 120,
    "endOfLine": "lf",
    "tabWidth": 4,
    "singleQuote": true,
    "semi": false,
    "trailingComma": "all",
    "arrowParens": "avoid",
    "bracketSpacing": false,
    "vueIndentScriptAndStyle": true,
    "proseWrap": "never",
    "pugAttributeSeparator": "as-needed",
    "bracketSameLine": true,
    "pugSortAttributesBeginning": [
        "^(is|v-is)$",
        "^v-for$",
        "^(v-if|v-else-if|v-else|v-show|v-cloak)$",
        "^(v-once|v-pre)$",
        "^id$",
        "^ref$", "^key$", "^(v-slot|slot)$",
        "^v-model$",
        "^v-.+$"
    ],
    "pugSortAttributesEnd": [
        "^@.+$",
        "^v-on$",
        "^v-text$",
        "^v-html$"
    ],
    "pugSortAttributes": "asc"
}

Input

<template lang="pug">
input#dropzone.image-input(
        @drop.stop.prevent='onDrop($event.dataTransfer.files); dragging = false')
</template>

Output or Error

image

Expected Output

Should be unchanged

Additional Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions