Repository navigation
Conversation
Summary: Extracts the markdown linting React Native uses at Meta into Metro's OSS setup, and fixes the existing issues. - `yarn lint-markdown` runs `markdownlint-cli2` on `docs/*.md`. It runs on GitHub CI (`build-test-and-deploy.yml`), in the internal OSS Metro tests (`test-oss-metro-legocastle.sh`) and in `yarn test`. - `.markdownlint-cli2.jsonc` enables the same rules as React Native's `.markdownlint-cli2.mjs`, e.g. `heading-increment`, `link-fragments` and `no-trailing-punctuation`. React Native's `relative-links` custom rule is not used: it includes the HTML of headings such as `` `unstable_middleware` <div class="label experimental">Experimental</div> `` in their anchors, so it rejects valid links like `./Configuration.md#unstable_middleware-experimental`. Links between pages are checked by the website build (`onBrokenLinks`/`onBrokenAnchors: throw`). Fixes: - `heading-increment`: "Merging Example" in `Configuration.md`, and the top-level sections of `LocalDevelopment.md` and `Troubleshooting.md`, are one level higher. - `no-space-in-code`: the `schemeResolvers` type is a single code span, followed by a link to `CustomResolver`. - `no-trailing-punctuation`: "File extensions are important!" in `PackageExports.md` loses the "!". Heading anchors are unchanged. Changelog: [Internal] Differential Revision: D127663612
Summary: Adds a blank line after each opening `:::note`/`:::info`/`:::caution` and before each closing `:::`. Without them, prettier treats the closing `:::` as part of a preceding list item and indents it, which breaks the admonition. Docusaurus recommends these blank lines when formatting Markdown with prettier. This prepares the docs for formatting with prettier in the next diff. No rendered changes. Changelog: [Internal] Differential Revision: D127668483
Contributor
|
@vzaidman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D127668483. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
Oct 29, 2026
Summary: Adds a blank line after each opening `:::note`/`:::info`/`:::caution` and before each closing `:::`. Without them, prettier treats the closing `:::` as part of a preceding list item and indents it, which breaks the admonition. Docusaurus recommends these blank lines when formatting Markdown with prettier. This prepares the docs for formatting with prettier in the next diff. No rendered changes. Changelog: [Internal] Differential Revision: D127668483
meta-codesync Bot
pushed a commit
that referenced
this pull request
Oct 29, 2026
Summary: Adds a blank line after each opening `:::note`/`:::info`/`:::caution` and before each closing `:::`. Without them, prettier treats the closing `:::` as part of a preceding list item and indents it, which breaks the admonition. Docusaurus recommends these blank lines when formatting Markdown with prettier. This prepares the docs for formatting with prettier in the next diff. No rendered changes. Changelog: [Internal] Differential Revision: D127668483
This branch has not been deployed
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.
Summary:
Adds a blank line after each opening
:::note/:::info/:::cautionand before each closing:::. Without them, prettier treats the closing:::as part of a preceding list item and indents it, which breaks the admonition. Docusaurus recommends these blank lines when formatting Markdown with prettier.This prepares the docs for formatting with prettier in the next diff. No rendered changes.
Changelog: [Internal]
Differential Revision: D127668483