-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
refactor(tsconfig): standardize TypeScript configuration across monorepo #5601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,3 @@ | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json", | ||||||||||||||||||||||||||||
| "compilerOptions": { | ||||||||||||||||||||||||||||
| "baseUrl": "./" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-add mandated Our TypeScript config guidelines require each package tsconfig to set {
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}[Based on learnings] 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,8 +5,8 @@ import { mm } from 'mm'; | |||||
| import { request } from '@eggjs/supertest'; | ||||||
| import coffee from 'coffee'; | ||||||
|
|
||||||
| import { utils } from '../src/index.js'; | ||||||
| import { createApp, getFilepath, type Application } from './helper.js'; | ||||||
| import { utils } from '../src/index.ts'; | ||||||
| import { createApp, getFilepath, type Application } from './helper.ts'; | ||||||
|
||||||
| import { createApp, getFilepath, type Application } from './helper.ts'; | |
| import { createApp, getFilepath, type Application } from './helper'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts", "example"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,4 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| }, | ||
| "exclude": ["test/fixtures/**/*.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,4 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| }, | ||
| "exclude": ["test/fixtures/**/*.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,3 @@ | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json", | ||||||||||||||||||||||||||||
| "compilerOptions": { | ||||||||||||||||||||||||||||
| "baseUrl": "./" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reinstate Our config standard requires each package tsconfig to declare {
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } | ||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restore package-level Per the workspace guidelines, each sub-project tsconfig must still declare 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts", "example"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
fengmk2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,3 @@ | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json", | ||||||||||||||||||||||||||||
| "compilerOptions": { | ||||||||||||||||||||||||||||
| "baseUrl": "./" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reinstate required Per the monorepo instructions, each package tsconfig.json must both extend the root config and specify As per coding guidelines {
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } | ||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restore per-package Guidelines for 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } | ||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restore Per our tsconfig standards every package-level As per coding guidelines 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } | ||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add back package-level Each plugin As per coding guidelines 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,3 @@ | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json", | ||||||||||||||||||||||||||||
| "compilerOptions": { | ||||||||||||||||||||||||||||
| "baseUrl": "./" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bring back the per-plugin The shared guidance for {
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}[Based on learnings] 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } | ||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reintroduce package-level Guidelines require every {
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,3 @@ | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json", | ||||||||||||||||||||||||||||
| "compilerOptions": { | ||||||||||||||||||||||||||||
| "baseUrl": "./" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| "extends": "../../tsconfig.json" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
1
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required This plugin tsconfig.json must define As per coding guidelines {
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,3 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "rootDir": "./src", | ||
| "outDir": "./dist" | ||
| }, | ||
| "exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"] | ||
| "extends": "../../tsconfig.build.json" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,4 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| }, | ||
| "exclude": ["test/fixtures/**/*.ts"] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include tools tsconfig.build.json in the minimal pattern.
The snippet calls out packages and plugins, but this PR also standardizes
tools/*/tsconfig.build.jsonto extend the root build config. Please add tools here so new tool packages follow the same rule.🤖 Prompt for AI Agents