Home  >  Article  >  Web Front-end  >  How to delete eslint in vuejs

How to delete eslint in vuejs

藏色散人
藏色散人Original
2021-10-27 15:54:503671browse

How to delete eslint in vuejs: 1. Find webpack.base.conf.js; 2. Delete codes such as "{test: /\.(js|vue)$/...}"; 3. Open the webpack.base.config.js file and log out the corresponding code; 4. Restart the service.

How to delete eslint in vuejs

The operating environment of this article: windows7 system, vue version 2.9.6, DELL G3 computer.

How to delete eslint in vuejs?

Remove eslint in vue:

eslint is a syntax checking tool, but the restrictions are too strict and most developers cannot adapt, so this demand arises

If it does not meet the specifications, an error will be reported. Sometimes we don’t want to write according to his specifications. At this point we need to close. There are two methods here.

1. When building vue scaffolding, you are prompted whether to enable eslint detection. Use ESLint to lint your code? Write no;

2. If the project has been generated, we can do this.

Find the file webpack.base.conf.js, as shown in the figure:

How to delete eslint in vuejs

Delete the content in the red box

How to delete eslint in vuejs

Open the webpack.base.config.js file in the bulid folder in the project. Delete or log out of the following code:

{   test: /\.(js|vue)$/,
   loader: 'eslint-loader',
   enforce: 'pre',
   include: [resolve('src'), resolve('test')],
   options: {
     formatter: require('eslint-friendly-formatter')
   }
 },

3. Finally: Restart the service npm run dev

Recommended: "The latest 5 vue.js video tutorial selections

The above is the detailed content of How to delete eslint in vuejs. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn