refactor(utils): use build-md for markdown formatting#755
Merged
matejchalk merged 1 commit intomainfrom Jul 22, 2024
Merged
Conversation
Contributor
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared target commit 0dfbb15 with source commit d45213d. 🏷️ Categories🗃️ Groups👍 2 groups improved, 👎 1 group regressed
17 other groups are unchanged. 🛡️ Audits👍 4 audits improved, 👎 5 audits regressed, 14 audits changed without impacting score
486 other audits are unchanged. |
Collaborator
|
Really good!! It's funny that I thought about that area yesterday. |
BioPhoton
reviewed
Jul 21, 2024
packages/utils/src/lib/reports/generate-md-report-category-section.unit.test.ts
Show resolved
Hide resolved
Collaborator
Author
I built this library in my free time, and it has applications beyong Code PushUp (e.g. |
Tlacenka
reviewed
Jul 21, 2024
Collaborator
Tlacenka
left a comment
There was a problem hiding this comment.
The markdown composition is much more readable now 👏
packages/utils/src/lib/reports/__snapshots__/report-diff-unchanged.md
Outdated
Show resolved
Hide resolved
packages/utils/src/lib/reports/generate-md-report-category-section.unit.test.ts
Show resolved
Hide resolved
packages/utils/src/lib/reports/generate-md-report-categoy-section.ts
Outdated
Show resolved
Hide resolved
vmasek
reviewed
Jul 22, 2024
...es/utils/src/lib/reports/__snapshots__/generate-md-report-category-section.unit.test.ts.snap
Show resolved
Hide resolved
vmasek
reviewed
Jul 22, 2024
vmasek
previously approved these changes
Jul 22, 2024
BioPhoton
previously approved these changes
Jul 22, 2024
Tlacenka
reviewed
Jul 22, 2024
packages/utils/src/lib/reports/__snapshots__/report-diff-unchanged.md
Outdated
Show resolved
Hide resolved
This was referenced Jul 27, 2024
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've published a library called
build-mdfor dynamically rendering Markdown documents 🚀I refactored our Markdown rendering logic to use this library. The advantage is our logic now focuses on document semantics, and is no longer concerned with Markdown formatting rules (like where to add separator lines and what to indent). The library's Markdown output is better formatted (fewer Markdown lint violations) - HTML is only used when necessary (context-sensitive rendering), there are no extra or missing separator lines, and the table columns are automatically aligned (as if by Prettier).
The reason I want this to be a standalone library is because it's applicable to other projects as well like
@code-pushup/eslint-config(migrated in code-pushup/eslint-config@8ac8793) orzod2md(migration planned).