Skip to content

Commit afef302

Browse files
authored
chore: enable lib checks (#527)
The 'skipLibCheck=always' was added in #371 without any explanation of why we'd want that setting for rules_ts itself. This is a prefactor for the regression test of #516 - and in general we should be testing with the 'stricter' setting to make more assurance that the rules behave correctly.
1 parent 351d6e7 commit afef302

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

.bazelrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# import common bazelrc settings used in this repository and in nested workspaces
22
import %workspace%/.bazelrc.common
33

4-
# passes an argument `--skipLibCheck` to *every* spawn of tsc
5-
build --@aspect_rules_ts//ts:skipLibCheck=always
6-
74
# Disable lockfile for now. It is unstable.
85
# https://github.com/bazelbuild/bazel/issues/19026
96
# https://github.com/bazelbuild/bazel/issues/19621

.bazelrc.common

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,9 @@ build:macos --nolegacy_external_runfiles
7070
build:freebsd --nolegacy_external_runfiles
7171
build:openbsd --nolegacy_external_runfiles
7272

73-
# TODO: switch to 'common' once https://github.com/bazelbuild/bazel/pull/19363 is landed and available in Bazel
74-
build --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
75-
fetch --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
76-
query --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
77-
build --@aspect_rules_ts//ts:default_to_tsc_transpiler
78-
fetch --@aspect_rules_ts//ts:default_to_tsc_transpiler
79-
query --@aspect_rules_ts//ts:default_to_tsc_transpiler
73+
# Note: 'common' for custom flags requires Bazel 6.4.0 or greater
74+
common --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
75+
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
8076

8177
# Turn on --incompatible_strict_action_env which was on by default
8278
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow

examples/connect_node/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"compilerOptions": {
33
"lib": ["ES2015"],
44
"moduleResolution": "node",
5-
"module": "ES2020"
5+
"module": "ES2020",
6+
// TODO: enable lib check here: repair broken type-check
7+
"skipLibCheck": true
68
}
79
}

0 commit comments

Comments
 (0)