8000 IDE Persistent Parse does not handle tsconfigs with no "include" and no "files" with deeply nested folder structures · Issue #1110 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

IDE Persistent Parse does not handle tsconfigs with no "include" and no "files" with deeply nested folder structures #1110

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

Closed
bradzacher opened this issue Oct 20, 2019 · 3 comments · Fixed by #1205
Assignees
Labels
bug Something isn't working package: typescript-estree Issues related to @typescript-eslint/typescript-estree

Comments

@bradzacher
Copy link
Member

Spinning off of #1080 (comment)

if you provide a tsconfig without "includes" (or "files"), I.e. an empty tsconfig: {}, then typescript uses a different codepath to setup the folder watchers.
Triggering a directory change does not work the same was as when the tsconfig has "includes".

It won't block the release on Monday, as it's an edge case of sorts, but I'll need to look deeper into it to figure out how it all works!

@bradzacher bradzacher added bug Something isn't working package: typescript-estree Issues related to @typescript-eslint/typescript-estree labels Oct 20, 2019
@bradzacher bradzacher self-assigned this Oct 20, 2019
@bradzacher bradzacher changed the title [2.5.0] IDE Persistent Parse does not handle tsconfigs with no "include" and no "files" [2.5.0] IDE Persistent Parse does not handle tsconfigs with no "include" and no "files" with deeply nested folder structures Oct 20, 2019
@AviVahl
Copy link
AviVahl commented Oct 20, 2019

Should be noted that the default tsconfig.json generated by tsc --init doesn't have "includes".

I find myself having to change tsconfig.json files of more than 15 repositories to account for this issue.
My main fear is that will break one of the many other typescript integrations we have scattered around. And that's the "good" scenario. In the bad one, stuff silently breaks (IDEs, plugins etc).

@bradzacher
Copy link
Member Author
bradzacher commented Oct 20, 2019

There is another workaround which would be a little less cumbersome - do something similar to what we do in this repo: you can declare your tsconfigs directly via a project array glob:

project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],

(tsconfig.eslint.json just has references to the root level test/tooling files)

That way you wouldn't have to modify the tsconfig, potentially breaking a build.

@AviVahl
Copy link
AviVahl commented Oct 20, 2019

I really appreciate your suggestions, workarounds, and time. Seriously, thank you.

It's an annoying situation, where I either change all tsconfigs (and risk further breakage) or add new ones with maintainability burden. I'm not sure which is better. Some repos already have a separate tsconfig for the build (in each package!), and adding further ones feels wrong.

I'll try to assist and dive into the code a bit, hoping I won't drown... :)

@bradzacher bradzacher pinned this issue Oct 22, 2019
@bradzacher bradzacher changed the title [2.5.0] IDE Persistent Parse does not handle tsconfigs with no "include" and no "files" with deeply nested folder structures IDE Persistent Parse does not handle tsconfigs with no "include" and no "files" with deeply nested folder structures Nov 14, 2019
@bradzacher bradzacher unpinned this issue Nov 17, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: typescript-estree Issues related to @typescript-eslint/typescript-estree
Projects
None yet
2 participants
0