Skip to content

docs(www): format yield* in Effect snippets - #56568

Merged
kitlangton merged 1 commit into
devfrom
small-a11y-fixes
Oct 17, 2026
Merged

kitlangton merged 1 commit into
devfrom
small-a11y-fixes

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Why

Thirteen Effect examples in the v2 build docs show yield * with a space, and some split it across lines:

const client =
  yield *
  OpenCode.make({ baseUrl: "https://opencode.example.com" }).pipe(

These snippets are bodies of an Effect.gen generator. Prettier formats each code block on its own, so it reads a bare yield as an identifier and * as multiplication. Readers copy code that looks wrong.

What Changes

Each affected snippet is formatted as the body of a generator and marked {/* prettier-ignore */}, so the formatter leaves it alone:

const client = yield* OpenCode.make({ baseUrl: "https://opencode.example.com" }).pipe(

The snippets are in build/client/effect, build/plugins/effect and build/plugins/effect/rpc. Only their whitespace and line breaks change.

Verification

cd services/www && bun run build
bunx prettier --check src/docs/content/build
rg -n "yield \*" src/docs/content

The build and link validation pass, Prettier leaves the files unchanged, no yield * remains, and the rendered /v2/docs/build/client/effect/ page shows yield* with no visible prettier-ignore text.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This is a docs-only, whitespace-only change: no yield * remains under src/docs/content, and with the repo's pinned Prettier (3.6.2) and root config, prettier --check leaves all the changed snippets alone. plugins/effect/rpc.mdx is still flagged, but only for an unrelated ternary near line 96, and the base has the same warning. Public API is unchanged.

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