Closed Zemnmez closed 4 months ago
You're trying to check the formatting of some build outputs, which is wrong. You should format-test the original srcs of the ts_project
:
diff --git a/ts/rules.bzl b/ts/rules.bzl
index 42538157f..fdf978f21 100644
--- a/ts/rules.bzl
+++ b/ts/rules.bzl
@@ -49,11 +49,6 @@ def ts_lint(name, srcs = None, **kwargs):
**kwargs
)
- format_test(
- name = name + "_formatting",
- srcs = srcs,
- )
-
def ts_project(name, visibility = None, lint = True, deps = [], data = [], resolve_json_module = True, srcs = None, tsconfig = "//:tsconfig", preserve_jsx = None, tags = [], **kwargs):
"""
Compile a set of typescript files, dependencies, runtime data and other source files into typescript types and source maps.
@@ -109,3 +104,7 @@ def ts_project(name, visibility = None, lint = True, deps = [], data = [], resol
if lint:
ts_lint(name = name + "_lint", srcs = [name + "_typings"], tags = tags)
+ format_test(
+ name = name + "_formatting",
+ srcs = srcs,
+ )
What happened?
When I try to follow the tutorial for formatting tests for typescript, I get issues because my
_typings
target doesn't seem to produce files with the Provider that rules_lint is using:Version
Development (host) and target OS/architectures:
Output of
bazel --version
:bazel 7.1.2
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved:
typescript
How to reproduce
Any other information?
No response