error Expected indentation of 2 spaces but found 4 indent

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值