Skip to content

refactor(create-rslib): layer template tsconfigs by scope - #1854

Merged
Timeless0911 merged 4 commits into
mainfrom
elecmonkey/tsconfig-template
Aug 19, 2026
Merged

refactor(create-rslib): layer template tsconfigs by scope#1854
Timeless0911 merged 4 commits into
mainfrom
elecmonkey/tsconfig-template

Conversation

@elecmonkey

@elecmonkey elecmonkey commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

Unify the TS template tsconfigs on one shape, modeled on create-rstack.

  • Same option order and /* modules */ / /* type checking */ grouping in every
    root, filling in the missing target, moduleDetection,
    allowImportingTsExtensions, noUnusedLocals and noUnusedParameters.
  • Every root is include: ["src"]; template-svelte-ts no longer pulls in
    scripts and *.config.ts.
  • Every tests/ gets a tsconfig extending the root with rootDir: ".." and
    include: ["./"]template-node-ts and template-svelte-ts had none. Config
    and setup files are no longer covered by any tsconfig.
  • Emit options are aligned across the two roots that emit declarations:
    template-svelte-ts gains the outDir: "dist" it was missing, and the test
    configs of both override noEmit.
  • types: component roots stay browser-only (svelte's ["node"] becomes
    ["@rslib/core/types", "svelte"]), test configs add node. @types/node is
    added to the React, Solid and Vue templates, at the version the other templates
    already pin.
  • Rspress no longer overwrites the generated root config:
    template-rspress/react-ts/tsconfig.json is removed and its paths
    self-reference moves to docs/tsconfig.json, with src/index.ts and the
    placeholder test updated.

@elecmonkey
elecmonkey force-pushed the elecmonkey/tsconfig-template branch from 3376866 to e6bf33e Compare August 19, 2026 03:28
@elecmonkey
elecmonkey marked this pull request as ready for review August 19, 2026 03:38
Copilot AI lite review requested due to automatic review settings August 19, 2026 03:38

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread packages/create-rslib/template-react-ts/tsconfig.json
Comment thread packages/create-rslib/template-solid-ts/tsconfig.json
Comment thread packages/create-rslib/template-svelte-ts/tsconfig.json
@Timeless0911
Timeless0911 merged commit 2d4e922 into main Aug 19, 2026
11 checks passed
@Timeless0911
Timeless0911 deleted the elecmonkey/tsconfig-template branch August 19, 2026 06:24
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.

3 participants