Need to Specify Tab Spacing, But Don't Want indent warnings #1196

RodMagnuson opened this Issue Jul 24, 2013 · 4 comments

4 participants


If JSHint reports an issue on a line that contains tabs the offsets are incorrect unless the indent option is specified, but if the indent option is specified you get a bunch of indent warnings. I would like to be able to specify the tab value, so the offsets are correct, but not get the indent warnings.


Can you give us an example, please.


Run JSHint on the following with undef true
x = 1;
It results in W117 at line 1, character 1

If you add a tab before the x
It results in W117 at line 1, character 5

if you add the indent:1 option
It results in W117 at line 1, character 2
Which is correct, as far as a code editor like code mirror is concerned

If add {} on the end
\tx = 1;{}
The results will now also contain a W015

I was thinking there could be an option to specify the tab expansion without getting the W015s, but that's not going to work for me, since a user could want W015s.

Please close this issue. I will have to do some post processing of the results.


I've got a fix for this exact issue here: jpwhiting@605daf8 since we hit the same problem when we created a validator for eclipse using jshint. Eclipse ide expects the column to be how many characters, with tabs counting as one character, so we needed this option to tell jshint to expand tabs to 1 character but not check for indentation problems.

JSHint member

There are no more indent warnings in JSHint.

@valueof valueof closed this Apr 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment