-
Notifications
You must be signed in to change notification settings - Fork 22.7k
style: run prettier on webassembly #20405
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
This comment was marked as resolved.
This comment was marked as resolved.
- [`Count leading zeros`](/en-US/docs/WebAssembly/Reference/Numeric/Count_leading_zeros) | ||
- Count the amount of leading zeros in a numbers binary representation. | ||
|
||
- : Count the amount of leading zeros in a numbers binary representation. |
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 doesn't create a dl—not every element has a :
. Just use a normal ul.
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.
Right, I could use a <-- -->
above this to split the list into a UL then a DL. Looking at the rest of the page it seemed like it was supposed to be DL elements, but the ones in here hadn't been stubbed out
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.
That would be a bit weird, since we would have a ul and a dl sitting side-by-side. Maybe we could add a very brief intro for each of the operations above as well?
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 stubbed in some DDs from the article opening paragraphs.
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 like that. The benefit of a DL is the auto creation of an anchor in the page.
.prettierrc.json
Outdated
@@ -1,3 +1,4 @@ | |||
{ | |||
"bracketSameLine": true | |||
"bracketSameLine": true, | |||
"trailingComma": "all" |
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.
IMO a change like this should be mentioned in the PR title, as "run prettier on webassembly" doesn't imply this change.
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.
Yeah, it wasn't part of the original changes, but was requested on the review of one of the docs
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 want to be sure we have a consensus on this, and I'm fairly confident we can have it. This has a consequence much wider than this PR, and I wouldn't want it to be reversed later, leading to undoing what has been requested here.
Can you create a PR with just this change so that we get a wide set of reviewers approving it?
Then, we can rebase this one and merge it.
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.
Lots to love, nothing to hate.
I'm approving but leaving open as there were comments from others.
How can I run this locally? I'm thinking of updating the learn express and django docs, but I want to make sure I run the same thing for both the docs and the source code.
Currently you can run with |
@hamishwillee the express guide is a bit more involved, because there are a lot of "code pieces" that are not valid grammar standalone. Both the linter and the formatter choke on them, and I don't know what to do about them yet. If you could figure out a way to make every code block parsable JavaScript it would be great. |
THanks @nschonni @Josh-Cena . I might wait until the default ignore goes in. Re code pieces that are not valid grammar "we will see". I think I need to start by running prettier on the source code (following yari prettier rules) then copying in, and slowly working through to something that no longer chokes our tools. |
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 .prettier should be in its own PR, so that we can track that we have a consensus.
b337207
to
028efda
Compare
028efda
to
8677693
Compare
@Josh-Cena I've backed out the trailing comma config changes and fixes. I'll let you submit a separate PR to introduce that |
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 great to me. Thanks, @nschonni. (Approving, but leaving it to the others to merge it)
Created: #20405 (and we'll be able to check if we have a consensus in it) |
I don't think there are any other blockers on this one. The trailing commas can be fixed later if the config PR lands |
Agreed. |
Mostly spacing after the metadata, but manually adjusted some list spacing after it added extra line breaks