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

Bug(typescript-estree): never infers singleRun as true for project service #9854

Labels
accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't working
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

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 havesearched for related issues and found none that matched my issue.
  • I haveread the FAQ and my problem is not listed.

Relevant Package

typescript-estree

ESLint Config

importtseslintfrom"typescript-eslint";exportdefaulttseslint.config(tseslint.configs.base,{files:["**/*.ts"],languageOptions:{parserOptions:{projectService:true,tsconfigRootDir:import.meta.dirname,},},rules:{"@typescript-eslint/no-floating-promises":"error",},});

Expected Result

Internally,inferSingleRun should returntrue when we're in single-run mode. Executing this config with something likenpx eslint . should be determined to be in single-run mode.

Actual Result

singleRun is always inferred to befalse right now, because of:

if(
// single-run implies type-aware linting - no projects means we can't be in single-run mode
options?.project==null||
// programs passed via options means the user should be managing the programs, so we shouldn't
// be creating our own single-run programs accidentally
options.programs!=null
){
returnfalse;
}

Additional Info

This doesn't generally have any impact on runtime performance right now. The project service doesn't generally use any single-run optimizations in single-run mode. But:


We should also investigate whether theoptions?.extraFileExtensions?.length check can be bypassed withoptions.projectService per#9504:

// https://github.com/typescript-eslint/typescript-eslint/issues/9504
// There's no support (yet?) for extraFileExtensions in single-run hosts.
// Only watch program hosts and project service can support that.
if(options?.extraFileExtensions?.length){
returnfalse;
}

Versions

packageversion
@typescript-eslint/typescript-estree8.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp