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
Format markdown with prettier and prepare SVG graphs for hooks #4206
Conversation
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#prettier-markdown or load it into the REPL: |
Codecov Report
@@ Coverage Diff @@
## master #4206 +/- ##
=======================================
Coverage 98.37% 98.37%
=======================================
Files 202 202
Lines 7248 7248
Branches 2118 2118
=======================================
Hits 7130 7130
Misses 58 58
Partials 60 60 Continue to review full report at Codecov.
|
Will merge this because I need the comments on master to fine-tune rollup/rollupjs.org#230 |
FWIW the eslint+prettier config and setup in the plugins repo is very mature now. Might be worth a look. |
True, but I was under the impression that even with plugins, ESLint will only format code blocks inside markdown files while prettier also formats the surrounding content, which is something I liked very much. But as I did not check, this assumption might be wrong. |
The solution in plugins does both :) |
But it looks you are also using just bare prettier for markdown: https://github.com/rollup/plugins/blob/6463b9635e20b8425599f14005b9efdd8f94ecd6/package.json#L7 |
It's a supplementary step. You don't have to take my word for it, but it runs like smooth butter over there. I've implemented the same setup for two companies now. |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
This will replace markdownlint with prettier for formatting markdown files, which looks much better also with respect to code samples.
It also adds two mermaid definition files that can be used to generate graphs for the build and output plugin hooks. Moreover, there is an HTML snippet to generate a legend for those files.
In the documentation itself, there are comments
That will be used by a forthcoming website update to actually replace them with the rendered graphs.