-
Notifications
You must be signed in to change notification settings - Fork 889
Clarify ident rule #13
Comments
|
I think there is a bug that was part of my confusion, looks related to the one-line literals: With this rule:
In this snippet (with tabs)
I get these 2 errors (line 75 is the indented line):
|
This one is interesting as well. This the content of a single file:
With this error: (line 6 is is next-to-last-one with the
Notice the |
Fixed the indentation rule to allow one-line literals always. so, the first example above should work. |
there's not much we can do about the second one. the single semi-colon is treated as an empty statement, and tslint complains about it not indented correctly (which is a valid complaint, IMHO). In general, we advise tslint to run after the tsc compilation succeeds, so we don't get tripped up by compiler errors, but there's not much we can do in this particular case. |
Cool, I understand. I had tslint before compilation, as it is a lot faster then compiling. But I can see how that'd could go wrong, I'll swap it. Note the |
but there's no empty block in your example, right? |
Ooops, you are right! I was confused with your mention of 'empty statement' (which there is between the closing brace and the semicolon, but that's not this rule). |
cool :) |
I'm not really sure what
ident
is about. Is it supposed to check indent levels? What about them?We use tabs for indenting, and I cannot get this rule to give helpful info.
I think this rule or another could check for indenting consistency, maybe also like
smarttabs
in JSHint.The text was updated successfully, but these errors were encountered: