Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the vue indentation error of idea Compiler

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the idea compiler vue indent error report how to solve the relevant knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that after reading this idea compiler vue indent error report how to solve the article will have a harvest, let's take a look at it.

Project scenario:

When running the Vue project, there is a problem of indenting errors. I use the compiler of idea and check the Internet to check the number of indents that are mostly changed directly, but I find it troublesome and just want to turn off verification.

Problem description:

Idea compiler reported Vue indentation error

✘ http://eslint.org/docs/rules/indent Expected indentation of 0 spaces but found 2

SrccomponentsHome.vue:6:1

Export default {

^

✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4

SrccomponentsHome.vue:7:1

Name: "Home"

^

✘ http://eslint.org/docs/rules/indent Expected indentation of 0 spaces but found 2

SrccomponentsHome.vue:8:1

}

^

✘ 3 problems (3 errors, 0 warnings)

Solution:

Add these three lines of code to .eslintrc.js

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

What it will look like 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 the article on "how to solve vue indentation errors in the idea compiler". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "idea compiler vue indent error report how to solve". If you want to learn more knowledge, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report