How the Language Service selects projects
masterThe TypeScript Language Service follows specific rules to find configuration files:
- Priority: It checks for
tsconfig.jsonbeforejsconfig.jsonwhile walking upward from the file location. - Search Boundaries:
- A defined project root limits the upward walk.
- If a search starts inside a
node_modulesdirectory, the search stops after checking thenode_modulesdirectory itself.
- Applicability: The service uses a 'root-list-first' approach. A source file must be present in the parsed root list to be accepted. Direct
filesandinclude/excludematching is only used as a fallback for file kinds that are otherwise unsupported.