The error is because of this line of code
item.component = () => import(`@/views/${_component}`)
If I modify .eslintrc.js
, it works
'indent' : "off",
'template-curly-spacing' : "off",
But this way, eslint won't help me format the code
when I run the following code, He can't work, but eslint has no errors:
item.component = () => import(`@/views/` + _component)
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"eslint": "5.15.3",
node -v: v12.9.1
eslint -v: v6.8.0
vscode
Try setting your eslint indent rule to contain: ignoredNodes for template literals. My eslintrc.js
has the following:
rules: {
indent: [2, "tab", {
ignoredNodes: ["TemplateLiteral"]
}],
... etc ...
}
That will ignore extended template literals.
If the above doesn't work, try deleting package-lock.json
and node_modules
then re-install with npm i
or yarn
. This will restore your packages and reset downline versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With