Skip to content

eslint --fix broken <script> target #367

Closed
@moersing

Description

@moersing

Tell us about your environment

  • ESLint Version: 4.10.0
  • eslint-plugin-vue Version: 4.2.2
  • Node Version: 8.7.0

Please show your full configuration:

{
  "extends": [
    "plugin:vue/essential",
    "standard"
  ],
  "plugins": [
    "vue"
  ],
  "parserOptions": {
    "parser": "babel-eslint",
    "ecmaVersion": 2017,
    "sourceType": "module"
  },
  "rules": {
    "indent": "off",
    "vue/script-indent": [
      "error",
      2,
      {
        "baseIndent": 1
      }
    ]
  }
}




What did you do? Please include the actual source code causing the issue.

<script >export default {
    data () {
      return {
        msg: 'hello vue',
        logo: require('images/logo.png')
      }
    },
    methods: {
      printDemo () {
        console.log(this.msg)
      }
    }
  }
</script >

What did you expect to happen?

<script >
export default {
    data () {
      return {
        msg: 'hello vue',
        logo: require('images/logo.png')
      }
    },
    methods: {
      printDemo () {
        console.log(this.msg)
      }
    }
  }
</script >

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

/// Here was missing......
  export default {
    data () {
      return {
        msg: 'hello vue',
        logo: require('images/logo.png')
      }
    },
    methods: {
      printDemo () {
        console.log(this.msg)
      }
    }
  }
</script >

I want use eslint --fix to format my code , But I found an error , Just the script was missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions