Skip to content

--embedded-language-formatting add quotes to LWC attributes #18359

@fisker

Description

@fisker

Prettier 3.7.1
Playground link

--parser lwc
--embedded-language-formatting off

Input:

<div double-quoted="{data}" single-quoted="{data}" unquoted="{data}"></div>

Output:

<div double-quoted="{data}" single-quoted="{data}" unquoted="{data}"></div>

Expected output:

<div double-quoted="{data}" single-quoted="{data}" unquoted={data}></div>

Why?

Adding quotes breaks LWC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:lwcIssues affecting Lightning Web Components (LWC)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions