New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 2.5 blog #11823
Add 2.5 blog #11823
Conversation
website/blog/2021-11-17-2.5.0.md
Outdated
|
||
<!-- Prettier 2.5 --> | ||
```tsx | ||
const test = <T>(value: T) => {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the output in 2.4?
f5d9b87
to
efa5a60
Compare
If anyone wants to proofread the post, note that Preview URL has changed:
|
5a31ea7
to
b2ae0f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a bunch of suggestions. I’m not particularly attached to them, so feel free to reject any you don’t agree with :)
|
||
Starting with Prettier 2.3.0, type declarations in arrow functions could affect function body offset. Changing the length of the type annotation could produce large diffs and thus increased the chance of git conflicts. To prevent this, function body offset was stabilized. | ||
However, this change can make a big difference from 2.4.1. Please be careful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of the term “offset” here wasn’t clear to me — maybe change it to “indentation?” Additionally, I would reword the last sentence like so:
However, this change can make a big difference from 2.4.1. Please be careful. | |
**Note**: This change may affect a large number of lines in your codebase. |
(or something similar?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one small formatting suggestion:
Co-authored-by: Lucas Azzola <derflatulator@gmail.com>
Co-authored-by: Lucas Azzola <derflatulator@gmail.com>
Co-authored-by: Jed Fox <git@jedfox.com>
8e9da6d
to
acd68e1
Compare
I just noticed that #11823 (comment) was marked as resolved but my first sentence about the use of “offset” was not addressed. |
website/blog/2021-11-24-2.5.0.md
Outdated
// Input | ||
@use 'library' with ( | ||
$black: #222, | ||
$border-radius: 0.1rem $font-family: 'Helvetica, sans-serif' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be invalid Sass? If not, there's a missing comma. (below as well + newline)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is valid scss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with SCSS, but at least there is a below code on the scss docs.
@use 'library' with (
$black: #222,
$border-radius: 0.1rem
);
https://sass-lang.com/documentation/at-rules/use#configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops sorry I didn't notice that. I'll fix later, thank you!
Great work @sosukesuzuki 👏👏👏 |
Description
https://deploy-preview-11823--prettier.netlify.app/blog/2021/11/25/2.5.0.html
Checklist
✨Try the playground for this PR✨