Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
VS Code's Typescript IntelliSense breaks every time I `git commit`

I have a project with several tsconfig.json files in different directories. Usually, VS Code uses each tsconfig.json only for the directory it's in.

When I git commit, I use Husky to run Eslint on the changed files. Eslint uses @typescript-eslint/parser. After the code commits, I get a ton of Typescript errors in VS Code. Restarting the TS server fixes it, but it's slow for a few minutes (I think it's rebuilding the TS cache?).

I think what's happening is when Eslint runs, it uses one (or more) of the tsconfig.json files, depending on the changed files' location. Then, VS Code somehow detects that a specific tsconfig.json was used, then it uses it for my whole project. I want VS Code to continue using the tsconfig.json files it detected, rather than picking up the tsconfig.json used by Eslint.

What are some things I can try to prevent this? Is there a way to temporarily disable VS Code's TS server while I'm committing code? Or is there a proper way to prevent VS Code from using a tsconfig.json file incorrectly?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found the issue:

There are .d.ts files that are included in multiple tsconfig.jsons. There are some type definitions in different .d.ts files that override each other, so import order matters. For unknown reasons, after I git commit, VS Code imports them in a different order.

I fixed it by no longer overriding definitions.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!