intellij idea vue js 报ESLint: Expected indentation of 0 spaces but found 2. (indent)错误解决方法

ESLint这东西是真的烦,把人当做机器来验证。没办法,遇到他了,死磕。

就因为script后面的内容被idea格式化之后空了两格,这就不得了了,你一个警告,总是搞一个error的标志,难道不知道程序员最忌讳的就是打断吗。你要求严格,也不能这么玩啊。照我说,直接在配置里面干掉你都不带思考的,但是转念又怕跟国际脱轨。还是忍了

问题如下:

intellij idea vue js 报ESLint: Expected indentation of 0 spaces but found 2. (indent)错误解决方法_第1张图片

首选:File->Setting->Editor->HTML找到Do not indent children of:后面的内容添加script项

intellij idea vue js 报ESLint: Expected indentation of 0 spaces but found 2. (indent)错误解决方法_第2张图片

次之,indent后面数字改成0

intellij idea vue js 报ESLint: Expected indentation of 0 spaces but found 2. (indent)错误解决方法_第3张图片

最佳方法lol:直接干掉

intellij idea vue js 报ESLint: Expected indentation of 0 spaces but found 2. (indent)错误解决方法_第4张图片

感恩:

intellij idea vue js 报ESLint: Expected indentation of 0 spaces but found 2. (indent)错误解决方法_第5张图片

你可能感兴趣的:(java,web,idea,vue,Eslint)