Skip to content

Commit

Permalink
fix(typescript): remove override of @bazel/tsetse
Browse files Browse the repository at this point in the history
...in generated ts_library tsconfig. This fixes an issue where the @bazel/tsetse plugin values in a user's config would always be overridden by ts_library and not honoured. Also remove disable_tsetse_for_external test as we no longer doing this.
  • Loading branch information
gregmagolan authored and alexeagle committed Jun 19, 2019
1 parent 3d55b41 commit 2e128ce
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 80 deletions.
6 changes: 0 additions & 6 deletions e2e/ts_library/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,3 @@ install_bazel_dependencies()
load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")

ts_setup_workspace()

# Tell Bazel where the nested local repositories are that are used for tests
local_repository(
name = "disable_tsetse_for_external_test",
path = "disable_tsetse_for_external",
)
23 changes: 0 additions & 23 deletions e2e/ts_library/disable_tsetse_for_external/BUILD.bazel

This file was deleted.

15 changes: 0 additions & 15 deletions e2e/ts_library/disable_tsetse_for_external/WORKSPACE

This file was deleted.

19 changes: 0 additions & 19 deletions e2e/ts_library/disable_tsetse_for_external/main.ts

This file was deleted.

Empty file.
2 changes: 1 addition & 1 deletion e2e/ts_library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"scripts": {
"pretest": "bazel run @nodejs//:yarn",
"test": "bazel build ... && bazel test ... && bazel build @disable_tsetse_for_external_test//..."
"test": "bazel test ..."
}
}
16 changes: 0 additions & 16 deletions packages/typescript/internal/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -246,22 +246,6 @@ def tsc_wrapped_tsconfig(
if jsx_factory:
config["compilerOptions"]["jsxFactory"] = jsx_factory

tsetse_disabled_rules = []

# Matches section in javascript/typescript/tsconfig.bzl
# TODO(alexeagle): make them share code
if ctx.label.workspace_root.startswith("external/"):
# Violated by rxjs
tsetse_disabled_rules += ["ban-promise-as-condition"]

# For local testing
tsetse_disabled_rules += ["check-return-value"]

config["compilerOptions"]["plugins"] = [{
"name": "@bazel/tsetse",
"disabledRules": tsetse_disabled_rules,
}]

return config

# ************ #
Expand Down

0 comments on commit 2e128ce

Please sign in to comment.