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

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.

Leave a Comment