Skip to content

fix: typos in JSDoc, comments, and test descriptions#3717

Open
andromia3 wants to merge 1 commit intoShopify:mainfrom
andromia3:fix/typos-code
Open

fix: typos in JSDoc, comments, and test descriptions#3717
andromia3 wants to merge 1 commit intoShopify:mainfrom
andromia3:fix/typos-code

Conversation

@andromia3
Copy link
Copy Markdown

No functional changes. Every edit is to an inline comment, a JSDoc string, or a test-description string passed to `describe`/`it`. No identifiers, no runtime behaviour, no public API shape touched.

JSDoc on public API

These two live on public types and show up in IDE tooltips + shopify.dev:

  • `packages/hydrogen/src/analytics-manager/AnalyticsProvider.tsx` — `AnalyticsProviderProps.canTrack`:
    ```diff
  • /** An optional function to set wether the user can be tracked. ... */
  • /** An optional function to set whether the user can be tracked. ... */
    ```
  • `packages/hydrogen/src/seo/generate-seo-tags.ts` — `SeoConfig.media` `@example`:
    ```diff
    •   altText: 'A custom snowboard with an alpine color pallet.',
      
    •   altText: 'A custom snowboard with an alpine color palette.',
      

```
("pallet" = shipping platform; "palette" = range of colours.)

Because both strings are mirrored into `packages/hydrogen/docs/generated/generated_docs_data.json` (committed alongside source), that file is updated in the same commit so it stays in sync. If anything drifted, `pnpm run build-docs` would regenerate cleanly.

Comments in a CLI skeleton asset

`packages/cli/assets/routes/locale-check.ts`:
```diff

  • // If the locale URL param is defined, yet we still are still at the default locale
  • // then the the locale param must be invalid, send to the 404 page
  • // If the locale URL param is defined, yet we are still at the default locale
  • // then the locale param must be invalid, send to the 404 page
    ```
    Two independent typos on consecutive lines: a duplicated `still` and a duplicated `the`.

Test-description strings

All are just strings in `it(...)` / `describe(...)` — renaming them is risk-free (no identifiers reference them).

  • `packages/hydrogen-codegen/tests/client.test-d.ts` — `fallsback` → `falls back`; `overriden` → `overridden`.
  • `packages/hydrogen/src/storefront.test.ts` — `fallsback` → `falls back`.
  • `packages/cli/src/lib/environment-variables.test.ts` — `doest not fail` → `does not fail`.
  • `packages/hydrogen-react/src/AddToCartButton.test.tsx` — `explicity` → `explicitly` (x2, one `describe` and one nested `describe`).

No changeset: none of this is user-facing behaviour, and the Changeset Reminder workflow explicitly notes "If you are making simple updates to examples or documentation, you do not need to add a changeset."

@andromia3 andromia3 requested a review from a team as a code owner April 14, 2026 14:50
No functional changes — all edits are to inline comments, JSDoc
strings, or test-description strings passed to `describe`/`it`.

JSDoc on public API (visible in IDE tooltips and on shopify.dev):
- AnalyticsProvider.tsx: `wether` -> `whether`
- generate-seo-tags.ts: `color pallet` -> `color palette`

Because these two JSDoc blocks are mirrored into the committed
docs/generated/generated_docs_data.json file, the matching strings
there are updated in lock-step so the generated file stays in sync
with its source.

Comment cleanup in the CLI skeleton asset:
- locale-check.ts: `still are still` had a redundant `still`, and
  the following line had a duplicated `the the`.

Test descriptions (strings only, no identifier changes):
- client.test-d.ts: `fallsback` -> `falls back`; `overriden` ->
  `overridden`.
- storefront.test.ts: `fallsback` -> `falls back`.
- environment-variables.test.ts: `doest not fail` -> `does not fail`.
- AddToCartButton.test.tsx: `explicity` -> `explicitly` (x2).

No changeset needed — no user-facing behavioral changes. The two
JSDoc strings that do reach shopify.dev are updated via the
generated_docs_data.json file in this same commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant