Skip to content

SCSS: extra comma added to map, before last comment #6920

@fisker

Description

@fisker

Prettier 1.19.1
Playground link

--parser scss

Input:

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

Output:

$my-map: (
  "foo": 1,
  // Comment
    "bar": 2,
  //        ^ <----- trailingComma should not printed
  // Comment
);

Expected behavior:

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

should not print trailingComma

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:commentsIssues with how Prettier prints commentslang: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