idea編譯器vue縮進報錯問題場景分析
項目場景:
在運行Vue項目時,出現了縮進報錯的問題,我是使用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
}
^✘ 3 problems (3 errors, 0 warnings)
解決方案:

在.eslintrc.js 里加入這三行代碼即可
'no-tabs':'off',
'indent':'off',
'space-before-function-paren':0
加入后樣子
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
}
到此這篇關于idea編譯器vue縮進報錯問題場景分析的文章就介紹到這了,更多相關vue縮進報錯內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
vue項目啟動出現cannot GET /服務錯誤的解決方法
這篇文章主要介紹了vue項目啟動出現cannot GET /服務錯誤的解決方法,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-04-04
vue 解決setTimeOut和setInterval函數無效報錯的問題
這篇文章主要介紹了vue 解決setTimeOut和setInterval函數無效報錯的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2020-07-07
基于 vue-skeleton-webpack-plugin 的骨架屏實戰(zhàn)
這篇文章主要介紹了基于 vue-skeleton-webpack-plugin 的骨架屏實戰(zhàn),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2019-08-08

