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

with-typescript-eslint-jest creates pages/api/hello.tsx #16906

Closed
guyellis opened this issue Sep 7, 2020 · 5 comments · Fixed by #16916
Closed

with-typescript-eslint-jest creates pages/api/hello.tsx #16906

guyellis opened this issue Sep 7, 2020 · 5 comments · Fixed by #16916
Labels
good first issue Easy to fix issues, good for newcomers
Milestone

Comments

@guyellis
Copy link

guyellis commented Sep 7, 2020

Bug report

with-typescript-eslint-jest creates pages/api/hello.tsx instead of pages/api/hello.ts

To Reproduce

  1. npx create-next-app --example with-typescript-eslint-jest with-typescript-eslint-jest-app
  2. page/api/ has hello.tsx instead of hello.ts

Expected behavior

Expected a .ts file and not a .tsx file for API.

Screenshots

N/A

System information

  • OS: Ubuntu 20.04
  • Browser: N/A
  • Version of Next.js: 9.5.3
  • Version of Node.js: 14.9.0

Additional context

This is easy for me to fix. For new or less experienced users this might be confusing and misleading.

@timneutkens
Copy link
Member

Both are fine really, but feel free to send a PR.

@guyellis
Copy link
Author

guyellis commented Sep 7, 2020

I agree that both will work. I think that the extension, in this context, conveys intent.

I would expect .tsx to render and have React markup and .ts not to have it.

@guyellis
Copy link
Author

guyellis commented Sep 7, 2020

Perhaps this could be tagged as good-first-issue?

@timneutkens timneutkens added good first issue Easy to fix issues, good for newcomers kind: story labels Sep 7, 2020
@timneutkens timneutkens added this to the backlog milestone Sep 7, 2020
@piotrzarycki
Copy link
Contributor

piotrzarycki commented Sep 7, 2020

Hi, can i take this one? :)

piotrzarycki added a commit to piotrzarycki/next.js that referenced this issue Sep 7, 2020
@kodiakhq kodiakhq bot closed this as completed in #16916 Sep 8, 2020
kodiakhq bot pushed a commit that referenced this issue Sep 8, 2020
@Timer Timer reopened this Sep 8, 2020
@Timer Timer closed this as completed Sep 8, 2020
@Timer Timer modified the milestones: backlog, iteration 9 Sep 8, 2020
HitoriSensei pushed a commit to HitoriSensei/next.js that referenced this issue Sep 26, 2020
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants