admin管理员组文章数量:1405132
I have added "strict": false
to the default .jshintrc
, yet Sublime 3 still shows the "Missing 'use strict'" In-Editor warning.
Any help how to disable this warning?
Here is my plete .jshintrc
:
{ // Details: // Example: /.jshintrc // Documentation: / "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 }
I have added "strict": false
to the default .jshintrc
, yet Sublime 3 still shows the "Missing 'use strict'" In-Editor warning.
Any help how to disable this warning?
Here is my plete .jshintrc
:
{ // Details: https://github./victorporof/Sublime-JSHint#using-your-own-jshintrc-options // Example: https://github./jshint/jshint/blob/master/examples/.jshintrc // Documentation: http://www.jshint./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 }Share Improve this question asked Nov 16, 2015 at 9:24 Dmitri ZaitsevDmitri Zaitsev 14.1k12 gold badges78 silver badges114 bronze badges 2
-
5
The above config should work, if you want to disable / enable strict mode on a single file you can write:
/* jshint strict: false */
– Andreas Louv Commented Nov 16, 2015 at 9:30 - 1 It seems other people have had this issue. Are you using the latest version of Sublime Linter? – Saad Commented Nov 16, 2015 at 9:32
2 Answers
Reset to default 3You need go to sublime text3 > preferences > package settings > jshint gutter > set linting preferences and in this file .jshintrc change option "strict": "false". Then restart you sublimeText3
As stated by andlrc, the simpliest solution would be to specify to jshint to skip strict restriction on this file by adding at the top of it :
/* jshint strict: false */
版权声明:本文标题:javascript - How to disable the Missing "use strict" statement by jshint in Sublime 3? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744891253a2630794.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论