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

Add TSX support #1763

Closed
wants to merge 1 commit into from
Closed

Add TSX support #1763

wants to merge 1 commit into from

Conversation

luania
Copy link

@luania luania commented Jul 13, 2017

support .tsx files
beautify them just like .jsx

@Glavin001
Copy link
Owner

Related to #601

@Glavin001 Glavin001 self-assigned this Oct 6, 2017
@Glavin001 Glavin001 self-requested a review October 6, 2017 01:37
Copy link
Owner

@Glavin001 Glavin001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -31,7 +31,7 @@ module.exports = class JSBeautify extends Beautifier
return new @Promise((resolve, reject) =>
try
switch language
when "JSON", "JavaScript", "JSX"
when "JSON", "JavaScript", "JSX", "TSX"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TSX is incorrect, since the language in this case would actually be JSX from languages/jsx.coffee.

@@ -19,6 +19,7 @@ module.exports = {
###
extensions: [
"jsx",
"tsx",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if adding to TypeScript language would make more sense and have better support via the TypeScript Formatter: https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/typescript-formatter.coffee#L8

@Glavin001
Copy link
Owner

A few things to fix up before we can merge. Please let me know if you have any questions! Thank you for contributing!

@Glavin001 Glavin001 changed the title add tsx support Add TSX support Oct 6, 2017
@Glavin001
Copy link
Owner

I think using https://github.com/vvakame/typescript-formatter would be more appropriate.

@Glavin001
Copy link
Owner

Closing as no changes were made after request for changes. This can be reopened if someone intends to pick up where this left off. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants