Parsing error: Unexpected token

When using VUE Cli3, I encountered the following problems:

error: Parsing error: Unexpected token < at src\views\index.vue:1:1:
> 1 | <template>
    | ^
|   <div class="index">
|     <router-view></router-view>
|     <TabBar :data="tabbarData"></TabBar>

Looking up many websites, can not solve this problem, finally, in
https://stackoverflow.com/questions/53601579/parsing-error-unexpected-token-using-vuecli3-and-airbnb-eslint?r=SearchResults
Find a way
Open your.eslintrc.js file and find the Parser
Here’s my.eslintrc.js

module.exports = {
    rules: {
        'no-console': 'off',
        "parser": "vue-eslint-parser"
    },
}

Note:
This error is reported when I write “import”. In this case, I only need to put the “.eslintrc.js”
“Parser” : comment out “Vue-Eslint-Parser” and restart the project. Then, uncomment it and restart the project again with no error.
Why that should be, I don’t understand. If you have a better solution, please leave me a message, thank you!!

Read More: