-
-
Notifications
You must be signed in to change notification settings - Fork 415
chore: update prettier, style changes #2800
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
| // Generated on Fri Feb 26 2016 13:09:51 GMT+1100 (AEDT) | ||
| "use strict"; | ||
| module.exports = function(config) { | ||
| module.exports = function (config) { |
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.
Not a fan of these changes - a space after "function" keyword
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.
Might be worth to check the relevant discussion...
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/prettier#3903 is the culprit (an old PR but was merged into next branch), and seemingly the majority of people liked it.
| ? html` | ||
| <span class="example-title">: ${report.title}</span> | ||
| ` | ||
| ? html` <span class="example-title">: ${report.title}</span> ` |
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.
Need to check we want the space or not. I think generally we don't.
| // Generated on Fri Feb 26 2016 13:09:51 GMT+1100 (AEDT) | ||
| "use strict"; | ||
| module.exports = function(config) { | ||
| module.exports = function (config) { |
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.
Might be worth to check the relevant discussion...
| .toLowerCase() | ||
| .replace(/[()]/g, "") | ||
| .replace(/\s/g, "-"); | ||
| let last = name.toLowerCase().replace(/[()]/g, "").replace(/\s/g, "-"); |
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.
No needless newlines 🎉
| ? html` <span class="example-title">: ${report.title}</span> ` | ||
| : ""; | ||
| return html` | ||
| <div class="marker"> |
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.
With prettier 2.0 this can be:
html`<div>
...
</div>`;This will reduce one indentation level, what do you think @sidvishnoi?
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.
Sounds good to me. 👍
saschanaz
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.
I guess we can merge this, with code formats to be enhanced separately.
Closes https://github.com/w3c/respec/pull/2799 (which uses prettier 2.0.0)