How to turn off eslint detection in vue (multiple methods)

How to turn off eslint detection in vue (multiple methods)

1. Problem Description

When we develop a vue project, we may accidentally choose eslint when creating it. This detection rule is a nightmare for novices and will make you crash. So what should we do if we don't want eslint to detect it? I have summarized some methods for different versions.

2. Problem Solving

1. First is the older vue project

Older projects may have a file like webpack.base.conf.js . If there is this file, just modify it to solve it.

insert image description here

The red-framed part in the above picture shows the file contents in my project. Other projects may have other contents. We can just comment out or remove the contents in the frame.

insert image description here

2. When creating a project, do not choose eslint

insert image description here

3. If the editing software you are using is WebStorm

insert image description here

4. The created project does not have a webpack.base.conf.js file, but has a .eslintrc.js

insert image description here

@vue/standard

Just comment this out.

5. For newer Vue projects, there is no (direct) webpack.base.conf.js file in the directory, but there may be one in node_module. And there is no .eslintrc.js file

In this case, our project's directory structure will generally create a vue.config.js file, and we can operate this file

module.exports = {
  lintOnSave: false
},

After the change, you need to restart the project to take effect. You can turn it off by setting it to false. For other configurations, see the description on the official website

insert image description here

insert image description here

6. Modify the .eslintignore file

There is a file .eslintignore in the root directory. Just add the files you don’t need to check.
For example, if you don't want it to check vue files, then add .vue. Of course, this will prevent all vue files from being checked. Similarly, .js means that all js files will not be checked. The advantage of this is that it is simple and easy to understand, but the disadvantage is that it is a bit troublesome.

This method is basically enough to solve this problem, but the author still recommends that you use this test file when you have some development experience. It can not only cultivate good programming habits, but also make it easier to keep the same style as other people in the team.

This concludes this article on how to turn off eslint detection in vue (multiple methods). For more information about how to turn off eslint detection in vue, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • vue-cli3 solution to cancel eslint code verification
  • How to remove eslint validation from projects built with vue-cli scaffolding
  • Explanation of steps to cancel ESLint code detection in Vue project
  • Solution to remove eslint checker errors in vue cli2 and cli3

<<:  Use Xshell to connect to the Linux virtual machine on VMware (graphic steps)

>>:  MySQL transaction isolation level details

Recommend

linux exa command (better file display experience than ls)

Install Follow the README to install The document...

How to modify iTunes backup path under Windows

0. Preparation: • Close iTunes • Kill the service...

Usage of Linux userdel command

1. Command Introduction The userdel (user delete)...

Detailed explanation of VUE's data proxy and events

Table of contents Review of Object.defineProperty...

Detailed explanation of unique constraints and NULL in MySQL

Preface A requirement I had previously made, to s...

MySQL 4 common master-slave replication architectures

Table of contents One master and multiple slaves ...

MySQL full backup and quick recovery methods

A simple MySQL full backup script that backs up t...

Comparison of the efficiency of different methods of deleting files in Linux

Test the efficiency of deleting a large number of...

How to install Docker on Windows Server 2016

Recently Microsoft released Windows Server 2016, ...

18 Amazing Connections Between Interaction Design and Psychology

Designers need to understand psychology reading n...

How to solve jQuery conflict problem

In front-end development, $ is a function in jQue...

Summary of the application of transition components in Vue projects

​Transtion in vue is an animation transition enca...

Web Design Tips: Simple Rules for Page Layout

Repetition: Repeat certain page design styles thr...