Tell us about your environment
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,
},
}
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.
having the same exact issue
@mysticatea seems like this is an issue with vue-eslint-parser not eslint-plugin-vue
@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 It's already released: https://github.com/vuejs/eslint-plugin-vue/commit/a1fd26be58b657af9aa3f11acb191a172df0e233
@ctf0 you have to update eslint-plugin-vue to version 3.11.0
thanx
Most helpful comment
PR. https://github.com/mysticatea/vue-eslint-parser/pull/13