Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use '--fix' to modify with Vue-cli

Tags:

I made some project by vue-cli 3.
So there is a lint in scripts of Package.json
And it makes so much error with eslint.
I want to use '--fix' to solve this automatically.
But where and how should I use '--fix' in commnad?

like image 704
Thomas Jason Avatar asked Feb 19 '19 04:02

Thomas Jason


People also ask

Which vue command inspect and modify the config?

You can also use the vue config command to inspect or modify the global CLI config.

What does vue-CLI-service lint do?

vue-cli-service lintLints and fixes files. If no specific files are given, it lints all files in src and tests , as well as all JavaScript files in the root directory (these are most often config files such as babel. config. js or .

Does vue CLI use Vite?

Vite isn't specific to Vue, but instead is a way to develop JavaScript/TypeScript applications. Let's look at the how the Vue CLI works and how Vite is different. Evan You is at it again. He developed a new tool called Vite (French for fast).

Does vue-CLI-service use webpack?

The vue-cli-service serve command starts a dev server (based on webpack-dev-server) that comes with Hot-Module-Replacement (HMR) working out of the box. In addition to the command line flags, you can also configure the dev server using the devServer field in vue. config.


2 Answers

./node_modules/.bin/vue-cli-service lint --fix seems to work

like image 187
Oskar Kosowski Avatar answered Sep 18 '22 01:09

Oskar Kosowski


Try with npm run lint -- --fix

like image 26
Tino Avatar answered Sep 20 '22 01:09

Tino