Tell us about your environment
Please show your full configuration:
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
},
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
extends: ['standard', 'plugin:vue/recommended'],
// required to lint *.vue files
plugins: [
'import',
],
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'comma-dangle': 0
}
}
I use this config and throw a error:
Error while loading rule 'vue/no-confusing-v-for-v-if': Cannot convert undefined or null to object
but when remove parser: 'babel-eslint', it doesn't throw error.
What did you expect to happen?
Works normally with babel-eslint parser.
@xekri you should try
- "parser": "babel-eslint",
"parserOptions": {
+ "parser": "babel-eslint",
"sourceType": "module"
}
Most helpful comment
@xekri you should try
https://github.com/vuejs/eslint-plugin-vue#couple-faq