Skip to content

Taking indent setting from tslint.json #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
myitcv opened this issue Aug 4, 2015 · 2 comments
Closed

Taking indent setting from tslint.json #20

myitcv opened this issue Aug 4, 2015 · 2 comments
Assignees

Comments

@myitcv
Copy link
Contributor

myitcv commented Aug 4, 2015

Unfortunately the current sample tslint.json for tslint incorrectly suggests the format for the indent rule is:

[true, 4]

However, the code that parses the setting expects the format to be:

[true, "spaces"]

There isn't even an option for a number in the final position (even though that seems quite sensible).

I've raised a pull request to fix the sample.

However this presents a problem for tsfmt, specifically here.

This means:

  • with a setting of [true, 4], tsfmt correct indents code but tslint fails to apply the indent linting rule
  • with a setting of [true, "spaces"], tsfmt removes all indenting but tslint correctly applies the indent linting rule

My suggestion would be that we drop the parsing of the indent rule from tslint.json.

@myitcv
Copy link
Contributor Author

myitcv commented Aug 4, 2015

This change works for me...

@vvakame vvakame self-assigned this Aug 5, 2015
@myitcv
Copy link
Contributor Author

myitcv commented Sep 22, 2015

This is handled by #24

@myitcv myitcv closed this as completed Sep 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants