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

Several ways to easily traverse object properties in JS

Table of contents 1. Self-enumerable properties 2...

The actual process of implementing the guessing number game in WeChat applet

Table of contents Function Introduction Rendering...

MySQL 5.7.17 winx64 installation and configuration graphic tutorial

I summarized the previous notes on installing MyS...

How to set up scheduled backup tasks in Linux centos

Implementation Preparation # Need to back up the ...

JavaScript to achieve simple image switching

This article shares the specific code for JavaScr...

A detailed introduction to the basics of Linux scripting

Table of contents 1. Script vim environment 2. Ho...

Nginx uses ctx to realize data sharing and context modification functions

Environment: init_worker_by_lua, set_by_lua, rewr...

A brief introduction to the general process of web front-end web development

I see many novice students doing front-end develop...

VMware Workstation virtual machine installation operation method

Virtual machines are very convenient testing soft...

How to count down the date using bash

Need to know how many days there are before an im...

Solve the MySQL 5.7.9 version sql_mode=only_full_group_by problem

MySQL 5.7.9 version sql_mode=only_full_group_by i...

MySQL master-slave replication delay causes and solutions

Table of contents A brief overview of the replica...

Nginx configures the same domain name to support both http and https access

Nginx is configured with the same domain name, wh...

How to uninstall MySQL 8.0 version under Linux

1. Shut down MySQL [root@localhost /]# service my...