feat(config): add shared TypeScript config package - #7
Merged
Merged
Conversation
Introduce @batik/config with base/browser/node/react/library tsconfig presets, and wire the workspace root tsconfig to extend it.
🦋 Changeset detectedLatest commit: a97118e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The root tsconfig extends `@batik/config/typescript/tsconfig.node.json`, a bare specifier resolved through node_modules. pnpm only symlinks a workspace package that is declared as a dependency, so the extends target did not exist and `vp check` failed with "Invalid tsconfig". That config also sets `types: ["node"]`, which needs `@types/node` present at the root. Add it to the catalog pinned to 24.x, matching the Node version pinned in devEngines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
@batik/config, the workspace's shared tooling configuration package, starting with TypeScript configs.What's in it
Five TypeScript configs, exported via subpath exports so consumers extend
@batik/config/typescript/tsconfig.<name>.json:tsconfig.base.json— strict settings shared by everythingtsconfig.browser.json/tsconfig.node.json— environment layerstsconfig.library.json/tsconfig.react.json— target layersThe package ships
srcdirectly (no build step) and declarestypescript >=5.8as a peer dependency.Workspace root tsconfig
The root
tsconfig.jsonis a real project rather than afiles: []solution stub: it owns the Node-side files that live outside any package's shipped source — the rootvite.config.tsand each package's build config.Those build configs stay here on purpose. A package's tsconfig is a browser program with
types: [], so pullingvite.config.tsinto it would drag Node type references into the same program and letprocess,Bufferand__dirnameresolve insidesrc/, silently defeating the isolation.No project references — tsdown builds the packages and tsgolint checks them.
Notes
Changeset included (
minorfor@batik/config).