aspect-build / aspect-build/rules_lint

[Bug]: Not clear what target to lint when ts_project#transpiler produces several targets

Open
#369 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
Starlark
Stars
154
Forks
125
Avg merge
3d 21h
Merged PRs (30d)
20

Description

### What happened?

`ts_project(name = "foo", transpiler=swc)` will produce several targets, as documented: https://github.com/aspect-build/rules_ts/blob/main/docs/transpiler.md#macro-expansion

The `:foo` target is a `js_library(srcs=[])` so there's no point linting it. The target with `srcs=["my.ts"]` is the `:foo_typings` target that doesn't appear in the BUILD file.

So an end-user will have a hard time linting a single ts_project in this case.

### Version

All versions

### How to reproduce

_No response_

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the ts_project macro expansion described in docs/transpiler.md, then inspect how linting resolves the :foo target versus the generated :foo_typings target. Reproduce the swc case if possible and verify that linting a single ts_project selects the target containing my.ts rather than the empty js_library target.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.