我已将 "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/