Skip to content

Docs: fix all broken anchors, and fail the build on new ones - #1922

Closed
robhogan wants to merge 1 commit into
react:mainfrom
robhogan:docs-broken-anchors
Closed

Docs: fix all broken anchors, and fail the build on new ones#1922
robhogan wants to merge 1 commit into
react:mainfrom
robhogan:docs-broken-anchors

Conversation

@robhogan

Copy link
Copy Markdown
Collaborator

Summary

The website build reports ten broken anchors and ships anyway. Fix them, and set onBrokenAnchors: 'throw' so the next one fails the build instead of accumulating.

Most are stale or mistyped anchors:

link fixed to
#require-resolveweak #requireresolveweak
#extranodemodules #extranodemodules-string-string
#disableHierarchicalLookup-boolean #disablehierarchicallookup-boolean
#resolve_package-exports #resolve_package_exports
#doesfileexist-string--boolean #doesfileexist-string--boolean-deprecated
#dev #dev-boolean
configuration#resolvereqeuest configuration#resolverequest

Two were not just anchors:

  • context.enablePackageExports has been unstable_enablePackageExports since it was introduced, and the link pointed at a heading that never existed on that page. Corrected the name in both prose and link, and pointed it at the config entry, matching how RESOLVE_PACKAGE_EXPORTS already refers to it.
  • resolver.assetResolutions is a real option (metro-config/src/types.js) with three inbound doc links but no entry in Configuration.md. Documented it, with the default and the @${resolution}x filename form the default resolveAsset uses.

Note this includes the resolvereqeuest fix also made by #1755, which additionally fixes some code comment typos.

Test plan

yarn build in website/ passes with no broken anchors reported.

Confirmed onBrokenAnchors: 'throw' actually takes effect: adding a deliberate #this-anchor-does-not-exist link fails the build with Docusaurus found broken anchors!, and removing it passes again.

The website build reports ten broken anchors and ships anyway. Fix them, and set `onBrokenAnchors: 'throw'` so the next one fails the build instead of accumulating.

Most are stale or mistyped anchors:

| link | fixed to |
|---|---|
| `#require-resolveweak` | `#requireresolveweak` |
| `#extranodemodules` | `#extranodemodules-string-string` |
| `#disableHierarchicalLookup-boolean` | `#disablehierarchicallookup-boolean` |
| `#resolve_package-exports` | `#resolve_package_exports` |
| `#doesfileexist-string--boolean` | `#doesfileexist-string--boolean-deprecated` |
| `#dev` | `#dev-boolean` |
| `configuration#resolvereqeuest` | `configuration#resolverequest` |

Two were not just anchors:

- `context.enablePackageExports` has been `unstable_enablePackageExports` since it was introduced, and the link pointed at a heading that never existed on that page. Corrected the name in both prose and link, and pointed it at the config entry, matching how RESOLVE_PACKAGE_EXPORTS already refers to it.
- `resolver.assetResolutions` is a real option (`metro-config/src/types.js`) with three inbound doc links but no entry in Configuration.md. Documented it.

Changelog: [Internal]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 10, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Sep 10, 2026
@meta-codesync

meta-codesync Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@vzaidman has imported this pull request. If you are a Meta employee, you can view this in D119472681.

@meta-codesync meta-codesync Bot closed this in 0ff28e6 Sep 10, 2026
@meta-codesync meta-codesync Bot added the Merged label Sep 10, 2026
@meta-codesync

meta-codesync Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@vzaidman merged this pull request in 0ff28e6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant