disable the white space at the end of the lines (non-space)

Asked

Viewed 136 times

0

I have this mistake in a project Vue js, I know it’s about Eslint I checked the tutorial on the website on how to remove error with command --fix, however it did not take effect, if anyone knows, I thank you if you can help.

Error:

http://eslint.org/docs/rules/key-spacing Missing space before value for key 'Component' src router index.js:9:29 {path:'/',Component:Home} ^

5 problems (5 errors, 0 warnings)

Errors: 3 http://eslint.org/docs/rules/key-spacing 1 http://eslint.org/docs/rules/comma-spacing 1 http://eslint.org/docs/rules/indent

@ ./src/main.js 5:0-30 @multi . /build/dev-client . /src/main.js

Listening at http://localhost:8080

Vue js

import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'

Vue.use(Router)

export default new Router({
    routes:[
        {path:'/',component:Home}
    ]
})
  • What command did you use? I created a file with your code and did eslint eslinttest.js --fix and worked well

  • Eslint --fix, in this case I should select the file giving the error

  • http://eslint.org/docs/rules/indent Expected indentation of 2 Spaces but found 0 src router index.js:11:1 } 4 problems (4 errors, 0 warnings)

  • Uses the file name in the command: eslint ./src/main.js --fix

1 answer

1


Uses the file name in the command: eslint ./src/main.js --fix

  • You could have said that my suggestion it had worked that I would give an answer :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.