如何禁用Missing"使用严格" jshint在Sublime 3中的陈述?

时间:2015-11-16 09:24:51

标签: 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
}

2 个答案:

答案 0 :(得分:2)

你需要去sublime text3>偏好>包装设置> jshint gutter>设置linting首选项并在此文件中.jshintrc更改选项“strict”:“false”。然后重新启动sublimeText3

答案 1 :(得分:0)

正如andlrc所述,最简单的解决方案是指定jshint通过在其顶部添加来跳过对此文件的严格限制:

/* jshint strict: false */