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

[turborepo] examples/with-tailwind, and others, potential misleading TSConfigs #4146

Open
kriswuollett opened this issue Mar 9, 2023 · 2 comments
Assignees
Labels
area: examples Improvements or additions to examples owned-by: turborepo

Comments

@kriswuollett
Copy link

kriswuollett commented Mar 9, 2023

What version of Turborepo are you using?

N/A

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux

Describe the Bug

Examples may be showing TSConfig include and exclude settings that are misleading because they technically have no effect given that the Typescript spec says that they are resolved relative to the location of the tsconfig.json file. For example, these have no effect:

https://github.com/vercel/turbo/blob/baf6504e4ef80e1bc0eb4038481663df820d1283/examples/with-tailwind/packages/tsconfig/nextjs.json#L20-L21

Because the source to include and node_modules to exclude are relative to the NextJS app's TSConfig:

https://github.com/vercel/turbo/blob/baf6504e4ef80e1bc0eb4038481663df820d1283/examples/with-tailwind/apps/web/tsconfig.json#L1-L5

I believe this is an issue that should be resolved, but I'm new to JS/TS so not absolutely sure. I came across build errors related to this when I tried compiling the Turborepo's example with a different build system. Perhaps there could be a separate issue raised that a Turbo linter could pick up on this?

Expected Behavior

The examples in the repo shouldn't have these options set in the shared TSConfig libraries.

To Reproduce

N/A

Reproduction Repo

No response

@kriswuollett kriswuollett added area: turborepo kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Mar 9, 2023
@domdomegg
Copy link

Related TypeScript feature request: microsoft/TypeScript#51213

@mehulkar mehulkar added the area: examples Improvements or additions to examples label Dec 9, 2023
@anthonyshew
Copy link
Contributor

Two separate thoughts here:

  1. We updated all of our examples recently hoping to get closer to best practices. Hopefully they're satisfactory now.
  2. I'm pretty sure the quoted lines of code are correct according to whats in the documentation here. If not, I might be missing the point you're making. Do you think you could open a pull request with the changes you're proposing?

@anthonyshew anthonyshew removed kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Improvements or additions to examples owned-by: turborepo
Projects
None yet
Development

No branches or pull requests

5 participants