Closed gziolo closed 3 years ago
:wave: What would be some instructions to reproduce the issue?
Doing npx prettier --format **/*.md
results in a console output that I don't know how to interpret:
It should be npx prettier --write **/*.md
, sorry about that 🙈
Ok, took a look at this, my braindump:
npx prettier --write **/**/*.md
gives a list of files modified. packages/i18n/CHANGELOG.md
is unrelated to docgen, but the others are (the tools have different opinions about spacing and I learned that prettier formats code within markdown code blocks as well ― that's cool!).&& prettier --write **/**/*.md
to the docs:build
npm script => if we use this in CI and other tools (haven't check it) everything will be fine.Does this help?
Thank you @nosolosw. It looks like we can collect updated files and run Prettier on all of them in one call or individually after each file gets updated 👍🏻
Now that #33498 and #33502 landed, the issue no longer exists 🎉
What problem does this address?
Follow-up for #30714.
Follow-up for #30715.
What is your proposed solution?
It looks like
npm run fixtures:regenerate
command conflicts with whatnpx prettier --write **/*.json
does for all JSON files. We should updatenpm run fixtures:regenerate
to produce output that is aligned with Prettier formatting.npx prettier --write **/*.md
doesn't play nicely withnpm run docs:build
. We should update@wordpress/docgen
to align both.