Skip to content
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

@babel/generator support changing indent style #12586

Closed
1 task done
LeuisKen opened this issue Jan 5, 2021 · 3 comments
Closed
1 task done

@babel/generator support changing indent style #12586

LeuisKen opened this issue Jan 5, 2021 · 3 comments
Labels
i: enhancement i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@LeuisKen
Copy link

LeuisKen commented Jan 5, 2021

Feature Request

  • I would like to work on this feature!

Is your feature request related to a problem?

I want to change the indent to tab of my generated code, and according to https://github.com/babel/babel/blob/main/packages/babel-generator/src/index.js#L51 I can't change the indent style.

Describe the solution you'd like

Add an option to change the indent style.

Describe alternatives you've considered.

Documentation, Adoption, Migration Strategy

@LeuisKen LeuisKen changed the title @babel/generator support changing indent @babel/generator support changing indent style Jan 5, 2021
@babel-bot
Copy link
Collaborator

Hey @LeuisKen! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@JLHwung
Copy link
Contributor

JLHwung commented Jan 6, 2021

@babel/generator focuses on emitting correct JavaScript code with basic readability. That said, it does not provide much whitespace-related formatting options. You can pass the @babel/generator code to prettier which provide more formatting options.

@LeuisKen
Copy link
Author

LeuisKen commented Jan 6, 2021

I got it.

@LeuisKen LeuisKen closed this as completed Jan 6, 2021
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Apr 7, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: enhancement i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants