Skip to content

Parsing errors when combined with eslint-plugin-vue as of 1.5.0 #404

@thebanjomatic

Description

@thebanjomatic

PR #367 seems to have introduced a number of unexpected false linter errors when used in combination with eslint-plugin-vue. I think the problem boils down to the assumption from the PR that this function will only get called twice if in watch or fix mode not being valid.

With single-file-components in .vue files, this function winds up getting called for each section of the file that may contain scripts. Naturally this includes the <script></script> block, but also includes things like interpolations and v-bind's, etc. Each time getting called with the same filePath.

What code were you trying to parse?

See the following reproducer:
https://github.com/thebanjomatic/lint-repro

What did you expect to happen?

Running lint should not produce false errors

What actually happened?

Parsing appears to be broken and a multitude of different lint errors are produced.

Versions

package version
@typescript-eslint/typescript-estree >= 1.5.0
TypeScript 3.3.4000
node 8.15.0
npm 6.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    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