Home  >  Article  >  Web Front-end  >  Two ways to remove code specification detection in vue

Two ways to remove code specification detection in vue

亚连
亚连Original
2018-05-26 17:34:252406browse

When we use vue scaffolding, in order to standardize the team's code format, there will be a code specification check. If it does not meet the specification, an error will be reported. Sometimes we don't want to write according to his specification. At this time we need to close. Here I bring you two methods to remove the code specification detection in vue (Eslint verification). Let's take a look.

When we use vue scaffolding, in order to standardize the team's code Format, there will be a code specification detection. If it does not meet the specification, an error will be reported. Sometimes we don't want to write according to his specification. 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.

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

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

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

AJAX is used to determine whether the user is registered

ajax implements asynchronous file or image upload function

Two solutions for Ajax opening a new window and being intercepted by the browser

##

The above is the detailed content of Two ways to remove code specification detection in vue. 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