Skip to content

Bug: Unconsistence behavior between cli and api call with vue-plugin #9278

@ziofat

Description

@ziofat

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

This is not related to vue-plugin but I need a non-ts file to reproduce this issue.

When I try to lint a vue file with eslint test.vue in command line, it will throw an error with message: Parsing error: "parserOptions.programs" has been provided for @typescript-eslint/parser..

But the same config can be used to lint same file when I lint it by calling ESLint.lintFiles.

The possible cause is the parserOptions.programs created by parser are different based on the singleRun option. The programs created when singleRun is true has no vue files included.

Reproduction Repository Link

https://github.com/ziofat/tseslint-vue-v8

Repro Steps

  1. clone the repo
  2. npm install
  3. npm lint:cli (which will throw error)
  4. npm lint:api (which will output lint problems as expected)

Versions

package version
@typescript-eslint/eslint-plugin 8.0.0-alpha.20
@typescript-eslint/parser 8.0.0-alpha.20
@typescript-eslint/scope-manager 8.0.0-alpha.20
@typescript-eslint/typescript-estree 8.0.0-alpha.20
@typescript-eslint/type-utils 8.0.0-alpha.20
@typescript-eslint/utils 8.0.0-alpha.20
TypeScript 5.4.5
ESLint 9.3.0
node 18.20.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.vueissues relating to vue supportworking as intendedIssues that are closed as they are working as intended

    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