Suppress "mixed spaces and tabs" warning in JSHint / JSLint or alternative service?

Crashalot picture Crashalot · Apr 23, 2012 · Viewed 22.8k times · Source

JSHint and JSLint are awesome tools.

However, the "mixed spaces and tabs" warning dominates the report. Is there a way to suppress these warnings, or is there a similar service that allows white space warnings to get suppressed?

Answer

Wilfred Hughes picture Wilfred Hughes · May 13, 2013

It's not possible to switch off this warning with a flag, and the JSHint maintainer doesn't want to add a flag for this.

However, it is possible to turn off warnings according to their number. In this case, you'd write:

/* jshint -W099 */

If you're using a JSHint configuration file, you can specify this there too:

{
    "-W099": true, // allowed mixed tabs and spaces
}

Alternatively, there's a custom reporter available to switch off this warning.