运行 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"]
  }
}
原文地址:https://www.cnblogs.com/cag2050/p/11176245.html