运行 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"]
  }
}

posted on 2019-07-12 15:18  cag2050  阅读(4667)  评论(0编辑  收藏  举报

导航