3:8 error ‘Home’ is defined but never used no-unused-vars
组件定义未使用
9:1 error More than 1 blank line not allowed no-multiple-empty-lines
空行超过1个
14:1 error Expected indentation of 2 spaces but found 4 indent
缩进太多
15:1 error Expected indentation of 2 spaces but found 4 indent
16:1 error Expected indentation of 2 spaces but found 4 indent
22:22 error Newline required at end of file but not found e
需在代码文件最后一行按enter键制造空行
为避免报奇怪问题关掉eslint
vuecli4
关闭在已开启eslint
方法1: 在项目根目录创建vue.config.js, module.exports = { lintOnSave: false }
方法2:找到并注释 .eslintrc.js里的 ‘@vue/standard’
配置文件需重启项目才生效!!!
关闭命令行窗口
npm run serve
.editorconfig 代码格式配置
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true