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

MySQL 5.7.18 release installation guide (including bin file version)

The installation process is basically the same as...

JavaScript implements draggable progress bar

This article shares the specific code of JavaScri...

Docker Tutorial: Using Containers (Simple Example)

If you’re new to Docker, take a look at some of t...

Vue implements a small countdown function

Countdown function needs to be implemented in man...

MySQL uses limit to implement paging example method

1. Basic implementation of limit In general, the ...

Implementing a puzzle game with js

This article shares the specific code of js to im...

Detailed explanation of Vue element plus multi-language switching

Table of contents Preface How to switch between m...

Sample code for html list box, text field, and file field

Drop-down box, text field, file field The upper p...

vue3.0+echarts realizes three-dimensional column chart

Preface: Vue3.0 implements echarts three-dimensio...

In-depth analysis of MySQL data type DECIMAL

Preface: When we need to store decimals and have ...

Detailed explanation of the implementation of nginx process lock

Table of contents 1. The role of nginx process lo...

KTL tool realizes the method of synchronizing data from MySQL to MySQL

Use ktl tool to synchronize data from mysql to my...

How to deploy kafka in docker

Table of contents 1. Build Docker 2. Enter the co...