Parsing error: Unexpected token < #746

Closed
@PLQin

Description

Tell us about your environment

  • ESLint Version: v5.11.1
  • Node Version: v10.14.2
  • npm Version: 6.4.1
  • What parser (default, Babel-ESLint, etc.) are you using?

  • .eslintrc.js
  • Please show your full configuration:

    Configuration
    module.exports = {
        root: true,
        parserOptions: {
            "parser": "babel-eslint", 
            "sourceType": "module",
            "ecmaVersion": 6
        env: {
            browser: true,
            node: true,
            es6: true,
        extends: ["eslint:recommended"],
        // add your custom rules here
    
    
    
    
        
    
        //it is base on https://github.com/vuejs/eslint-config-vue
        rules: {
            "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
            "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
            "no-undef": "off",
            "no-unused-vars": "off",
            "no-redeclare": "off",
            "no-empty": "off",
            "indent": ["warn", 4],
            'vue/max-attributes-per-line': 'off', 
            'vue/order-in-components': 'off',
            'vue/html-end-tags': 'off',
    

    What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

    vue code

    <template>
      <div id="app">
        <router-view></router-view>
    </template>
    <script>
    export default {
      name: 'App' 
    </script>
    

    run ESLint :

    eslint --fix "./src/**/*.{js,vue}"

    What did you expect to happen?

    good running

    What actually happened? Please include the actual, raw output from ESLint.

    D:\_Me\-COMPANY-JiTeng-\src\App.vue : 
     1:1  error  Parsing error: Unexpected token <
    

    Are you willing to submit a pull request to fix this bug?

    image