Skip to content

Commit

Permalink
vscode-go: create separate tsconfig for builds
Browse files Browse the repository at this point in the history
Adding a separate tsconfig for builds will allow us to have strict
type checking rules enabled for editor environments before enforcing
them for builds and tests.

For golang#57.

Change-Id: I5059e9bbcc87258ad8accd4c476dd9d9d71f0406
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/401615
TryBot-Result: kokoro <[email protected]>
Run-TryBot: Jamal Carvalho <[email protected]>
Reviewed-by: Benny Siegert <[email protected]>
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
  • Loading branch information
jamalc committed May 3, 2022
1 parent 5d06597 commit f08030f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"tsconfig": "./tsconfig.build.json",
"problemMatcher": [
"$tsc"
]
Expand All @@ -49,7 +49,7 @@
"group": {
"kind": "build",
"isDefault": true
}
},
},
{
"type": "npm",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
"bundle": "esbuild src/goMain.ts debugAdapter=src/debugAdapter/goDebug.ts --bundle --outdir=dist --external:vscode --format=cjs --platform=node",
"bundle-dev": "npm run bundle -- --sourcemap",
"bundle-watch": "npm run bundle -- --sourcemap --watch",
"test-compile": "tsc -p ./",
"test-compile": "tsc -p ./tsconfig.build.json",
"compile": "npm run bundle",
"watch": "tsc -watch -p ./",
"watch": "tsc -watch -p ./tsconfig.build.json",
"test": "npm run test-compile && node ./out/test/runTest.js",
"lint": "gts lint src test",
"fix-lint": "gts fix src test",
Expand Down
11 changes: 11 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"strict": false,
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
}
}
9 changes: 1 addition & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@
"lib": [
"es2017"
],
//"strict": true,
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strict": true,
"esModuleInterop": true,
//"strictNullChecks": true,
//"strictPropertyInitialization": true,
},
"exclude": [
"node_modules",
Expand Down

0 comments on commit f08030f

Please sign in to comment.