Skip to content

docs, comments: fix typos - #1755

Open
durvesh1992 wants to merge 2 commits into
react:mainfrom
durvesh1992:fix/comment-doc-typos
Open

docs, comments: fix typos#1755
durvesh1992 wants to merge 2 commits into
react:mainfrom
durvesh1992:fix/comment-doc-typos

Conversation

@durvesh1992

@durvesh1992 durvesh1992 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Small documentation/comment fixes: one broken doc anchor plus a batch of typo corrections in comments and test names. No runtime behavior changes.

Broken doc link

docs/Resolution.md linked to ./Configuration.md#resolvereqeuest, but the heading in Configuration.md is resolveRequest, so the anchor resolves to #resolverequest. The old link was dead.

Edit (rob): Fixed in #1922

Changes

File Before After
docs/Resolution.md #resolvereqeuest (dead anchor) #resolverequest
docs/Resolution.md "A alternative resolver function" "An alternative resolver function"
packages/metro-resolver/src/PackageResolve.js "A path begining with '/'" "A path beginning with '/'"
packages/metro-runtime/.../MetroFastRefreshMockRuntime.js "Fast Refresh has occured" "Fast Refresh has occurred"
packages/metro-file-map/src/watchers/NativeWatcher.js "wont' receive events" "won't receive events"
packages/metro-file-map/src/watchers/NativeWatcher.js "they indiciate a change" "they indicate a change"
packages/buck-worker-tool/.../worker-test.js "command finishes succesfully" (test name) "command finishes successfully"
packages/metro-config/.../exclusionList-test.js "simulate ... enviornment" (describe names) "simulate ... environment"
packages/metro-config/.../exclusionList-test.js setPathSeperator (local helper) setPathSeparator (matches existing originalSeparator)

Test plan

Comment/doc/test-name only. setPathSeperator is a function local to exclusionList-test.js; all 5 references were renamed together. No production code paths affected.

- docs/Resolution.md: fix broken anchor #resolvereqeuest -> #resolverequest
  (the linked heading in Configuration.md is "resolveRequest"), and
  "A alternative" -> "An alternative".
- Fix comment/test-description typos: occured -> occurred, begining ->
  beginning, succesfully -> successfully, wont' -> won't, indiciate ->
  indicate, enviornment -> environment.
- exclusionList-test.js: rename local helper setPathSeperator ->
  setPathSeparator (Seperator -> Separator), matching the existing
  originalSeparator variable.

All comment/doc/test-name only; no runtime behavior changes.
@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 Jun 29, 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 Jun 29, 2026
meta-codesync Bot pushed a commit that referenced this pull request Sep 10, 2026
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.

Pull Request resolved: #1922

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.

Reviewed By: cipolleschi

Differential Revision: D119472681

Pulled By: vzaidman

fbshipit-source-id: 439cd076205166f45d35dc3a65ee535416e30a19
@robhogan robhogan changed the title docs, comments: fix typos and a broken Resolution.md doc anchor docs, comments: fix typos Sep 10, 2026
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. 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.

2 participants