Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR]: Have gazelle js language pick up tsconfig targets from parent directories #633

Closed
ewhauser opened this issue Feb 21, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request untriaged Requires traige

Comments

@ewhauser
Copy link

What is the current behavior?

Currently, the js gazelle language does not automatically discover tsconfig files and those generates targets like:

ts_project(
  name = "xyz"
)

If you do not have a ts_config target in that package, then the rule fails.

Describe the feature

Our standard repository layout is all React apps where we use a single tsconfig.json file at the root of the repository for the project and tests:

typescript/react_app1
  tsconfig.json
  src/
    pages/
   components/
typescript/react_app1
  tsconfig.json
  src/
    ...
typescript/react_app1
  tsconfig.json
  src/
   ...

For all of the ts_project targets generated under src/ (or any subdirectory of react_appX), it would be helpful if the generated ts_project would point to the tsconfig in the root of the application directory. It would be fine if this was discovered via a setting that set a convention or if you had to specify the tsconfig.json to use via directive at the root of each application.

At currrent, the workaround is to use map_kind to map ts_project to a macro where we manually override the value.

@ewhauser ewhauser added the enhancement New feature or request label Feb 21, 2024
@jbedard jbedard self-assigned this Feb 21, 2024
@github-actions github-actions bot added the untriaged Requires traige label Feb 21, 2024
@jbedard
Copy link
Member

jbedard commented Feb 27, 2024

An initial version has been added, see 4374292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request untriaged Requires traige
Projects
Status: Done
Development

No branches or pull requests

2 participants