vue 第一页就报错,自信心备受打击

本文介绍了如何解决ESLint产生的警告和错误,包括混合使用空格和制表符、意外的制表符字符等问题,并提供了关闭ESLint的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


 WARNING  Compiled with 3 warnings                                                                              12:55:50


  ✘  http://eslint.org/docs/rules/no-mixed-spaces-and-tabs  Mixed spaces and tabs
  src\App.vue:3:2
        <headerNav></headerNav>
    ^

  ✘  http://eslint.org/docs/rules/no-tabs                   Unexpected tab character
  src\App.vue:3:4
        <headerNav></headerNav>
         ^

  ✘  http://eslint.org/docs/rules/indent                    Expected indentation of 0 spaces but found 1 tab
  src\App.vue:9:1
        import headerNav from './components/header-nav.vue'
       ✘ 1 problem (1 error, 0 warnings)

自信心备受打击,没办法,只好百度,发现一篇很象,管他呢,照做再说,最后发现,报错日记里,有提示是哪里有问题
Errors:
  1  http://eslint.org/docs/rules/no-trailing-spaces

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.



转摘解决方法:

https://segmentfault.com/q/1010000007001988

因为你设置了eslint,如果你不想有规范的js代码,可以重新初始化关掉eslint。

Use ESLint to lint your code? (Y/n) 这一步选no

在bulid/webpack.base.conf.js里面有配置如下:
module: {
rules: [

...(config.dev.useEslint ? [createLintingRule()] : []),

点进config.dev.useEslint,发现在config/index.js里配置
useEslint: true, // 改为false即可。



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值