feat(create-rslib): add ReactLynx templates - #1910
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying rslib with
|
| Latest commit: |
aadf97e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://033619f8.rslib.pages.dev |
| Branch Preview URL: | https://david-reactlynx-template.rslib.pages.dev |
There was a problem hiding this comment.
🟡 Changes recommended
The create-rslib tests should assert the ReactLynx templates’ key invariants (preserved JSX + .jsx exports/config) to prevent shipping a broken scaffold.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds new ReactLynx project scaffolding to packages/create-rslib, wiring it into the CLI template picker and updating documentation so users can discover and generate ReactLynx libraries. The new templates are configured to preserve JSX output and include Rstest-based component tests.
Changes:
- Add
reactlynx-js/reactlynx-tstemplates (config, sample component, and tests). - Register the new templates in
create-rslib(template list + interactive selection + lint template mapping + tool gating). - Update quick-start docs (EN/ZH) and spelling dictionary to include “ReactLynx”.
File summaries
| File | Description |
|---|---|
| website/docs/zh/guide/start/quick-start.mdx | Document ReactLynx template in the Chinese quick-start template list and CLI template list. |
| website/docs/en/guide/start/quick-start.mdx | Document ReactLynx template in the English quick-start template list and CLI template list. |
| scripts/dictionary.txt | Add reactlynx to the repo dictionary for spellchecking. |
| packages/create-rslib/test/index.test.ts | Add coverage for parsing and generating reactlynx-{js,ts} templates. |
| packages/create-rslib/test/helper.ts | Add ReactLynx-specific package.json validation in the scaffold test helper. |
| packages/create-rslib/template-reactlynx-ts/tsconfig.json | New TS template compiler options (preserve JSX + Lynx import source). |
| packages/create-rslib/template-reactlynx-ts/tests/tsconfig.json | New TS test tsconfig extending the template config. |
| packages/create-rslib/template-reactlynx-ts/tests/index.test.tsx | New Rstest component test for the TS ReactLynx template. |
| packages/create-rslib/template-reactlynx-ts/src/ScrollList.tsx | New sample ReactLynx component (TS). |
| packages/create-rslib/template-reactlynx-ts/src/index.ts | Export surface for the TS template. |
| packages/create-rslib/template-reactlynx-ts/rstest.config.ts | Rstest config integrating Lynx testing defaults + rsbuild plugin. |
| packages/create-rslib/template-reactlynx-ts/rslib.config.ts | Rslib config to preserve JSX and emit .jsx filenames. |
| packages/create-rslib/template-reactlynx-ts/package.json | New TS template package manifest (exports .jsx + types). |
| packages/create-rslib/template-reactlynx-js/tests/index.test.jsx | New Rstest component test for the JS ReactLynx template. |
| packages/create-rslib/template-reactlynx-js/src/ScrollList.jsx | New sample ReactLynx component (JS). |
| packages/create-rslib/template-reactlynx-js/src/index.js | Export surface for the JS template. |
| packages/create-rslib/template-reactlynx-js/rstest.config.js | Rstest config integrating Lynx testing defaults + rsbuild plugin (JS). |
| packages/create-rslib/template-reactlynx-js/rslib.config.js | Rslib config to preserve JSX and emit .jsx filenames (JS). |
| packages/create-rslib/template-reactlynx-js/package.json | New JS template package manifest (exports .jsx). |
| packages/create-rslib/src/index.ts | Register ReactLynx templates and ensure optional tools (react-compiler/storybook) only apply to intended templates. |
Review details
- Files reviewed: 20/20 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Add JavaScript and TypeScript ReactLynx templates to create-rslib, with builds that preserve JSX and optional Rstest component testing. Reuse the React lint presets, include Lynx documentation in the generated
AGENTS.md, and document the new template in the quick-start guide.Related links
Checklist