Home  >  Article  >  Web Front-end  >  Introduction to the method of turning off Eslint verification in the vue project

Introduction to the method of turning off Eslint verification in the vue project

PHPz
PHPzforward
2020-09-25 15:44:513519browse

This article will introduce to you how to turn off Eslint verification in the vue project. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

Introduction to the method of turning off Eslint verification in the vue project

When using vue-cli to create a vue project, there is an option to ask you whether to use Eslint to standardize your code. I chose yes.

After the project is successfully created, it can run without any problem.

I modified a few components and ran again, but errors were reported all the way...not to mention how miserable it was!

I keep looking at my code and feel that there is no problem. Later I look at the errors reported by it, such as:

'vm' is assigned a value but never used (vm is defined but never used) Use)

Newline required at end of file but not found (A line must be added at the end but not found)

Missing space before value for key 'render' (Missing in the render attribute Space)

Even the comment reports an error

Expected space or tab after '//' in comment

Expected exception block, space or tab after '/*' in comment

......

Introduction to the method of turning off Eslint verification in the vue project

So sometimes, Eslint's verification is too harsh, and I want to turn it off. The following is the specific method:

Modify the build\webpack.base.conf.js file

Introduction to the method of turning off Eslint verification in the vue project

In this way, If the shutdown is successful, errors will no longer occur.

Related recommendations:

2020 front-end vue interview questions summary (with answers)

vue tutorial recommendation: The latest 5 vue.js video tutorial selections in 2020

For more programming-related knowledge, please visit: Introduction to Programming! !

The above is the detailed content of Introduction to the method of turning off Eslint verification in the vue project. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete