Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Docs: Add post on parserOptions.project = true #6520

Closed
Assignees
JoshuaKGoldberg
Labels
accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updating
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

As part of writing#6515, I wrote up some docs on usingparserOptions.project = true (#6084). That feature isn't actually part of v6 - it's just something I'd wanted to get in before or in v6.

Since it's already landed in v5, let's add a blog post explaining it! It'll be good visibility for the enhancement.

Here's what I originally drafted...

Feature: Relativetsconfig.json Projects

In typescript-eslint v5, in order to enabletyped linting, your ESLint configuration must include aparserOptions.project property indicating which TSConfig(s) to use:

module.exports={// ...parserOptions:{project:['./tsconfig.json'],},// ...};

This works well for repositories that have a single TSConfig for all files, such as small repositories using a singletsconfig.json or larger monorepos that have atsconfig.eslint.json specifically used for linting.
But what if your project uses different TSConfig options for different TypeScript files in nested subdirectories?
Specifying the right array of relative TSConfig paths to try for each file in order can be cumbersome or downright impossible.

We recently added the option to specifyparserOptions.project as justtrue in ESLint configurations.
This indicates to typescript-eslint that each file should be linted with the closesttsconfig.json file on disk.

module.exports={// ...parserOptions:{project:true,},// ...};

We hope usingproject = true simplifies configurations for repositories with nontrivial ESLint configuration setups.
We intend to add additional options around automatic TSConfig lookups to allow additional file names or other convenient behaviors.

Affected URL(s)

https://typescript-eslint.io/blog/relative-parser-options-projects perhaps? Something like that?

Metadata

Metadata

Labels

accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updating

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp