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

next/link silently ignores params in case of typo #1275

Closed
sedubois opened this issue Feb 25, 2017 · 5 comments
Closed

next/link silently ignores params in case of typo #1275

sedubois opened this issue Feb 25, 2017 · 5 comments
Assignees

Comments

@sedubois
Copy link
Contributor

If I use <Link href='/' prefetc> (notice the typo), there's no error message. Possibly similar comment for other params and other Next.js APIs.

@arunoda
Copy link
Contributor

arunoda commented Feb 26, 2017

Actually, it's good dev only feature. We expose few APIs like this, so we might need to have them for those as well.

Anyway, I'd like to see this as a linter something externally. Anyway, this is something I'd love to see.

@arunoda arunoda added Type: Feature Request good first issue Easy to fix issues, good for newcomers labels Feb 26, 2017
@timneutkens
Copy link
Member

timneutkens commented Feb 26, 2017

Flow would catch this. I noticed the prefetch tag is missing though.
https://github.com/zeit/next.js/blob/master/examples/with-flow

@timneutkens
Copy link
Member

Some ideas over here facebook/react#1587

@timneutkens
Copy link
Member

timneutkens commented Feb 26, 2017

Seems like the best option is https://github.com/airbnb/prop-types forbidExtraProps since this wouldn't require someone to setup flow types etc. @arunoda If you agree I will implement this 👍
We could just copy over https://github.com/airbnb/prop-types/blob/master/src/forbidExtraProps.js to not hog in the whole library.

@timneutkens timneutkens self-assigned this Feb 27, 2017
@timneutkens timneutkens removed the good first issue Easy to fix issues, good for newcomers label Feb 27, 2017
@timneutkens
Copy link
Member

Seems like ljharb released it as separate package: https://github.com/airbnb/prop-types-exact pretty cool 👌 I'll experiment with it.

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants