Skip to content

chore: apply prettier formatting to tracked docs files#3153

Merged
ihabadham merged 3 commits intomainfrom
ihabadham/chore/prettier-fix-docs
Apr 15, 2026
Merged

chore: apply prettier formatting to tracked docs files#3153
ihabadham merged 3 commits intomainfrom
ihabadham/chore/prettier-fix-docs

Conversation

@ihabadham
Copy link
Copy Markdown
Collaborator

@ihabadham ihabadham commented Apr 15, 2026

Summary

  • Applies prettier --write to five tracked docs files that are currently out of compliance on main.
  • No content changes — only whitespace/table-alignment fixes produced by Prettier.

Why this is needed

The formatting drift landed via a docs-only merge to main. The lint-js-and-ruby.yml workflow is conditionally skipped for docs-only commits on main (see the job condition at .github/workflows/lint-js-and-ruby.yml:79-87), so the check never ran on merge. It surfaces on every subsequent code-touching PR because the lint job runs for those (e.g. #3151, #3148, #3142, #3097).

Merging this unblocks the buildCheck formatting step on those PRs.

Test plan

  • pnpm start format.listDifferent passes for the five files
  • Diff is purely whitespace — no link targets, code blocks, or prose changed

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Improved formatting across API reference, core concepts, migration, and RSC docs: refined table layouts, adjusted column alignment, and standardized emphasis for clearer warnings.
    • Updated link text and phrasing for several guides for clearer navigation.
    • Reformatted code examples and JSX/Route snippets for more compact, consistent presentation and improved readability.

Restores prettier compliance on five tracked docs files that landed on
main via a docs-only commit. The lint workflow is conditionally skipped
for docs-only commits on main (see .github/workflows/lint-js-and-ruby.yml
job condition), so the formatting drift was never caught on merge. It
surfaces on every subsequent code-touching PR because the lint job runs
for them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d82dd150-5790-4ff9-bec8-638d4227a2c9

📥 Commits

Reviewing files that changed from the base of the PR and between 1330da5 and d22f06d.

📒 Files selected for processing (4)
  • docs/oss/api-reference/view-helpers-api.md
  • docs/oss/building-features/rails-webpacker-react-integration-options.md
  • docs/oss/core-concepts/auto-bundling-file-system-based-automated-bundle-generation.md
  • docs/oss/core-concepts/webpack-configuration.md
✅ Files skipped from review due to trivial changes (3)
  • docs/oss/building-features/rails-webpacker-react-integration-options.md
  • docs/oss/api-reference/view-helpers-api.md
  • docs/oss/core-concepts/auto-bundling-file-system-based-automated-bundle-generation.md

Walkthrough

Documentation-only edits: markdown tables reformatted, a render-function sentence turned into a quoted block, emphasis markup adjusted, and some JSX examples condensed. No behavioral, API, or code changes.

Changes

Cohort / File(s) Summary
Render-function note
docs/oss/api-reference/view-helpers-api.md
Converted a sentence about react_component_hash/render functions into a quoted block and updated its link text; content unchanged.
Table restructuring
docs/oss/core-concepts/auto-bundling-file-system-based-automated-bundle-generation.md, docs/oss/core-concepts/render-functions.md, docs/oss/migrating/migrating-to-rsc.md, docs/pro/react-server-components/inside-client-components.md
Reformatted Markdown tables (column widths, alignment, header separators) for presentation; no semantic or content changes.
Examples & emphasis
docs/oss/core-concepts/render-functions.md, docs/pro/react-server-components/inside-client-components.md, docs/oss/building-features/rails-webpacker-react-integration-options.md, docs/oss/core-concepts/webpack-configuration.md
Adjusted emphasis markup (e.g., *not*_not_), condensed multi-line JSX examples into single-line, and revised link text wording; behavior and referenced links unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I nibble at tables, straighten every line, 🐇
A quoted carrot, links that now shine,
No code was harmed, just spacing refined,
A hop, a tuck—documentation aligned,
Cheerful thumps for formatting fine!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: applying Prettier formatting to documentation files. It is concise, clear, and directly reflects the changeset's primary objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ihabadham/chore/prettier-fix-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 15, 2026

Review: chore: apply prettier formatting to tracked docs files

The PR accomplishes its stated goal — fixing Prettier compliance on five docs files and unblocking CI on downstream PRs. Changes to table alignment and *not*_not_ (both render identically) are genuinely whitespace-only.

Two things worth a second look:

1. view-helpers-api.md — blockquote > addition is a rendering change, not whitespace

The PR description says "no content changes — only whitespace/table-alignment fixes," but this hunk adds > to a line that didn't have one before:

-  All options except `props, id, html_options` will inherit from your `react_on_rails.rb` initializer, as described [here](../configuration/README.md).
+  > All options except `props, id, html_options` will inherit from your `react_on_rails.rb` initializer, as described [here](../configuration/README.md).

That changes the rendered Markdown — the sentence joins the blockquote above it instead of appearing as a plain paragraph. The result looks intentionally correct (both sentences are notes about component_name options), but reviewers should be aware this isn't a pure whitespace change.

2. inside-client-components.md — code examples collapse to single long lines

Two JSX snippets used as doc examples are reformatted from multi-line to single line (e.g. <Route> and <button> elements). The code is functionally identical, but single-line JSX is harder to scan as documentation. This is a Prettier trade-off that's worth accepting for compliance, but it's not a neutral no-op from a readability standpoint.

Overall

Both points are minor. The changes correctly fix formatting drift and unblock CI. Approving with the note that the view-helpers-api.md change is slightly mis-described in the PR summary.

Comment thread docs/oss/api-reference/view-helpers-api.md Outdated
Comment thread docs/pro/react-server-components/inside-client-components.md
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 15, 2026

Greptile Summary

This PR applies prettier --write to five documentation files to fix formatting drift that was introduced via a docs-only merge to main (bypassing the lint workflow). Changes are table column alignment, JSX reformatting within fenced code blocks, and minor Markdown normalization — with one exception noted below.

  • docs/oss/api-reference/view-helpers-api.md line 28 gains a > prefix that changes a plain-text paragraph into a blockquote, which is a rendering change — not purely whitespace as the PR description states.

Confidence Score: 5/5

Safe to merge; all changes are documentation formatting with one trivial rendering normalization.

All findings are P2. The single non-whitespace change (adding > in view-helpers-api.md) normalizes a blockquote continuation that was almost certainly intended by the original author, and has no correctness or data-integrity implications.

docs/oss/api-reference/view-helpers-api.md — verify the > addition matches the intended rendering for that paragraph.

Important Files Changed

Filename Overview
docs/oss/api-reference/view-helpers-api.md One-character rendering change: > prefix added to a line, converting plain text to a blockquote — contradicts the PR's "whitespace-only" claim.
docs/oss/core-concepts/auto-bundling-file-system-based-automated-bundle-generation.md Pure table column padding adjustment; no content or rendering changes.
docs/oss/core-concepts/render-functions.md Table alignment reformatted; *not* normalized to _not_ (equivalent italic syntax); blank line added before > [!WARNING] admonition — all rendering-safe changes.
docs/oss/migrating/migrating-to-rsc.md Table column widths expanded for alignment; no content changes.
docs/pro/react-server-components/inside-client-components.md JSX in fenced code blocks collapsed to single lines by Prettier; API reference table reformatted — no prose or link changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[docs-only merge to main] -->|lint-js-and-ruby skipped for docs-only commits| B[Formatting drift accumulates]
    B -->|Code-touching PRs run lint| C[Check formatting fails on subsequent PRs]
    C --> D[This PR: prettier --write on 5 files]
    D --> E[Formatting restored]
    E -->|Unblocks| F[#3151, #3148, #3142, #3097]
Loading

Reviews (1): Last reviewed commit: "chore: apply prettier formatting to docs" | Re-trigger Greptile

Comment thread docs/oss/api-reference/view-helpers-api.md
Prettier was normalizing adjacent indented lines inside the same list
item by propagating the blockquote prefix to a plain-text continuation.
Insert a blank line between them so the source unambiguously expresses
two separate blocks — blockquote (react_component_hash warning) and
plain paragraph (initializer inheritance note). Keeps the rendered
output aligned with the original intent and keeps this PR truly
whitespace-only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 15, 2026

LGTM review: This is a pure Prettier formatting pass — no content changes. The diff is exactly what prettier --write produces. All changes are mechanical: blank lines around block-quotes in view-helpers-api.md, GFM table column-width padding in the four other files, not normalised to not (both valid italic markdown, Prettier prefers underscores), and short JSX Route/button examples collapsed to single lines in inside-client-components.md. Safe to merge — will unblock the Check formatting step on other open PRs.

@ihabadham
Copy link
Copy Markdown
Collaborator Author

Address-review summary

Scan scope: full history (first run, no prior summary).

Mattered

  • docs/oss/api-reference/view-helpers-api.md:29 (@claude[bot]) — prettier propagated the > blockquote prefix to a plain-text continuation, changing the rendered output. Fixed in 1330da5 by inserting a blank line between the blockquote and the plain paragraph so prettier sees them as separate blocks. Thread resolved.
  • docs/oss/api-reference/view-helpers-api.md:28 (@greptile-apps[bot]) — same finding as above (duplicate). Addressed by the same commit. Thread resolved.
  • docs/pro/react-server-components/inside-client-components.md:76 (@claude[bot]) — JSX examples collapse to single long lines. Reviewer explicitly flagged as non-blocker, accepting for compliance. Replied and resolved.

Skipped

  • Issue comment (@coderabbitai[bot]) — "No actionable comments" status post. No reply needed.
  • Issue comment (@claude[bot]) — review summary duplicating the two inline findings already addressed above. No separate reply needed.
  • Issue comment (@greptile-apps[bot]) — 5/5 confidence "Safe to merge" summary. No reply needed.

Net result: PR is now whitespace-only as the description claims (blank lines and table-alignment padding). All review threads resolved.

Next default scan starts after this comment. Say `check all reviews` to rescan the full PR.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/oss/api-reference/view-helpers-api.md`:
- Line 31: Replace the vague link text "[here]" in
docs/oss/api-reference/view-helpers-api.md with a descriptive phrase (e.g.,
"React on Rails configuration") so the link reads like "as described in the
React on Rails configuration" and points to ../configuration/README.md; update
the link text only (keep the same target) to satisfy accessibility/scannability
rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 05914752-f755-49ae-9516-62ef5b2e76df

📥 Commits

Reviewing files that changed from the base of the PR and between 10bcfae and 1330da5.

📒 Files selected for processing (1)
  • docs/oss/api-reference/view-helpers-api.md

Comment thread docs/oss/api-reference/view-helpers-api.md Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

Tip

For best results, initiate chat on the files or code changes.

@ihabadham Thanks for the thorough address-review summary. The fix in 1330da587 — inserting a blank line to separate the blockquote from the plain paragraph — is the correct approach to keep the rendered output faithful to the original intent while satisfying Prettier. All threads resolved and the PR is now purely whitespace/table-alignment as described. Approving.

[approve]


🧠 Learnings used
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-12T23:15:11.806Z
Learning: For small, focused PRs (5 files changed or fewer with one clear purpose): use at most one AI reviewer that leaves inline comments; additional AI tools should be summary-only or used manually

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-21T08:53:17.309Z
Learning: For small, focused PRs (roughly 5 files or fewer with one clear purpose): use at most one AI reviewer for inline comments, batch review fixes into one follow-up push, and verify language/runtime/library claims locally before making code changes in response to AI review

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: react_on_rails_pro/CLAUDE.md:0-0
Timestamp: 2026-02-24T16:52:47.694Z
Learning: Applies to react_on_rails_pro/**/*.{js,ts,tsx,jsx,json,css,md} : Pro Prettier check should be run with: `cd react_on_rails_pro && pnpm run prettier --check .`

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-12T23:15:11.806Z
Learning: Applies to CHANGELOG.md : Changelog format: `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` (no hash before PR number)

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: react_on_rails_pro/CLAUDE.md:0-0
Timestamp: 2026-02-24T16:52:47.694Z
Learning: Applies to react_on_rails_pro/**/*.{js,ts,tsx,jsx,json,css,md} : Pro has its own Prettier configuration in `.prettierrc` and `.prettierignore` (separate from root)

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-10T04:28:46.123Z
Learning: Applies to CHANGELOG.md : Format CHANGELOG entries as `[PR NUMBER](url) by [username](url)` without hash before PR number; use inline `**[Pro]**` prefix for Pro-only features

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-12T23:15:11.806Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use Prettier for all JavaScript/TypeScript formatting; never manually format code

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-10T04:28:46.123Z
Learning: Applies to CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements); exclude linting, formatting, refactoring, tests, and doc fixes

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-12T23:15:11.806Z
Learning: Applies to CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements); exclude linting, formatting, refactoring, tests, and doc fixes

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T22:10:33.821Z
Learning: Applies to CHANGELOG.md : Update `/CHANGELOG.md` only for user-visible changes (features, bug fixes, breaking changes, deprecations, performance improvements) — do NOT add entries for linting, formatting, refactoring, tests, or doc fixes

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 15, 2026

Good summary — all threads accounted for. The blockquote fix in 1330da587 correctly addresses the only substantive concern (the > prefix propagating to a continuation line would have changed rendered output). Everything else is purely whitespace alignment.

PR looks good to merge.

Aligns four legacy outliers with the docs directory's dominant link-text
convention (1216 of 1220 links already use descriptive text). Also
satisfies markdownlint MD059 on the line flagged during review.

Files touched:
  - docs/oss/api-reference/view-helpers-api.md
  - docs/oss/building-features/rails-webpacker-react-integration-options.md
  - docs/oss/core-concepts/auto-bundling-file-system-based-automated-bundle-generation.md
  - docs/oss/core-concepts/webpack-configuration.md

Link targets unchanged — only the visible link text is updated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ihabadham
Copy link
Copy Markdown
Collaborator Author

Address-review summary

Scan scope: since previous summary at 2026-04-15T20:01:31Z.

Mattered

  • docs/oss/api-reference/view-helpers-api.md:31 (@coderabbitai[bot], MD059) — vague [here] link text. Fixed in d22f06d. Scope expanded to all four [here] occurrences in the docs directory after checking the codebase convention (1216 of 1220 existing links already use descriptive text, so [here] was a legacy outlier, not an established style). Thread resolved.

Skipped

  • Issue comment (@coderabbitai[bot]) — approval reply to the previous summary. No reply needed.
  • Issue comment (@greptile-apps[bot]) — "PR looks good to merge". No reply needed.

Net result: all four [here] link-text outliers aligned with the descriptive-link convention; targets unchanged. Prettier still clean. All review threads resolved.

Next default scan starts after this comment. Say check all reviews to rescan the full PR.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

Tip

For best results, initiate chat on the files or code changes.

@ihabadham Thanks for the thorough fix — updating all four [here] outliers rather than just the one flagged keeps the docs consistent with the 1216/1220 majority that already use descriptive link text. Targets unchanged, Prettier still clean, all threads resolved. The PR looks good to merge.


🧠 Learnings used
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-12T23:15:11.806Z
Learning: For small, focused PRs (5 files changed or fewer with one clear purpose): use at most one AI reviewer that leaves inline comments; additional AI tools should be summary-only or used manually

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-21T08:53:17.309Z
Learning: For small, focused PRs (roughly 5 files or fewer with one clear purpose): use at most one AI reviewer for inline comments, batch review fixes into one follow-up push, and verify language/runtime/library claims locally before making code changes in response to AI review

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: react_on_rails_pro/CLAUDE.md:0-0
Timestamp: 2026-02-24T16:52:47.694Z
Learning: Applies to react_on_rails_pro/**/*.{js,ts,tsx,jsx,json,css,md} : Pro Prettier check should be run with: `cd react_on_rails_pro && pnpm run prettier --check .`

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-12T23:15:11.806Z
Learning: Applies to CHANGELOG.md : Changelog format: `[PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)` (no hash before PR number)

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: react_on_rails_pro/CLAUDE.md:0-0
Timestamp: 2026-02-24T16:52:47.694Z
Learning: Applies to react_on_rails_pro/**/*.{js,ts,tsx,jsx,json,css,md} : Pro has its own Prettier configuration in `.prettierrc` and `.prettierignore` (separate from root)

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-10T04:28:46.123Z
Learning: Applies to CHANGELOG.md : Format CHANGELOG entries as `[PR NUMBER](url) by [username](url)` without hash before PR number; use inline `**[Pro]**` prefix for Pro-only features

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-12T23:15:11.806Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use Prettier for all JavaScript/TypeScript formatting; never manually format code

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-10T04:28:46.123Z
Learning: Applies to CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements); exclude linting, formatting, refactoring, tests, and doc fixes

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-12T23:15:11.806Z
Learning: Applies to CHANGELOG.md : Update `/CHANGELOG.md` for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements); exclude linting, formatting, refactoring, tests, and doc fixes

Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-17T22:10:33.821Z
Learning: Applies to CHANGELOG.md : Update `/CHANGELOG.md` only for user-visible changes (features, bug fixes, breaking changes, deprecations, performance improvements) — do NOT add entries for linting, formatting, refactoring, tests, or doc fixes

If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 15, 2026

Thanks for the summary. The [here] link-text fix looks good — expanding the scope to all four occurrences in the docs directory was the right call given the 1220:4 ratio in the codebase.

PR looks clean: purely mechanical Prettier changes + the descriptive link text improvement. Ready to merge once CI clears.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 15, 2026

Code Review

Overview

This PR applies prettier --write to five tracked docs files to fix formatting drift that was unblocked by the conditional CI skip for docs-only merges to main. The change is straightforward and low-risk.


Inaccuracy in PR Description

The description states "No content changes — only whitespace/table-alignment fixes produced by Prettier", but the diff includes several meaningful (if minor) content edits:

  • Link text improvements across multiple files — bare [here](...) links were replaced with descriptive anchor text (e.g. "[Shakapacker README]", "[configuration documentation]", "[example commit adding this in the SSR HMR demo]"). These are welcome accessibility/SEO improvements, but they are content changes, not just whitespace.
  • Emphasis style change in render-functions.md: *not*_not_ (semantically identical in Markdown, but a visible diff).
  • JSX code example reformatting in inside-client-components.md: multi-line JSX blocks collapsed to long single lines.

None of these are problems on their own, but the description should acknowledge the link-text edits and code-example reformat so reviewers know what they're approving.


Code Quality & Correctness

Area Finding
Table alignment Correct — purely cosmetic, renders identically
Link text changes Improvements — descriptive links are preferable to bare "here" links
*not*_not_ No-op in rendered output
JSX reformatting See inline comment — long single lines in code examples can hurt readability

Summary

The core fix (unblocking CI by re-aligning formatting on main) is correct and needed. The link-text improvements are a bonus. One inline note on JSX code-example readability; otherwise looks good to merge.

path="/profile"
element={<RSCRoute componentName="Profile" componentProps={{ userId }} />}
/>
<Route path="/profile" element={<RSCRoute componentName="Profile" componentProps={{ userId }} />} />
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.

Prettier collapsed this from a readable multi-line JSX block to a 105-character single-line. In documentation, long code-example lines force horizontal scrolling in many renderers and are harder to read.

If Prettier keeps collapsing this, consider adding a // prettier-ignore comment above the opening <Route tag, or adjusting printWidth in .prettierrc for markdown code blocks. The multi-line version was clearer for readers:

Suggested change
<Route path="/profile" element={<RSCRoute componentName="Profile" componentProps={{ userId }} />} />
<Route
path="/profile"
element={<RSCRoute componentName="Profile" componentProps={{ userId }} />}
/>

<button onClick={() => setIsOpen(!isOpen)}>
{isOpen ? 'Hide' : 'Show'} details
</button>
<button onClick={() => setIsOpen(!isOpen)}>{isOpen ? 'Hide' : 'Show'} details</button>
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.

Same concern — the collapsed single-line mixes an event handler, a ternary expression, and inline text, making it harder to parse at a glance in documentation. The previous three-line form was more readable for a code example:

Suggested change
<button onClick={() => setIsOpen(!isOpen)}>{isOpen ? 'Hide' : 'Show'} details</button>
<button onClick={() => setIsOpen(!isOpen)}>
{isOpen ? 'Hide' : 'Show'} details
</button>

@ihabadham ihabadham merged commit ad45e4a into main Apr 15, 2026
18 checks passed
@ihabadham ihabadham deleted the ihabadham/chore/prettier-fix-docs branch April 15, 2026 20:10
justin808 added a commit that referenced this pull request Apr 18, 2026
…ages

* origin/main:
  Fix initial page startup race for late-loading client bundles (#3151)
  chore: apply prettier formatting to tracked docs files (#3153)
  docs: comprehensive RSC API documentation and registration consolidation (#3140)
  Split rspec-package-tests into parallel generator/unit shards (#3134)
  fix: add concurrency groups to long-running CI workflows (#3133)
  refactor: add RenderRequest, JsCodeBuilder, and RenderingStrategy abstractions (#3094)
  fix: address deferred review items from PR #2849 (#3093)
  Add complimentary OSS license policy for React on Rails Pro (#3123)
  fix: centralize CI docs-only detection and add CLI flag validation (#3091)
  refactor: replace stub-throw + Object.assign with capability-based composition (#3096)
  Enhance address-review with parallel fixes, self-review, and Greptile verification (#3121)
  fix: Doctor no longer fails custom projects for missing bin/dev (#3117)
  fix: cap webpack <5.106.0 to prevent ExecJS SSR breakage (#3095)
  Add Rspack + RSC compatibility tests and documentation (#1828) (#3120)
  Add error scenarios hub and test pages (#2497)
  docs: document polyfill requirements for web-targeted server bundles (#3092)
  docs: RSC integration pitfalls from tutorial app (#3087)
  docs: fix render function/helper API documentation (#3088)
  Doctor: accept TS/TSX server bundle suffixes (#3111)
  feat: add CI guard requiring sidebar updates when adding docs (#3089)
justin808 pushed a commit that referenced this pull request Apr 18, 2026
## Summary

- Applies `prettier --write` to five tracked docs files that are
currently out of compliance on `main`.
- No content changes — only whitespace/table-alignment fixes produced by
Prettier.

## Why this is needed

The formatting drift landed via a docs-only merge to `main`. The
`lint-js-and-ruby.yml` workflow is conditionally skipped for docs-only
commits on `main` (see the job condition at
[`.github/workflows/lint-js-and-ruby.yml:79-87`](https://github.com/shakacode/react_on_rails/blob/main/.github/workflows/lint-js-and-ruby.yml#L79-L87)),
so the check never ran on merge. It surfaces on every subsequent
code-touching PR because the lint job runs for those (e.g.
[#3151](#3151),
[#3148](#3148),
[#3142](#3142),
[#3097](#3097)).

Merging this unblocks the `build` → `Check formatting` step on those
PRs.

## Test plan

- [x] `pnpm start format.listDifferent` passes for the five files
- [x] Diff is purely whitespace — no link targets, code blocks, or prose
changed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Improved formatting across API reference, core concepts, migration,
and RSC docs: refined table layouts, adjusted column alignment, and
standardized emphasis for clearer warnings.
* Updated link text and phrasing for several guides for clearer
navigation.
* Reformatted code examples and JSX/Route snippets for more compact,
consistent presentation and improved readability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant