我已将"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 }
答案 0 :(得分:2)
你需要去sublime text3>偏好>包装设置> jshint gutter>设置linting首选项并在此文件中.jshintrc更改选项“strict”:“false”。然后重新启动sublimeText3
答案 1 :(得分:0)
正如andlrc所述,最简单的解决方案是指定jshint通过在其顶部添加来跳过对此文件的严格限制:
/* jshint strict: false */