How to close eslint when vscode uses VueCLI to create a project

Eslint

Eslint is a JavaScript verification plug-in, usually used to verify grammar or code writing style.

When we use it, we need to follow the eslint specification. When our code does not conform to the specification, even if there is an extra space, a warning or prompt will appear.

When we use VueCLI to create a project, we can choose: Use ESLint to lint your code? (Y/n), choose N here.

But many people only find out that they have chosen Eslint after creating the project, and it will be very annoying to write code at this time.

Such as the following! ! !
insert image description here
Seeing this column of yellow, I believe programmers will be very uncomfortable after seeing it, but this is not a mistake, it is just because the specification is not followed, maybe it is just because of a blank space, at this time we need to turn off eslint again.

How to turn off eslint

Regarding turning off eslint, of course the first thing I thought of was to find a way in CSDN, but after searching for a long time, I didn't find a solution to the problem. Because some people's project structure is like this,
insert image description here
you can comment out the '@vue/standard' in it by modifying the content of .eslintrc.js. Then restart it,
insert image description here
but my project looks like this. I
insert image description here
found that there is no .eslintrc.js file in it, so what we need to modify here is package.json.
Open the file and you can see that there is this paragraph in the content.
insert image description here
What we have to do at this time is to uninstall the @vue/cli-plugin-eslint and eslint configuration inside.
Open the terminal to uninstall the configuration through the uninstall
insert image description here
insert image description here
command . Note: both must be together Uninstall, uninstalling one is useless.
After uninstalling, restart it again. At this time, our project has become like this.
insert image description here
Does it look comfortable? At this time, no matter how many spaces are added, hahaha.

But eslint also has many advantages. It can force and standardize our code, force us to write beautiful and standardized code, and develop a good coding habit. Over time, the code written will become more beautiful! ! !

Creation is not easy, give the blogger a follow! ! ! ! ! ! ! ! ! ! ! ! !

Guess you like

Origin blog.csdn.net/m0_46496355/article/details/115016525