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?
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.
/*jshint smarttabs:true */
See smarttabs
, under "Relaxing Options." http://www.jshint.com/docs/options/
This option suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only. The technique is called SmartTabs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With