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
Upgrade wp-prettier to 2.2.1 #27441
Upgrade wp-prettier to 2.2.1 #27441
Conversation
Size Change: 0 B Total Size: 1.19 MB ℹ️ View Unchanged
|
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 had one comment related to TS files but otherwise it's looking good. I'm never sure if this is only enhancement knowing that we also use Prettier for linting.
@@ -2,31 +2,31 @@ export type WPDataFunctionOrGeneratorArray = Array< Function | Generator >; | |||
export type WPDataFunctionArray = Array< Function >; | |||
|
|||
export interface WPDataAttachedStore { |
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 it using now different indentation than JS? Can we align?
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.
This looks correct to me @gziolo, the indentation is changes spaces to tabs, I suspect this had been missed by ESLint/Prettier at some point previously:
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.
Yes, this file previously used spaced and was merely reformatted to tabs. There's been no radical change to how TS files are formatted and there are no differences between JS an TS formatting.
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.
Now I noticed that tsc
uses 4 spaces indentation when generating the *.d.ts
files in build-types
. That's probably where this formatting originated. And Babel apparently indents with 2 spaces.
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 was browsing this file in the mobile app. I couldn't verify whether it's tabs or spaces, it looked like 2 spaces. Ignore this comment One tab is correct.
Hmm, I can't edit my comment on GitHub mobile 🙃 I meant that it would be great to verify if it isn't a breaking change because of linting integration. |
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.
Cool, thank you @jsnajdr.
Upgrades
wp-prettier
to version 2.2.1 of the fork, making it up to date with the latest upstream.I already upgraded Calypso successfully earlier today: Automattic/wp-calypso#47950