Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v-for with (item, index) parsing errors #98

Closed
gcandal opened this issue Jan 21, 2021 · 4 comments
Closed

v-for with (item, index) parsing errors #98

gcandal opened this issue Jan 21, 2021 · 4 comments

Comments

@gcandal
Copy link

gcandal commented Jan 21, 2021

First of all, I'm sorry if the issue doesn't have the best format but I couldn't guidelines for opening issues.

Description

We've encountered several false-positives when running ESLint:

error  Parsing error: ...  Unexpected token
...
> 1 | for(let [(item,]index) in items);
    |          ^  vue/no-parsing-error

This happens with every instance of v-for="(item, index) in items".

Versions

  • Node: v12.19.0
  • eslint-plugin-vue: 7.4.0
  • ESLint: 7.16.0

ESLint config (partial)

{
  "env": {
    "browser": true,
    "es6": true,
    "jasmine": true,
    "es2021": true,
    "node": true
  },
  "globals": {
    "document": "readonly",
    "navigator": "readonly",
    "window": "readonly"
  },
  "parser": ".../node_modules/vue-eslint-parser/index.js",
  "parserOptions": {
    "parser": "@babel/eslint-parser",
    "ecmaVersion": 2020,
    "sourceType": "module",
    "requireConfigFile": false,
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "plugins": [
    "promise",
    "node",
    "import",
    "mocha",
    "vue"
  ],
 ...
}
@gcandal gcandal changed the title v-for parsing errors starting from v-for with (item, index) parsing errors Jan 21, 2021
@joamag
Copy link

joamag commented Jan 21, 2021

I believe this PR fixes it #97

@gcandal
Copy link
Author

gcandal commented Jan 21, 2021

@ota-meshi thank you for reacting so quickly, closing this.

@gcandal gcandal closed this as completed Jan 21, 2021
@ota-meshi
Copy link
Member

I fixed the bug and published it now.
The version is 7.4.1. It works fine in my environment.

@gcandal
Copy link
Author

gcandal commented Jan 21, 2021

On mine as well 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants