-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use prettier to format the code #601
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
Conversation
|
LGTM. Just a comment regarding checking this in our Something like the following job in |
Makes sense, it would be good improvement. Let's leave it out of scope of this pull request though, as it's a different change IMO. Created a GH issue to keep track of this - see #610. This actually raises a question - I think |
Pushed a new commit a641331 to make this happen. |
|
@virkt25 PTAL again. @kjdelisle @raymondfeng do you have any opinion on this change? May I go ahead and land this patch? |
+1
+1 |
| ctx | ||
| .bind('fido') | ||
| .to(new Dog()) | ||
| .tag('dog'); |
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.
What rule control this? Isn't ctx.bind('spot').to(new Dog()).tag('dog'); perfectly readable?
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.
Looks like this is hard-coded, at least I don't see any option to control this: https://github.com/prettier/prettier/blob/master/docs/options.md
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.
//prettier-ignore can be used to skip lines / blocks we want to be skipped by prettier.
Just an option. I do think we should keep prettier formatting wherever possible to keep things consistent.
(Also if the result of a chain is being assigned to variable then it doesn’t break it down to a command per line)
| * The location of the API key. Valid values are "query" or "header". | ||
| */ | ||
| 'in'?: 'query' | 'header'; | ||
| in?: 'query' | 'header'; |
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.
Interesting, I don't know that we can use in keyword as object key without quotation.
raymondfeng
left a comment
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 a few minor questions/comments.
npm run prettier:checkfor verifying formattingnpm run prettier:fixto automatically reformat the codenpm testpipeline