Home > OS >  Missing space before function parentheses Vue Js
Missing space before function parentheses Vue Js

Time:10-04

i am a beginner of vue js. while running the project i ran into the problem with Missing space before function parentheses and i got 3 errors i attached below.

 ✘  http://eslint.org/docs/rules/space-before-function-paren  Missing space before function parentheses                
  src\components\HelloWorld.vue:14:7
    data() {
         ^

  ✘  http://eslint.org/docs/rules/key-spacing                  Missing space before value for key 'helloWorld'          
  src\components\HelloWorld.vue:16:18
        helloWorld:[
                    ^

  ✘  http://eslint.org/docs/rules/no-multiple-empty-lines      Too many blank lines at the end of file. Max of 0 allowed
  src\components\HelloWorld.vue:23:1

what i tried so far i attached below.

<template>
  <div >
      <h1>My To Do List </h1>
      <hr/>
      <div >
          Task 01
      </div>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data() {
    return {
      helloWorld:[
        { title: 'Task 01', complete: false }
      ]
    }
  }
}
</script>

CodePudding user response:

Try this.

export default {
  name: 'HelloWorld',
  data(){
    return {
      helloWorld: [{ title: 'Task 01', complete: false }]
    }
  }
}
  • Related