Skip to content

Adds indent option #2165

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
wants to merge 7 commits into from
Closed

Adds indent option #2165

wants to merge 7 commits into from

Conversation

tinganho
Copy link
Contributor

I've tried to add indent option to tsc.

So tsc have the option --indentSize [size] where sizecan be 2 or 4.

I haven't fixed test cases. It would be good if someone could guide me through it. I was very hard to follow what is going on. I don't even get a diff of what went wrong. And I've noticed that there are significant white space issues on many source files. Like spaces occurring at the end of line and unix line breaks appearing with windows linebreaks.

@msftclas
Copy link

Hi @tinganho, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@msftclas
Copy link

@tinganho, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, MSBOT;

@mhegazy
Copy link
Contributor

mhegazy commented Feb 27, 2015

Thanks for the Pull Request. We have not exposed control flags for the style of the generated code. This applies to indent, placing curlies on their own line, spacing, splitting statements, maintaining semicolons, etc... We recommend using a code beautifier as a post build step instead.

I do not think we would want to add additional flags for different output code formatting options and maintain them going forward; the additional complexity in the compiler would not be worth the value add to most of our customers.

@mhegazy mhegazy closed this Feb 27, 2015
@tinganho
Copy link
Contributor Author

@mhegazy It would be good to have the style config to include newline types too. I kind of don't like that the compiler compiles windows new lines instead of unix ones.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 28, 2015

We have an issue for that: #1693. We would be open to take a PR for this since it is not just a style option but can affect other tools down stream in your build tool chain.

@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
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.

5 participants