Question: Parsing error: Unexpected token :
idefixcert opened this issue · comments
I have the following code:
const content: Ref<HTMLDivElement | undefined> = ref(undefined);
with eslint I see the following error:
49:13 error Parsing error: Unexpected token :
as a config I use:
/* eslint-env node */
module.exports = {
root: true,
parser: "vue-eslint-parser",
extends: [
"eslint:recommended",
"plugin:vue/vue3-essential",
],
parserOptions: {
ecmaVersion: "latest",
},
rules: {
//'vue/multi-word-component-names': 'off',
"vue/multi-word-component-names": [
"error",
{
ignores: ["About", "Home"],
},
],
},
};
my question is, if that is an error on my end or if it is an parsing error.
You have to change your parser configuration.
https://github.com/vuejs/vue-eslint-parser#parseroptionsparser