运行 npm run lint -- --fix,提示:error Use the global form of 'use strict'


  • 运行 npm run lint -- --fix,提示:error Use the global form of 'use strict',使用说明网址:https://eslint.org/docs/2.0.0/rules/strict#options

  • 解决办法:
    .eslintrc 文件中,添加如下配置:不使用"use strict",就不提示了:

{
  "rules": {
    "strict": [2, "never"]
  }
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM