From 376b6cacd685873d039a1f168ae574a61d12ea5f Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Wed, 6 Feb 2019 16:03:13 -0600 Subject: [PATCH] fix: supply missing tsconfig.json in packages/* Relative `"include"` path/s in a `tsconfig.json` are relative to the directory in which the config is located, so each monorepo package that uses typescript needs its own `tsconfig.json` that `"extends"` the root config. For now, disable the `"typecheck"` script in embark-graph and embark-vyper, but leave the relevant pieces in place (devDeps, configs) so that when they're converted to TypeScript the scripts can simply be re-enabled. The problem is that if no `.ts` files are present in the path/s specified in `"include"` of `tsconfig.json`, tsc will exit with error. --- packages/embark-compiler/tsconfig.json | 4 ++++ packages/embark-graph/package.json | 8 ++++---- packages/embark-graph/tsconfig.json | 4 ++++ packages/embark-vyper/package.json | 8 ++++---- packages/embark-vyper/tsconfig.json | 4 ++++ packages/embark/tsconfig.json | 3 --- tsconfig.json | 1 + 7 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 packages/embark-compiler/tsconfig.json create mode 100644 packages/embark-graph/tsconfig.json create mode 100644 packages/embark-vyper/tsconfig.json diff --git a/packages/embark-compiler/tsconfig.json b/packages/embark-compiler/tsconfig.json new file mode 100644 index 000000000..52d43eaaa --- /dev/null +++ b/packages/embark-compiler/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/embark-graph/package.json b/packages/embark-graph/package.json index f992b9990..2a390f28d 100644 --- a/packages/embark-graph/package.json +++ b/packages/embark-graph/package.json @@ -28,13 +28,14 @@ "lint:js": "eslint src/", "lint:ts": "tslint -c tslint.json \"src/**/*.ts\"", "package": "npm pack", - "qa": "npm-run-all lint typecheck build package", + "// qa": "npm-run-all lint typecheck build package", + "qa": "npm-run-all lint build package", "reset": "npm run clean && npx rimraf node_modules", "start": "npm run watch", - "typecheck": "tsc", + "// typecheck": "tsc", "watch": "run-p watch:*", "watch:build": "npm run build -- --verbose --watch", - "watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch" + "// watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch" }, "eslintConfig": { "extends": "../../.eslintrc.json" @@ -60,4 +61,3 @@ "yarn": ">=1.12.3" } } - diff --git a/packages/embark-graph/tsconfig.json b/packages/embark-graph/tsconfig.json new file mode 100644 index 000000000..52d43eaaa --- /dev/null +++ b/packages/embark-graph/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/embark-vyper/package.json b/packages/embark-vyper/package.json index 15809ffa3..a4b8a4dab 100644 --- a/packages/embark-vyper/package.json +++ b/packages/embark-vyper/package.json @@ -25,13 +25,14 @@ "lint:js": "eslint src/", "lint:ts": "tslint -c tslint.json \"src/**/*.ts\"", "package": "npm pack", - "qa": "npm-run-all lint typecheck build package", + "// qa": "npm-run-all lint typecheck build package", + "qa": "npm-run-all lint build package", "reset": "npm run clean && npx rimraf node_modules", "start": "npm run watch", - "typecheck": "tsc", + "// typecheck": "tsc", "watch": "run-p watch:*", "watch:build": "npm run build -- --verbose --watch", - "watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch" + "// watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch" }, "eslintConfig": { "extends": "../../.eslintrc.json" @@ -57,4 +58,3 @@ "yarn": ">=1.12.3" } } - diff --git a/packages/embark-vyper/tsconfig.json b/packages/embark-vyper/tsconfig.json new file mode 100644 index 000000000..52d43eaaa --- /dev/null +++ b/packages/embark-vyper/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/embark/tsconfig.json b/packages/embark/tsconfig.json index 644e31072..52d43eaaa 100644 --- a/packages/embark/tsconfig.json +++ b/packages/embark/tsconfig.json @@ -1,7 +1,4 @@ { "extends": "../../tsconfig.json", - "compilerOptions": { - "noImplicitThis": false - }, "include": ["src/**/*"] } diff --git a/tsconfig.json b/tsconfig.json index 8e080965c..cabf85f35 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "lib": ["ES2017"], "module": "CommonJS", "noEmit": true, + "noImplicitThis": false, "strict": true, "target": "ES2017" }