Skip to content

Bug: Error for missing type info on file shouldn't exclusively suggest parserOptions.project #10039

Closed
@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 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

Right now, if you try to lint a file with a typed lint rule but don't enable type information, you get:

Error: Error while loading rule '@typescript-eslint/await-thenable': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.

That error used to be correct. But now that we've unleashed parserOptions.projectService (https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/#project-service), it's no longer accurate. We recommend parserOptions.projectService over parserOptions.project.

We should update the error.

Reproduction Repository Link

https://github.com/JoshuaKGoldberg/repros/tree/tseslint-outdated-error-without-type-information

Repro Steps

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

Versions

package version
@typescript-eslint/utils 9.11.0

Metadata

Metadata

Assignees

No one assigned

    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: utilsIssues related to the @typescript-eslint/utils package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions