Skip to content

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

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy