Fix CI for MDX files#624
Merged
dsp-ant merged 2 commits intomodelcontextprotocol:mainfrom Jun 5, 2025
Merged
Conversation
93bceb7 to
cd1d6d5
Compare
dsp-ant
reviewed
Jun 2, 2025
Comment on lines
354
to
357
Member
Author
There was a problem hiding this comment.
Good catch! Thank you for fixing!
The Prettier parser was confused by the lack of a blank line before the code block here. I verified that adding a blank line prior to formatting fixes the issue. If I end up rebasing, I will roll that into the first commit.
Member
|
Sorry can you do one more rebase? |
dsp-ant
previously approved these changes
Jun 5, 2025
Member
dsp-ant
left a comment
There was a problem hiding this comment.
Quite annoying that we have the weird additional lines in the JSX tags, but oh well, s obe it. Thank you for the hard work on this.
c7579be to
8e9e4d7
Compare
Most `*.md` files were converted to `*.mdx` in modelcontextprotocol#283, but `package.json` scripts and CI config were not updated to match. This commit makes the necessary updates. Unfortunately, Prettier currently only supports MDX v1 (see [prettier#15221][] and [prettier#12209][]), which causes it to treat content inside JSX tags as JSX instead of Markdown unless the content is surrounded by blank lines (see [prettier#16589][]). Therefore, this commit also adds blank lines inside JSX elements where necessary. This commit also removes the 89-character line wrap rule for `.md` files rather than update it for `.mdx` files. It's not clear that the rule was helpful, and we already have many files that do not abide by it: ```console $ grep -l '.{90}' docs/**/*.mdx | wc -l 59 ``` For ease of rebasing, this commit _does not_ actually format the files using Prettier. That will be done in the next commit. [prettier#15221]: prettier/prettier#15221 [prettier#12209]: prettier/prettier#12209 [prettier#16589]: prettier/prettier#16589
8e9e4d7 to
19f7bbe
Compare
Member
Author
|
@dsp-ant Rebased. Thank you for reviewing! |
dsp-ant
approved these changes
Jun 5, 2025
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.
For ease of rebasing, this PR is split into two commits. The first commit contains the core changes; the second commit applies Prettier formatting.
Motivation and Context
Most
*.mdfiles were converted to*.mdxin #283, butpackage.jsonscripts and CI config were not updated to match. The first commit makes the necessary updates.Unfortunately, Prettier currently only supports MDX v1 (see prettier#15221 and prettier#12209), which causes it to treat content inside JSX tags as JSX instead of Markdown unless the content is surrounded by blank lines (see prettier#16589). Therefore, the first commit also adds blank lines inside JSX elements where necessary.
The first commit also removes the 89-character line wrap rule for
.mdfiles rather than update it for.mdxfiles. It's not clear that the rule was helpful, and we already have many files that do not abide by it:How Has This Been Tested?
No tests.
Breaking Changes
None.
Types of changes
Checklist
Additional context
I expect this will cause merge conflicts. I do not mind rebasing as necessary.