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

projectService / EXPERIMENTAL_useProjectService gives TS error if not boolean on v8 alpha / v7 #9313

Closed
Assignees
JoshuaKGoldberg
Labels
accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: parserIssues related to @typescript-eslint/parserpackage: typescript-eslintIssues related to the typescript-eslint package
Milestone
@hkatzdev

Description

@hkatzdev

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

types

ESLint Config

importtseslintfrom'typescript-eslint';// v8 alphaexportdefaulttseslint.config({languageOptions:{parserOptions:{projectService:{allowDefaultProject:['./*.js'],defaultProject:'./tsconfig.json',},},},},);// v7exportdefaulttseslint.config({languageOptions:{parserOptions:{EXPERIMENTAL_useProjectService:{allowDefaultProject:['./*.js'],defaultProject:'./tsconfig.json',},},},},);

tsconfig

{"compilerOptions": {"allowJs":true,"checkJs":true,  }}

Expected Result

Config should not have a type error.

Actual Result

On line 7, there is an error.
On v8 alpha:

Type '{ allowDefaultProject: string[]; defaultProject: string; }' is not assignable to type 'boolean'.ts(2322)parser-options.d.ts(30, 5): The expected type comes from property 'projectService' which is declared here on type 'ParserOptions'

On v7:

Type '{ allowDefaultProject: string[]; defaultProject: string; }' is not assignable to type 'boolean'.ts(2322)parser-options.d.ts(25, 5): The expected type comes from property 'EXPERIMENTAL_useProjectService' which is declared here on type 'ParserOptions'

Additional Info

Config is adapted fromhttps://typescript-eslint.io/blog/announcing-typescript-eslint-v8-beta/#project-service.
At a glance, it seems like there is a type mismatch between

projectService?:boolean|ProjectServiceOptions;
and. It looks like a similar issue exists in the stable version (
EXPERIMENTAL_useProjectService?:boolean|ProjectServiceOptions;
and
EXPERIMENTAL_useProjectService?:boolean;// purposely undocumented for now
)

Versions

v8 alpha

packageversion
@typescript-eslint/types8.0.0-alpha.29
@typescript-eslint/parser8.0.0-alpha.29
typescript-eslint8.0.0-alpha.29

v7

packageversion
@typescript-eslint/types7.12.0
@typescript-eslint/parser7.12.0
typescript-eslint7.12.0

Metadata

Metadata

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp