diff --git a/package.json b/package.json index 8a91e082..ab6f471d 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "scripts": { "build": "rollup -c build-settings/rollup.config.js", "build:prodsizecheck": "rollup -c build-settings/rollup.config.js --configPlatforms='browser' --configFormats='esm' --configEnvironment='production'", - "build:types": "yarn tsc -b -v tsconfig.json", + "build:types": "yarn tsc --build --verbose tsconfig-build.json", "watch": "rollup -c build-settings/rollup.config.js --watch", "clean": "rm -rf packages/wonder-stuff-*/dist && rm -rf packages/wonder-stuff-*/node_modules && rm -f packages/*/tsconfig.tsbuildinfo", "coverage": "yarn run jest --coverage", @@ -85,4 +85,4 @@ "typecheck": "tsc --noEmit", "nochangeset": "yarn changeset add --empty" } -} +} \ No newline at end of file diff --git a/packages/tsconfig-shared.json b/packages/tsconfig-shared.json index 724ed57f..03c8f7e2 100644 --- a/packages/tsconfig-shared.json +++ b/packages/tsconfig-shared.json @@ -1,5 +1,6 @@ /* Visit https://aka.ms/tsconfig to read more about this file */ { + "exclude": ["dist"], "compilerOptions": { "composite": true, "incremental": true, // Required for composite projects diff --git a/packages/wonder-stuff-core/tsconfig.json b/packages/wonder-stuff-core/tsconfig.json index 8bebeb02..35cad7f7 100644 --- a/packages/wonder-stuff-core/tsconfig.json +++ b/packages/wonder-stuff-core/tsconfig.json @@ -1,5 +1,5 @@ { - "exclude": ["dist", "**/*.flowtest.ts"], + "exclude": ["dist"], "extends": "../tsconfig-shared.json", "compilerOptions": { "outDir": "dist", diff --git a/packages/wonder-stuff-i18n/tsconfig.json b/packages/wonder-stuff-i18n/tsconfig.json index 8bebeb02..35cad7f7 100644 --- a/packages/wonder-stuff-i18n/tsconfig.json +++ b/packages/wonder-stuff-i18n/tsconfig.json @@ -1,5 +1,5 @@ { - "exclude": ["dist", "**/*.flowtest.ts"], + "exclude": ["dist"], "extends": "../tsconfig-shared.json", "compilerOptions": { "outDir": "dist", diff --git a/packages/wonder-stuff-sentry/tsconfig.json b/packages/wonder-stuff-sentry/tsconfig.json index d74ddfac..d822c9f3 100644 --- a/packages/wonder-stuff-sentry/tsconfig.json +++ b/packages/wonder-stuff-sentry/tsconfig.json @@ -1,5 +1,5 @@ { - "exclude": ["dist", "**/*.flowtest.ts"], + "exclude": ["dist"], "extends": "../tsconfig-shared.json", "compilerOptions": { "outDir": "dist", diff --git a/packages/wonder-stuff-server-google/tsconfig.json b/packages/wonder-stuff-server-google/tsconfig.json index 48645b9f..84e892ec 100644 --- a/packages/wonder-stuff-server-google/tsconfig.json +++ b/packages/wonder-stuff-server-google/tsconfig.json @@ -1,5 +1,5 @@ { - "exclude": ["dist", "**/*.flowtest.ts"], + "exclude": ["dist"], "extends": "../tsconfig-shared.json", "compilerOptions": { "outDir": "dist", diff --git a/packages/wonder-stuff-server/tsconfig.json b/packages/wonder-stuff-server/tsconfig.json index cf71e9b2..aec43e53 100644 --- a/packages/wonder-stuff-server/tsconfig.json +++ b/packages/wonder-stuff-server/tsconfig.json @@ -1,5 +1,5 @@ { - "exclude": ["dist", "**/*.flowtest.ts"], + "exclude": ["dist"], "extends": "../tsconfig-shared.json", "compilerOptions": { "outDir": "./dist", diff --git a/packages/wonder-stuff-testing/tsconfig.json b/packages/wonder-stuff-testing/tsconfig.json index 199bbc4e..2bd14567 100644 --- a/packages/wonder-stuff-testing/tsconfig.json +++ b/packages/wonder-stuff-testing/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig-shared.json", + "exclude": ["dist"], "compilerOptions": { "outDir": "dist", "rootDir": "src", diff --git a/tsconfig-build.json b/tsconfig-build.json new file mode 100644 index 00000000..d567e5ee --- /dev/null +++ b/tsconfig-build.json @@ -0,0 +1,14 @@ +/* Visit https://aka.ms/tsconfig to read more about this file */ +{ + // Intentionally empty, all files are covered by tsconfig.json files + // in each package directory. + "files": [], + "references": [ + {"path": "./packages/wonder-stuff-core"}, + {"path": "./packages/wonder-stuff-i18n"}, + {"path": "./packages/wonder-stuff-sentry"}, + {"path": "./packages/wonder-stuff-server"}, + {"path": "./packages/wonder-stuff-server-google"}, + {"path": "./packages/wonder-stuff-testing"}, + ] +} diff --git a/tsconfig.json b/tsconfig.json index d567e5ee..654699e2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,33 @@ -/* Visit https://aka.ms/tsconfig to read more about this file */ { - // Intentionally empty, all files are covered by tsconfig.json files - // in each package directory. - "files": [], - "references": [ - {"path": "./packages/wonder-stuff-core"}, - {"path": "./packages/wonder-stuff-i18n"}, - {"path": "./packages/wonder-stuff-sentry"}, - {"path": "./packages/wonder-stuff-server"}, - {"path": "./packages/wonder-stuff-server-google"}, - {"path": "./packages/wonder-stuff-testing"}, - ] + "exclude": ["**/dist", "**/*.flowtest.ts"], + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Language and Environment */ + "target": "ES2016", + + /* Modules */ + "module": "ESNext", + "moduleResolution": "node", + "paths": { + "@khanacademy/*": ["./packages/*/src/index.ts"], + }, + + /* Emit */ + "noEmit": true, + + /* Interop Constraints */ + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + + /* Type Checking */ + "strict": true, + "noImplicitAny": true, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + + /* Completeness */ + "skipDefaultLibCheck": true, + "skipLibCheck": false + } }