-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,10 +182,7 @@ export function decorateDfn(dfnElem, idlAst, parent, name) { | |
| if (!dfnElem.id) { | ||
| const lCaseParent = parent.toLowerCase(); | ||
| const middle = lCaseParent ? `${lCaseParent}-` : ""; | ||
| let last = name | ||
| .toLowerCase() | ||
| .replace(/[()]/g, "") | ||
| .replace(/\s/g, "-"); | ||
| let last = name.toLowerCase().replace(/[()]/g, "").replace(/\s/g, "-"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No needless newlines 🎉 |
||
| if (last === "") last = "the-empty-string"; | ||
| dfnElem.id = `dom-${middle}${last}`; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,9 +62,7 @@ function makeTitle(elem, num, report) { | |
| if (report.title) elem.removeAttribute("title"); | ||
| const number = num > 0 ? ` ${num}` : ""; | ||
| const title = report.title | ||
| ? html` | ||
| <span class="example-title">: ${report.title}</span> | ||
| ` | ||
| ? html` <span class="example-title">: ${report.title}</span> ` | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| : ""; | ||
| return html` | ||
| <div class="marker"> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good to me. 👍 |
||
|
|
||
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...
Uh oh!
There was an error while loading. Please reload this page.
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
nextbranch), and seemingly the majority of people liked it.