Skip to content

Improve SCSS trialing comma print #16743

@fisker

Description

@fisker

After #16617, the following code should be improved the comma should insert before the fist comment, not the last comment.

Prettier pr-16617
Playground link

--parser scss

Input:

$my-map: (
  'foo': 1, // Comment
  'bar': 2 // Comment
  // Comment
);

Output:

$my-map: (
  "foo": 1,
  // Comment
  "bar": 2 // Comment
  , // Comment
);

Expected output:

Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions