javascript - 如何在 Sublime 3 中禁用 jshint 的 Missing "use strict"语句?

标签 javascript ide sublimetext3 jshint

我已将 "strict": false 添加到默认的 .jshintrc,但 Sublime 3 仍然显示“Missing 'use strict'”编辑器内警告。

任何帮助如何禁用此警告?

这是我完整的.jshintrc:

{
  // Details: https://github.com/victorporof/Sublime-JSHint#using-your-own-jshintrc-options
  // Example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc
  // Documentation: http://www.jshint.com/docs/
  "browser": true,
  "camelcase": true,
  "devel": true,  // to suppress 'console' and 'alert'
  "esnext": true,
  //"eqnull": true,
  "expr": true, // This option suppresses warnings about the use of expressions
  "globals": {
    "_": false,
    "angular": false
  },
  "globalstrict": false,
  "strict": false,
  "predef": ["angular"],
  "quotmark": true,
  "smarttabs": true,
  "trailing": true,
  "undef": true,
  "unused": true
}

最佳答案

您需要转到 sublime text3 > preferences > package settings > jshint gutter > set linting preferences 并在此文件 .jshintrc 中更改选项“strict”:“false”。然后重启你的sublimeText3

关于javascript - 如何在 Sublime 3 中禁用 jshint 的 Missing "use strict"语句?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33731986/

相关文章:

sublimetext2 - Sublime Text : Keyboard shortcut for opening user settings on Windows

javascript - 从 JSON 响应访问 [Symbol(响应内部)]

javascript - 如何在 TIVO 设备上启动 asp.net 网站?

javascript - 将 jQuery 延迟 Promise 转换为原生 JavaScript Promise

python - pycharm中的IdeaVim插件不支持长按连续滚动?

editor - Sublime Text 3 自动换行(设置为默认)不再工作

autocomplete - 在 Markdown 中禁用 Sublime Text 3 html 自动完成

javascript - 使用 jQuery 的索引获取 HTML 选择选项的值

eclipse - 如何在 Eclipse 中编辑(运行时)类路径?

java - Java IDE 易于导入吗?