Bug: Project service doesn't infer compilerOptions for files not included in a tsconfig.json #8206
Closed
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: typescript-estree
Issues related to @typescript-eslint/typescript-estree
Milestone
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
Moving #8030 (reply in thread) into a standalone issue: users are going to want to be able to lint
.eslintrc.cjs
files without including them in thetsconfig.json
compilerOptions.allow
andinclude
. But the project service as-is provides a "blank slate" set of default compiler options when a file isn't included in a loadedtsconfig.json
.Proposal: if a file is included in
allowDefaultProjectForFiles
(added in #7752) and isn't given compiler options from a loaded TSConfig, instead give it the compiler options for the nearesttsconfig.json
?Reproduction Repository Link
https://github.com/JoshuaKGoldberg/repros/tree/ts-eslint-project-service-not-included
Repro Steps
npm install
npm lint
Versions
@typescript-eslint/parser
6.18.0
@typescript-eslint/typescript-estree
6.18.0
TypeScript
5.3.3
The text was updated successfully, but these errors were encountered: