Analysis of idea compiler vue indentation error problem scenario

Analysis of idea compiler vue indentation error problem scenario

Project scenario:

When running the Vue project, there was an indentation error. I was using the idea compiler and checked online. Most of them directly changed the number of indents, but I thought it was troublesome and just wanted to turn off the verification.

Problem description:

Vue indentation error occurs in idea compiler

✘ http://eslint.org/docs/rules/indent Expected indentation of 0 spaces but found 2
src\components\Home.vue:6:1
export default {
^

✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4
src\components\Home.vue:7:1
name: 'Home'
^

✘ http://eslint.org/docs/rules/indent Expected indentation of 0 spaces but found 2
src\components\Home.vue:8:1
}
^

✘ 3 problems (3 errors, 0 warnings)

Solution:

insert image description here

Just add these three lines of code in .eslintrc.js

'no-tabs':'off',
    'indent':'off',
    'space-before-function-paren':0

After joining

rules:
    // allow async-await
    'generator-star-spacing': 'off',
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-tabs':'off',
    'indent':'off',
    'space-before-function-paren':0
  }

This is the end of this article about the scenario analysis of the Vue indentation error problem in the idea compiler. For more relevant Vue indentation error content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to use rich text editor wangEditor3 in Vue
  • Vue3 compilation process-source code analysis
  • In-depth understanding of Vue3 template compilation principle
  • Solve the problem that Vue-cli cannot compile es6
  • Vue project packaging and compilation optimization solution
  • A brief discussion on the code exploration generated by webpack compiling vue projects
  • Vue template compilation details

<<:  A simple example of MySQL joint table query

>>:  How to use the dig/nslookup command to view DNS resolution steps

Recommend

A brief analysis of the basic implementation of Vue detection data changes

Table of contents 1. Object change detection 2. Q...

Several ways to introduce pictures in react projects

The img tag introduces the image Because react ac...

Sample code for implementing 3D book effect with CSS

Without further ado, let's take a look at the...

Automatic failover of slave nodes in replication architecture in MySQL 8.0.23

I have been in contact with MGR for some time. Wi...

HTML discount price calculation implementation principle and script code

Copy code The code is as follows: <!DOCTYPE HT...

JS achieves five-star praise case

This article shares the specific code of JS to ac...

Pitfalls and solutions for upgrading MySQL 5.7.23 in CentOS 7

Preface Recently, I found a pitfall in upgrading ...

MySQL database Shell import_table data import

Table of contents MySQL Shell import_table data i...

Vue realizes picture switching effect

This article example shares the specific code of ...

Summary of using the exclamation mark command (!) in Linux

Preface Recently, our company has configured mbp,...

WEB Chinese Font Application Guide

Using fonts on the Web is both a fundamental skill...

How to install OpenSuse on virtualbox

The virtual machine is installed on the host mach...

Detailed explanation of MySQL partition table

Preface: Partitioning is a table design pattern. ...

Summary of common docker commands (recommended)

1. Summary: In general, they can be divided into ...