解决报错 Vue Expected indentation of x spaces but found x

解决报错 Vue Expected indentation of x spaces but found x

1. 出现原因

1. Vue 项目中 Eslint 严格把控代码规范.

2. 缩进未按照 Eslint 代码规范.

2. 解决方法

2.1 方法一 (推荐)

找到项目下的 .eslintrc.js 文件.
在指定位置加入下面内容:

'indent': ['off', 2],

在这里插入图片描述

2.2 方法二

关闭 Eslint 检验, 不推荐.

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/YKenan/article/details/106104363