Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bug: Project service doesn't infer compilerOptions for files not included in a tsconfig.json #8206

Copy link
Copy link
Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg
Issue body actions

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

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 the tsconfig.json compilerOptions.allow and include. But the project service as-is provides a "blank slate" set of default compiler options when a file isn't included in a loaded tsconfig.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 nearest tsconfig.json?

Reproduction Repository Link

https://github.com/JoshuaKGoldberg/repros/tree/ts-eslint-project-service-not-included

Repro Steps

  1. clone the repo
  2. npm install
  3. npm lint

Versions

package version
@typescript-eslint/parser 6.18.0
@typescript-eslint/typescript-estree 6.18.0
TypeScript 5.3.3

Metadata

Metadata

Labels

accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: typescript-estreeIssues related to @typescript-eslint/typescript-estreeIssues related to @typescript-eslint/typescript-estree

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.