Unexpected token "||=" #1347
-
I've been having trouble configuring ESlint and keep getting an Content of my .eslintrc.json file
{
"env": {
"browser": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:vue/vue3-recommended",
"plugin:@typescript-eslint/recommended",
"@nuxtjs/eslint-config-typescript"
],
"parserOptions": {
"ecmaVersion": 2022,
"parser": "@typescript-eslint/parser",
"sourceType": "module"
},
"plugins": [
"vue",
"@typescript-eslint"
],
"rules": {},
"overrides": [
{
"files": ["*.vue"],
"rules": {
"vue/no-v-model-argument": "off",
"vue/no-v-for-template-key": "off"
}
}
]
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Okay, phew, I managed to solve this by myself. I made a few minor corrections to the ESlint configuration (e.g. decided not to use 'latest' as the value for ecmaVersion), but most importantly, I needed to use a different Node version. I was using |
Beta Was this translation helpful? Give feedback.
Okay, phew, I managed to solve this by myself. I made a few minor corrections to the ESlint configuration (e.g. decided not to use 'latest' as the value for ecmaVersion), but most importantly, I needed to use a different Node version. I was using
v14.17.6
, which apparently doesn't support the '||=' operator, even though it should support ES 2021 🤯 Dunno, but using the latest LTS version solved the problem.