> vue-admin-template@3.8.0 dev D:\heima\guili_vue\vue-admin-template-master
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
98% after emitting
WARNING Compiled with 1 warnings 下午2:19:25
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/eol-last Newline required at end of file but not found
src\api\login.js:27:2
}
^
✘ 1 problem (1 error, 0 warnings)
Errors:
1 http://eslint.org/docs/rules/eol-last
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
Vue報以上錯誤,格式化也沒有解決
后來發現問題在這;注意第27行
解決方案:Enter一個第28行就好了
1、報錯解釋
Errors:
1.http://eslint.org/docs/rules/eol-last 表示:文檔末尾要換行
Errors:
2 http://eslint.org/docs/rules/spaced-comment 表示: // 注釋后要跟空格
Errors:
3 http://eslint.org/docs/rules/indent 表示:縮進錯誤,設置'indent':0
Errors:
4 http://eslint.org/docs/rules/no-tabs 表示:tab縮進錯誤
2、報錯原因
文件編碼的代碼,不符合eslint的語法校驗規則
----------------------------------------
以下解決方案我目前還沒試過:
第一步 在vs的搜索(左側圖標放大鏡)里搜 useEslint: true
第二步 然后找到useEslint: true 將它改為useEslint: false,
第三步 ctrl+c 確定后 重啟項目 npm run dev