Update dependency prettier to ^2.0.2
Created by: renovate[bot]
This PR contains the following updates:
| Package | Type | Update | New value | References | Sourcegraph |
|---|---|---|---|---|---|
| prettier (source) | devDependencies | patch | ^2.0.2 | homepage, source |
Release Notes
prettier/prettier
v2.0.2
2.0 regressions
JavaScript: Fix formatting of pseudo-elements and pseudo-classes in styled-components template literals (#7842 by @thorn0)
// Input
const Foo = styled.div`
${media.smallDown}::before {}
`;
// Prettier 2.0.0
const Foo = styled.div`
${media.smallDown}: : before{
}
`;
// Prettier 2.0.2
const Foo = styled.div`
${media.smallDown}::before {
}
`;
TypeScript: Avoid trailing commas on index signatures with only one parameter (#7836 by @bakkot)
TypeScript index signatures technically allow multiple parameters and trailing commas, but it's an error to have multiple parameters there, and Babel's TypeScript parser does not accept them. So Prettier now avoids putting a trailing comma there when you have only one parameter.
// Input
export type A = {
a?: {
[
x: string
]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
} | null;
};
// Prettier 2.0.0
export type A = {
a?: {
[
x: string,
]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
} | null;
};
// Prettier 2.0.2
export type A = {
a?: {
[
x: string
]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
} | null;
};
Revert "markdown: fix redundant leading spaces in markdown list" (#7847)
See #7846
Other changes
TypeScript: Fix prettier-ignore in union types (#7798 by @thorn0)
// Input
export type a =
// foo
| foo1&foo2
// prettier-ignore
| bar1&bar2
// baz
| baz1&baz2;
// Prettier 2.0.0
export type a =
// foo
| foo1&foo2
// prettier-ignore
// prettier-ignore
| (bar1 & bar2)
// baz
| (baz1 & baz2);
// Prettier 2.0.2
export type a =
// foo
| (foo1 & foo2)
// prettier-ignore
| bar1&bar2
// baz
| (baz1 & baz2);
Renovate configuration
-
If you want to rebase/retry this PR, check this box
This PR has been generated by WhiteSource Renovate. View repository job log here.