Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Use (j|t)sx in getLanguageVariant, rather than just tsx #527

Closed
JoshuaKGoldberg opened this issue Oct 8, 2018 · 5 comments
Closed

Use (j|t)sx in getLanguageVariant, rather than just tsx #527

JoshuaKGoldberg opened this issue Oct 8, 2018 · 5 comments
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Good First Issue 🙌 Howdy, neighbor! Status: Accepting PRs Type: Bug
Milestone

Comments

@JoshuaKGoldberg
Copy link

...and of course, immediately after #525 was resolved, I remembered that we haven't updated for TypeScript being able to run on .jsx files as well as .tsx.

@JoshuaKGoldberg JoshuaKGoldberg added Type: Bug Status: Accepting PRs Good First Issue 🙌 Howdy, neighbor! Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Hacktoberfest labels Oct 8, 2018
@dnguneratne
Copy link

Can I work on this?

@JoshuaKGoldberg
Copy link
Author

Absolutely @dnguneratne, please do! It should be a quick change to the regular expression mentioned in that issue.

@dnguneratne
Copy link

I think I need a bit of clarity here.
In PR #525,

-- src/utils/AstUtils.ts --
if (/.*\.tsx/i.test(node.fileName)) { was replaced with
if (node.fileName.endsWith('.tsx')) {.

If I am understanding this one correctly I should change
if (node.fileName.endsWith('.tsx')) { to
if (node.fileName.endsWith('.(j|t)sx')) { right?

@JoshuaKGoldberg
Copy link
Author

Hey @dnguneratne - looks like this was already resolved. All is well!

By (j|t) I was referring to regular expression syntax implying it could be satisfied by .jsx or .tsx at the end.

@dnguneratne
Copy link

Got it. Thanks for the clarification.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Good First Issue 🙌 Howdy, neighbor! Status: Accepting PRs Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants