Dmitri Zaitsev
Dmitri Zaitsev

Reputation: 14046

How to disable the Missing "use strict" statement by jshint in Sublime 3?

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 complete .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
}

Upvotes: 2

Views: 5180

Answers (2)

Baldráni
Baldráni

Reputation: 5640

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 */

Upvotes: 3

Salinder
Salinder

Reputation: 31

You 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

Upvotes: 3

Related Questions