Skip to content

Wrong trailing comma position after comment in scss #16599

@DzmVasileusky

Description

@DzmVasileusky

Prettier 3.3.3
Playground doesn't support scss it seems

# Options (if any):
"trailingComma": "es5"

Input:

$z-indexes: (
    header: 1035,
    overlay: 1202 // TODO: change to 1050 after bootstrap modals will be removed
);

Output:

$z-indexes: (
    header: 1035,
    overlay: 1202 // TODO: change to 1050 after bootstrap modals will be removed,
);

Expected output:

$z-indexes: (
    header: 1035,
    overlay: 1202, // TODO: change to 1050 after bootstrap modals will be removed
);

Why?

It should add a comma to the last item not to the comment. It will also add it endless times, we already have like 5 repeated commas

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-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