Skip to content

Feat/ts config#86

Merged
YvetteNikolov merged 3 commits intomainfrom
feat/ts-config
Feb 26, 2026
Merged

Feat/ts config#86
YvetteNikolov merged 3 commits intomainfrom
feat/ts-config

Conversation

@YvetteNikolov
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new @yardinternet/ts-config workspace package to centralize shared TypeScript tsconfig presets for Yard projects (e.g., Brave sites and publishable libraries).

Changes:

  • Introduces base, Brave, and library TypeScript config JSON files under packages/ts-config/.
  • Adds package metadata + usage docs for the new @yardinternet/ts-config package.
  • Registers the new workspace in the monorepo and updates the root lockfile accordingly.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/ts-config/tsconfig.library.json New tsconfig preset intended for library/npm package builds.
packages/ts-config/tsconfig.brave.json New tsconfig preset intended for Brave TypeScript projects.
packages/ts-config/tsconfig.base.json New shared base tsconfig with strictness/module settings and default excludes.
packages/ts-config/package.json Adds a publishable workspace package definition for @yardinternet/ts-config.
packages/ts-config/README.md Documents how consumers should extend the provided tsconfigs.
package.json Adds packages/ts-config to workspaces.
package-lock.json Updates lockfile to include the new workspace and its dependency tree.

Comment on lines +14 to +18
"repository": {
"type": "git",
"url": "git+https://github.com/yardinternet/toolkit.git",
"directory": "packages/vite-config"
},
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The repository.directory field is set to packages/vite-config, which is incorrect for this package and will mislead links shown on npm/GitHub Packages. Update it to packages/ts-config.

Copilot uses AI. Check for mistakes.
"extends": "./tsconfig.base.json",
"compilerOptions": {
},
"exclude": ["node_modules", "vendor", "public", "plugins"]
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

This exclude array replaces (does not merge with) the base config’s exclude because of extends, which means dist/build etc from tsconfig.base.json will no longer be excluded for Brave projects. Consider removing exclude here to inherit the base list, or include the base exclusions plus any Brave-specific ones.

Copilot uses AI. Check for mistakes.
"compilerOptions": {
// Base
"esModuleInterop": true, // Allow default imports from CommonJS
"jsx": "react", // Classic in stead of react-jsx, allows JSX without react installed as dependency.
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Typo in comment: “in stead” should be “instead”.

Copilot uses AI. Check for mistakes.
"compilerOptions": {
// Base
"esModuleInterop": true, // Allow default imports from CommonJS
"jsx": "react", // Classic in stead of react-jsx, allows JSX without react installed as dependency.
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The comment on the jsx setting appears inaccurate: "jsx": "react" uses the classic React transform and typically requires a React runtime (and often an import in scope). If the goal is JSX without requiring React at runtime, this should use the automatic runtime (react-jsx) or a non-React JSX emit with the appropriate jsxImportSource/factory settings.

Copilot uses AI. Check for mistakes.
{
"name": "@yardinternet/ts-config",
"version": "1.0.0",
"main": "index.js",
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

main points to index.js, but this package currently doesn't include an index.js file. Either add the referenced entrypoint or remove/adjust main so consumers don't get a broken import/require resolution.

Copilot uses AI. Check for mistakes.
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.

2 participants