Skip to content

Commit 99969ac

Browse files
authored
1 parent e1f1b27 commit 99969ac

File tree

17 files changed

+18
-56
lines changed

17 files changed

+18
-56
lines changed

packages/cheatsheet-local/tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
4-
"rootDir": "src",
5-
"outDir": "out",
64
"jsx": "react-jsx",
75
"lib": ["es5", "es6", "dom"],
86
"allowSyntheticDefaultImports": true,

packages/cheatsheet/tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
4-
"rootDir": "src",
5-
"outDir": "out",
64
"jsx": "react-jsx",
75
"esModuleInterop": true,
86
"skipLibCheck": true,

packages/common/tsconfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"outDir": "out",
5-
"rootDir": "src"
6-
},
73
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"],
84
"references": []
95
}

packages/cursorless-cheatsheet/tsconfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"outDir": "out",
5-
"rootDir": "src"
6-
},
73
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"],
84
"references": [
95
{

packages/cursorless-engine/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
4-
"target": "es2020",
5-
"outDir": "out",
6-
"rootDir": "src"
4+
"target": "es2020"
75
},
86
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"],
97
"references": [

packages/cursorless-org-docs/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
22
"extends": ["@tsconfig/docusaurus/tsconfig.json", "../../tsconfig.base.json"],
33
"compilerOptions": {
4-
"rootDir": "src",
54
"esModuleInterop": true,
6-
"emitDeclarationOnly": false,
7-
"outDir": "out"
5+
"emitDeclarationOnly": false
86
},
97
"references": [],
108
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"]

packages/cursorless-org/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
"resolveJsonModule": true,
1212
"isolatedModules": true,
1313
"jsx": "preserve",
14-
"incremental": true,
15-
"rootDir": "src",
16-
"outDir": "out"
14+
"incremental": true
1715
},
1816
"include": [
1917
"src/**/*.ts",

packages/cursorless-vscode-e2e/tsconfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"outDir": "out",
5-
"rootDir": "src"
6-
},
73
"references": [
84
{
95
"path": "../common"

packages/cursorless-vscode/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
4-
"target": "es2020",
5-
"outDir": "out",
6-
"rootDir": "src"
4+
"target": "es2020"
75
},
86
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"],
97
"references": [

packages/meta-updater/src/updateTSConfig.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { pathExists } from "path-exists";
55
import { PackageJson, TsConfigJson } from "type-fest";
66
import { toPosixPath } from "./toPosixPath";
77
import { Context } from "./Context";
8-
import { uniq } from "lodash-es";
8+
import { cloneDeep, isEqual, uniq } from "lodash-es";
99
import { readFile } from "fs/promises";
1010

1111
/**
@@ -89,14 +89,18 @@ export async function updateTSConfig(
8989
references.push({ path: relativePath });
9090
}
9191

92+
const compilerOptions = {
93+
...(cloneDeep(input.compilerOptions) ?? {}),
94+
};
95+
delete compilerOptions.outDir;
96+
delete compilerOptions.rootDir;
97+
9298
return {
9399
...input,
94100
extends: getExtends(pathFromPackageToRoot, input.extends),
95-
compilerOptions: {
96-
...(input.compilerOptions ?? {}),
97-
rootDir: "src",
98-
outDir: "out",
99-
},
101+
102+
...(isEqual(compilerOptions, {}) ? {} : { compilerOptions }),
103+
100104
references: references.sort((r1, r2) => r1.path.localeCompare(r2.path)),
101105
include: [
102106
"src/**/*.ts",

packages/meta-updater/tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
4-
"outDir": "out",
5-
"rootDir": "src",
64
"target": "es2020",
75
"module": "ES2020",
86
"moduleResolution": "node",

packages/node-common/tsconfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"rootDir": "src",
5-
"outDir": "out"
6-
},
73
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"],
84
"references": [
95
{
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"rootDir": "src",
5-
"outDir": "out"
6-
},
73
"references": [],
84
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"]
95
}

packages/test-case-recorder/tsconfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"rootDir": "src",
5-
"outDir": "out"
6-
},
73
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"],
84
"references": [
95
{

packages/test-harness/tsconfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"outDir": "out",
5-
"rootDir": "src"
6-
},
73
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"],
84
"references": [
95
{

packages/vscode-common/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
4-
"target": "es2020",
5-
"outDir": "out",
6-
"rootDir": "src"
4+
"target": "es2020"
75
},
86
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"],
97
"references": [

tsconfig.base.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"composite": true,
1212
"forceConsistentCasingInFileNames": true,
1313
"isolatedModules": true,
14-
"strict": true
14+
"strict": true,
15+
"rootDir": "${configDir}/src",
16+
"outDir": "${configDir}/out"
1517
}
1618
}

0 commit comments

Comments
 (0)