Eslint-plugin-vue: Maybe not compatible with [email protected]

Created on 6 Aug 2017  路  8Comments  路  Source: vuejs/eslint-plugin-vue

Tell us about your environment

  • ESLint Version: 4.4.0
  • eslint-plugin-vue Version: 3.10.0
  • Node Version: 8.2.1

Please show your full configuration:

.eslintrc.js:

module.exports = {
  root: true,
  extends: [ '../eslint-config-riophae/vue.js' ], // https://github.com/riophae/eslint-config-riophae/blob/24da6bb3723e60e8721075db7baccfc0a6c12bdd/vue.js
  rules: {
    indent: 0,
    'prefer-destructuring': 0,
    'no-warning-comments': 0,
  },
}
  • The error message:
Error while loading rule 'vue/no-confusing-v-for-v-if': Cannot read property 'on' of undefined
TypeError: Error while loading rule 'vue/no-confusing-v-for-v-if': Cannot read property 'on' of undefined
    at ensureEmitter (/mnt/d/Projects/tree-select/node_modules/vue-eslint-parser/index.js:2640:23)
    at Object.registerTemplateBodyVisitor (/mnt/d/Projects/tree-select/node_modules/vue-eslint-parser/index.js:2653:29)
    at Object.registerTemplateBodyVisitor (/mnt/d/Projects/tree-select/node_modules/eslint-plugin-vue/lib/utils/index.js:38:28)
    at Object.create (/mnt/d/Projects/tree-select/node_modules/eslint-plugin-vue/lib/rules/no-confusing-v-for-v-if.js:40:9)
    at Object.keys.filter.forEach.key (/mnt/d/Projects/tree-select/node_modules/eslint/lib/linter.js:874:67)
    at Array.forEach (native)
    at Linter.verify (/mnt/d/Projects/tree-select/node_modules/eslint/lib/linter.js:847:93)
    at processText (/mnt/d/Projects/tree-select/node_modules/eslint/lib/cli-engine.js:203:31)
    at processFile (/mnt/d/Projects/tree-select/node_modules/eslint/lib/cli-engine.js:245:18)
    at executeOnFile (/mnt/d/Projects/tree-select/node_modules/eslint/lib/cli-engine.js:585:25)

I have tried downgrading ESLint to 4.3.0 and it solves the problem. So I guess it's related to the latest release of ESLint.

accepted proposition bug

Most helpful comment

All 8 comments

having the same exact issue

@mysticatea seems like this is an issue with vue-eslint-parser not eslint-plugin-vue

https://github.com/mysticatea/vue-eslint-parser/blob/43932bf50bd057cdbd316f25eacd92288312e8f7/src/parser-services.ts#L24

@ctf0 @riophae ok i see where there is issue eslint property from context was renamed to private
this._linter = linter;

https://github.com/eslint/eslint/commit/b74514d51c0020371c3a94ae2a1ff677bd42ab0e#diff-fa79c1006638179cf4232bd250ee5fcdR165

@michalsnik when this will be release ?

@ctf0 you have to update eslint-plugin-vue to version 3.11.0

thanx

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisvfritz picture chrisvfritz  路  3Comments

sqal picture sqal  路  3Comments

gluons picture gluons  路  4Comments

rodneyrehm picture rodneyrehm  路  4Comments

KristofMorva picture KristofMorva  路  4Comments