-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Prettier 2.0.5
Playground link
Input:
@a b({"c": d}) {}Output:
@a b( {
"c":d ;
}
) {
}Expected behavior:
What's breaking things is that Prettier is introducing a totally new ; character after the d that previously didn't exist anywhere. I'm not sure why it does this, but it's causing enough breakage that I'm going to have to disable Prettier in some workflows unless/until this is fixed.
Note: this doesn't seem to be a PostCSS parsing error - you can easily generate a PostCSS parsing error with input like
a { --a: {a} }- my example above seems to be parsable by PostCSS but broken in Prettier, and so that's why I'm reporting here instead of to PostCSS
Also, if it helps, this is not problematic: @a b({c: d}) {}, but when you make either of those innermost tokens into a string (e.g. @a b({"c": d}) {} or @a b({c: "d"}) {}) Prettier seems to have an issue.
Thanks!