eslint "Identifier expected" in the html part of a .vue file

3.8k views Asked by At

I am using eslint for my Vue SFC (single file component) files.
Eslint now complains about "Parsing error: Identifier expected" on most of my .vue files.

For example:

<template>
  <q-layout view="hHh lpR fFf" container :style="layoutStyle">

gives the error on the word "container" (Parsing error: Identifier expected. eslint [2, 31])

Other example:

<template>
  <q-layout view="hHh lpR fFf" @resize="onResize">

Gives the error on the space just before "@resize" (Parsing error: Identifier exprected. eslint [2, 31])

I did install eslint-plugin-vue (6.2.2) using yarn and added "plugin:vue/recommended" to my .eslintrc. I also use the Quasar framework.

How can I fix the error?

0

There are 0 answers