-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Add Prettier to lint command #20674
Add Prettier to lint command #20674
Conversation
After this or with this one, we could add the prettier call to the Auto PR fix job |
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, but the only problem I see is that those "already fixed" files don't get auto-fixed via lint-staged yet, so the failing test may be a surprise for contributors.
We want to discuss the plan to move forward with Prettier once everybody returns from the all-hand Mozilla trip (for some), and holidays (for others). Meanwhile, we can fix content to match the output of Prettier, getting experience with the limitations of the tool (weirdness with inline elements, CDATA and MathML code "minimization", a few oddities with CSS, …), but we shouldn't move forward with automation before the plan has been discussed on mdn/mdn-community/discussions and agreed. |
When these folders are opted back in, lint-stage/husky will autofix any regressions going forward |
@teoli2003 Just following up: Have you had a chance to discuss this? |
Gave this a rebase, and updated the globs for the global job and scripts to run for prettier changes. Still green with the now opted in folders |
8a7d1e0
to
cbc8707
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
@queengooborg @bsmth noticed that #24046 landed. Maybe you're ready to look at this now |
Preview URLs (6 pages)Flaws (1)Note! 5 documents with no flaws that don't need to be listed. 🎉 URL:
(comment last updated: 2023-05-19 23:33:30) |
.prettierignore
Outdated
!files/en-us/mdn/**/*.md | ||
!files/en-us/web/http/**/*.md | ||
!/*.md | ||
!/files/en-us/games/**/*.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.
What do you think about getting rid of the leading slash for these paths? e.g.
!files/en-us/games/**/*.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.
I kept if consistent because the /
is needed for the root path, and the absolute gives an explicit match
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.
OK good to know. If this is the preferred way, we should continue with that convention when adding other paths (note to self & @queengooborg).
This pull request has merge conflicts that must be resolved before it can be merged. |
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.
Since there was only six files left in need of formatting, I've gone ahead and just formatted them now so we can get this landed!
… into update-beforeinstallpromptevent * origin/update-beforeinstallpromptevent: Add Prettier to lint command (mdn#20674) Remove SVG <discard> docs (mdn#26856) Remove docs for <applet> (mdn#26850) refactor: migrate media.prod.mdn.mozit.cloud URLs (mdn#26809) chore: Remove embedlivesample macro calls with a fourth parameter (mdn#26816) Bump @mdn/yari from 2.21.0 to 2.22.0 (mdn#26858) WebTransport API (mdn#26529) Fix issue 26739: correct beforeunload situation wrt bfcache (mdn#26819) add missing colon (mdn#26846) Replace reference to time domain with amplitude domain in `AnalyserNode .fftSize` (mdn#26840) Fix issue 26048: document security requirements for opening and focus… (mdn#26838) Change all CSS spec URLs back to drafts.csswg.org (mdn#26833) Synchronize with BCD v5.2.58 (mdn#26829) Rename nonexistent globalScope to globalThis in service worker event examples (mdn#26808) Small typo fix (mdn#26822) removing scrollbar (mdn#26813) Fix typo (mdn#26826)
* origin/pwa-main-page: (86 commits) Add Prettier to lint command (mdn#20674) Remove SVG <discard> docs (mdn#26856) Remove docs for <applet> (mdn#26850) refactor: migrate media.prod.mdn.mozit.cloud URLs (mdn#26809) chore: Remove embedlivesample macro calls with a fourth parameter (mdn#26816) Bump @mdn/yari from 2.21.0 to 2.22.0 (mdn#26858) WebTransport API (mdn#26529) Fix issue 26739: correct beforeunload situation wrt bfcache (mdn#26819) add missing colon (mdn#26846) Replace reference to time domain with amplitude domain in `AnalyserNode .fftSize` (mdn#26840) Fix issue 26048: document security requirements for opening and focus… (mdn#26838) Change all CSS spec URLs back to drafts.csswg.org (mdn#26833) Synchronize with BCD v5.2.58 (mdn#26829) Rename nonexistent globalScope to globalThis in service worker event examples (mdn#26808) Small typo fix (mdn#26822) removing scrollbar (mdn#26813) Fix typo (mdn#26826) docs(:not()): Update the syntax and example titles (mdn#26814) Add a Performance guide for Server Timing (mdn#25575) Fix a summary (mdn#26815) ...
These were removed from the Huskier PR, so resubmitting to review separately