Random thoughts & observations

From the mundane to the profound and everything in between here’s what’s rocking our world

Suppressing JSHint mixed spaces and tabs warning

Posted: March 24, 2016
Written by: Saints At Play
Category: Gulp

If you've been using JSHint for an extended period of time you may have encountered warnings being printed to the console akin to the following:

scripts.js: line 23, col 1, Mixed spaces and tabs.
scripts.js: line 44, col 1, Mixed spaces and tabs.

This warning occurs as JSHint will not allow spaces and tabs to be used together.

Switching this off is quite easy...

In your .jshintrc file (which you should be using - if you follow best practice recommendations for working with JSHint) add the following configuration rule:

"-W099" : true

Which will stop warnings about mixed spaces and tabs being printed to the console.

A full list of error and warning codes that can be used in your .jshintrc file are available here.

« Return to Posts

Comments

There are no comments

Posting comments after three months has been disabled.