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

Detect typos for GS(S)P #20527

Closed
Timer opened this issue Dec 28, 2020 · 3 comments · Fixed by #26650
Closed

Detect typos for GS(S)P #20527

Timer opened this issue Dec 28, 2020 · 3 comments · Fixed by #26650
Milestone

Comments

@Timer
Copy link
Member

Timer commented Dec 28, 2020

Feature request

Is your feature request related to a problem? Please describe.

We should intelligently detect common typos in page exports for getStaticProps/getServerSideProps/et al.

Describe the solution you'd like

If a user exports getServurSideProps, we should throw an error and ask them if they've made a typo.

Describe alternatives you've considered

Throw no error.

Additional context

Since these method's names are critical to code elimination, we should try to catch typos for optimal DX.

@Timer Timer added this to the backlog milestone Dec 28, 2020
@advaiyalad
Copy link

advaiyalad commented Jan 2, 2021

I misspell getStaticProps sometimes, and I can't figure out what is going on. This is would be a helpful feature (if implemented).

@kaykdm
Copy link
Contributor

kaykdm commented Jun 27, 2021

@Timer @housseindjirdeh

I think this feature would be very helpful.
React and Vue also have typo check in their eslint.

Since Next.js 11 now supports ESLint out of the box, I opened PR to add no-typo rule to Next.js's eslint

@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 28, 2022
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 a pull request may close this issue.

4 participants