idea編譯器vue縮排報錯問題場景分析
阿新 • • 發佈:2021-07-06
專案場景:
在執行專案時,出現了縮排報錯的問題,我是使用idea 的編譯器,上網查了一下多數都是直接更改縮排的的數量,不過我覺得麻煩,就只是想要關掉驗證。
問題描述:
idea編譯器出現Vue縮排報錯
✘ 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
}
&nwww.cppcns.combsp; ^✘ 3 problems (3 errors,0 warnings)
解決方案:
在.eslintrc. 里加入這三行程式碼即可
'no-tabs':'off','indent':'off','space-before-function-paren':0
加入後樣子
rules: {
// allow async-await
'generator-star-spacing': http://www.cppcns.com'off',// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off','no-tabs':'off',UTyhpJrKdp 'space-before-function-paren':0
}
到此這篇關於idea編譯器vue縮排報錯問題場景分析的文章就介紹到這了,更多相關