-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Mark highlights * Update intro * Draft * Update changelog * Update changelog * Regenerate draft * Update TS 4.5 blog URL * Regenerate draft * Fix by prettier * Fix * Remove changelogs released already * Address review * Update * Regenerate draft * Regenerate draft * Regenerate * Update changelog_unreleased/typescript/11515.md Co-authored-by: Jed Fox <git@jedfox.com> * Update changelog_unreleased/typescript/11721.md Co-authored-by: Jed Fox <git@jedfox.com> * Update changelog_unreleased/mdx/11563.md Co-authored-by: Jed Fox <git@jedfox.com> * Update changelog_unreleased/mdx/11563.md Co-authored-by: Jed Fox <git@jedfox.com> * Update website/blog/2021-11-21-2.5.0.md Co-authored-by: Jed Fox <git@jedfox.com> * Update website/blog/2021-11-21-2.5.0.md Co-authored-by: Jed Fox <git@jedfox.com> * Regenerate * Address reviews * Regenerate * Use examples * Regenerate * Address review * Renegrate * Address review * Regenerate * MDX 2 comments => MDX v2 comment syntax * Fix * Update changelog_unreleased/blog-post-intro.md Co-authored-by: Lucas Azzola <derflatulator@gmail.com> * Update changelog_unreleased/typescript/11721.md Co-authored-by: Lucas Azzola <derflatulator@gmail.com> * Regenerate * Update changelog_unreleased/typescript/11515.md Co-authored-by: Jed Fox <git@jedfox.com> * Regenerate * Address review * Regenerate * Address review * Regenerate Co-authored-by: Jed Fox <git@jedfox.com> Co-authored-by: Lucas Azzola <derflatulator@gmail.com>
- Loading branch information
1 parent
255d389
commit 04aa850
Showing
14 changed files
with
419 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
author: "Sosuke Suzuki (@sosukesuzuki)" | ||
authorURL: "https://github.com/sosukesuzuki" | ||
title: "Prettier 2.5: TypeScript 4.5 and MDX v2 comment syntax!" | ||
--- | ||
|
||
This release adds support for [TypeScript 4.5](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5/)'s new syntax and [MDX v2](https://mdxjs.com/blog/v2/) comment syntax! | ||
|
||
If you enjoy Prettier and would like to support our work, consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, including [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,30 @@ | ||
#### Reverts #7865, keeping class names on the same line (#11827 by @jlongster) | ||
#### [HIGHLIGHT]Collapse HTML `class` attributes onto one line (#11827 by @jlongster) | ||
|
||
Reverts [#7865](https://github.com/prettier/prettier/pull/7865). | ||
|
||
While this was intended to be useful for users of CSS libraries like Tailwind that tend to result in large numbers of classes on elements, it became clear that our heuristics for where to split the class list on to multiple lines were unable to consistently produce good results. We’re still considering better ways to format HTML with lots of classes — consider [discussing with us](https://github.com/prettier/prettier/issues/7863). | ||
|
||
<!-- prettier-ignore --> | ||
```html | ||
<!-- Input --> | ||
<div | ||
class="SomeComponent__heading-row d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between align-items-start align-items-lg-center" | ||
></div> | ||
|
||
<!-- Prettier stable --> | ||
<div | ||
class=" | ||
SomeComponent__heading-row | ||
d-flex | ||
flex-column flex-lg-row | ||
justify-content-start justify-content-lg-between | ||
align-items-start align-items-lg-center | ||
" | ||
></div> | ||
|
||
<!-- Prettier main --> | ||
<div | ||
class="SomeComponent__heading-row d-flex flex-column flex-lg-row justify-content-start justify-content-lg-between align-items-start align-items-lg-center" | ||
></div> | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
#### Respect spacing for between expressions and parentheses in embedded CSS (#11800 by @sosukesuzuki) | ||
|
||
<!-- Optional description if it makes sense. --> | ||
|
||
<!-- prettier-ignore --> | ||
```jsx | ||
// Input | ||
const paragraph2 = css` | ||
transform: ${expr}(30px); | ||
transform1: ${expr}(30px); | ||
transform2: ${expr} (30px); | ||
`; | ||
|
||
// Prettier stable | ||
// Prettier 2.4 | ||
const paragraph2 = css` | ||
transform: ${expr} (30px); | ||
transform1: ${expr} (30px); | ||
transform2: ${expr} (30px); | ||
`; | ||
|
||
// Prettier main | ||
// Prettier 2.5 | ||
const paragraph2 = css` | ||
transform: ${expr}(30px); | ||
transform1: ${expr}(30px); | ||
transform2: ${expr} (30px); | ||
`; | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
#### Improve `with (...)` formatting (#11637 by @sosukesuzuki) | ||
#### Improve `@use with` formatting (#11637 by @sosukesuzuki) | ||
|
||
<!-- prettier-ignore --> | ||
```scss | ||
// Input | ||
@use 'library' with ( | ||
$black: #222, | ||
$border-radius: 0.1rem $font-family: 'Helvetica, sans-serif' | ||
$border-radius: 0.1rem, | ||
$font-family: 'Helvetica, sans-serif' | ||
); | ||
|
||
// Prettier stable | ||
@use 'library' with | ||
($black: #222, $border-radius: 0.1rem $font-family: 'Helvetica, sans-serif'); | ||
@use "library" with | ||
($black: #222, $border-radius: 0.1rem, $font-family: "Helvetica, sans-serif"); | ||
|
||
// Prettier main | ||
@use 'library' with ( | ||
$black: #222, | ||
$border-radius: 0.1rem $font-family: 'Helvetica, sans-serif' | ||
$border-radius: 0.1rem, | ||
$font-family: 'Helvetica, sans-serif' | ||
); | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.