Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Added indent-with rule #212

Closed
wants to merge 1 commit into from
Closed

Conversation

fondasimone
Copy link
Contributor

Checks if the indentation consist of only tabs or spaces.

See #122.

It uses a simple regexp on every token trivia, skipping comments.
Let me know if there's anything that can be done/tested better.

@fondasimone
Copy link
Contributor Author

Any comment on this? :)

Does it need fixes? Improvements? Any chance to get into master?

@Bartvds
Copy link
Contributor

Bartvds commented Oct 2, 2014

I can't judge the implementation, but +1 for this rule.

@ashwinr
Copy link
Contributor

ashwinr commented Oct 3, 2014

will take a look. thanks!

@ashwinr
Copy link
Contributor

ashwinr commented Oct 12, 2014

hey @fondasimone sorry for the delay on this. Can you fold this into the existing indent rule? I think a good extension would be supporting indent: [true, "tab", 4] where the second argument has the option of "tab" or "space" and the last argument is the same as it currently exists.

@fondasimone
Copy link
Contributor Author

Sure, i can give it a try.

What would be the meaning of ["tab", 4]? 4 tabs!??

@ashwinr
Copy link
Contributor

ashwinr commented Oct 13, 2014

My original comment should have been indent: [true, "spaces", 4], sorry. I think we can safely ignore the indent sizing for tabs.

@fondasimone
Copy link
Contributor Author

Hey, i found a bit of time to look into this, but i see there's some problem with the indent rule? Should i wait or go ahead and just merge the two?

@ashwinr
Copy link
Contributor

ashwinr commented Oct 30, 2014

hey @fondasimone, TSLint upgraded its compiler to typescript 1.3. During that upgrade, a lot of the syntax changed and I found the indent rule to be very buggy as it stands. I plan to rewrite it soon as a different rule, so let's use it for specifying "tabs" or "spaces". let me know if you have any questions. thanks.

@fondasimone
Copy link
Contributor Author

Moved this code into a new PR (#234), guess you can close this one.

@ashwinr ashwinr closed this Nov 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants