Skip to content

fix(prettier): ignore generated genui API docs#1118

Merged
upupming merged 1 commit into
mainfrom
fix/prettierignore-genui
Jun 15, 2026
Merged

fix(prettier): ignore generated genui API docs#1118
upupming merged 1 commit into
mainfrom
fix/prettierignore-genui

Conversation

@upupming

@upupming upupming commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Why

Every auto-generated API doc directory is already excluded from Prettier — react, rspeedy, lynx-testing-environment, reactlynx-testing-library. genui was missed when its generation was added to scripts/update-api-docs.sh.

It went unnoticed because the husky pre-commit hook ran prettier --write and silently formatted the generated genui files on commit. The update-api-docs workflow now commits with HUSKY=0 (to avoid the cspell hook blocking the bot PR — see #1117), so the generated genui docs are committed as-generated and the Format Check (prettier --check .) CI gate fails on them.

Generated docs shouldn't be hand-formatted; they should be ignored — same as the sibling generated dirs. This adds genui to .prettierignore for both locales.

Effect

  • The weekly Update API docs auto-PR stops failing Format Check.
  • No behavior change for hand-written docs.

Add genui to .prettierignore for auto-generated API documentation

Add genui to .prettierignore for both English and Chinese locale directories (/docs/en/api/genui/** and /docs/zh/api/genui/**) to exclude auto-generated API documentation from formatting checks. This prevents the Format Check CI gate from failing on unformatted generated files while maintaining consistency with other auto-generated documentation directories like react, rspeedy, lynx-testing-environment, and reactlynx-testing-library.

Every other auto-generated API doc dir (rspeedy, react, the two TypeDoc
dirs) is already in .prettierignore; genui was missed when its generation
was added. Previously the husky pre-commit prettier --write masked this by
formatting genui on commit, but the update-api-docs workflow now commits
with HUSKY=0, so unformatted genui docs reach the PR and fail the
Format Check (prettier --check) gate. Ignore genui like the others.
@upupming upupming requested a review from Huxpro as a code owner June 15, 2026 04:21
@netlify

netlify Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploy Preview for lynx-doc ready!

Name Link
🔨 Latest commit d8be78d
🔍 Latest deploy log https://app.netlify.com/projects/lynx-doc/deploys/6a2f7ddde94a780008528e28
😎 Deploy Preview https://deploy-preview-1118--lynx-doc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 38933b01-88b5-4513-861a-32d405204140

📥 Commits

Reviewing files that changed from the base of the PR and between b5a00c5 and d8be78d.

📒 Files selected for processing (1)
  • .prettierignore

Walkthrough

Two entries are added to .prettierignore to exclude generated genui API documentation directories from Prettier formatting, covering both the English (/docs/en/api/genui/**) and Chinese (/docs/zh/api/genui/**) locale paths within the existing grouped API ignore section.

Changes

Prettier Ignore Update

Layer / File(s) Summary
Add genui API doc paths to ignore list
.prettierignore
Appends /docs/en/api/genui/** and /docs/zh/api/genui/** to the existing API documentation ignore block alongside the existing lynx-testing-environment, reactlynx-testing-library, react, and rspeedy entries.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • Huxpro
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding genui API docs to Prettier's ignore list to fix formatting issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 fix/prettierignore-genui

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.

@upupming upupming merged commit b80eec4 into main Jun 15, 2026
12 of 13 checks passed
@upupming upupming deleted the fix/prettierignore-genui branch June 15, 2026 04:27
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