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

Intent to RFC: make the default router dynamic segments camelCase. #556

Closed
NullVoxPopuli opened this issue Nov 26, 2019 · 5 comments
Closed

Comments

@NullVoxPopuli
Copy link
Sponsor Contributor

NullVoxPopuli commented Nov 26, 2019

Today, the default dynamic route segments are :snake_case. This is a ruby/rails-ism.
In JS, we use camelCase and today, using :camelCase works.

Additionally, there are conflicting lint rules:

model({ post_id }) will error because post_id is not camelCase. eslint: camelcase
but
this.route('show', { path: ':postId' }) will error because the param is not snake_case. ember/routes-segments-snake-case

Also, this should be deprecated (maybe as a separate RFC), because it adds additional behaviour based on a convention of snake_case:
lib/system/route#model (comment / id parse regex)

We don't really need implicit model finding (lib/system/route#findModel), as we haven't been teaching that for a while.
It implies we have a store service, which not all ember-apps do.

@HeroicEric
Copy link
Sponsor Member

Related ember-cli/eslint-plugin-ember#410

@NullVoxPopuli
Copy link
Sponsor Contributor Author

Deprecation of Implicit Record Loading: #557

@wagenet
Copy link
Member

wagenet commented Jul 23, 2022

I'm closing this due to inactivity. This doesn't mean that the idea presented here is invalid, but that, unfortunately, nobody has taken the effort to spearhead it and bring it to completion. Please feel free to advocate for it if you believe that this is still worth pursuing. Thanks!

@wagenet wagenet closed this as completed Jul 23, 2022
@NullVoxPopuli
Copy link
Sponsor Contributor Author

I think we should still do this -- and ember-cli/eslint-plugin-ember#410 still open.

snake_case is just weird in JS

@wagenet
Copy link
Member

wagenet commented Jul 23, 2022

Closing the ticket doesn’t mean we shouldn’t do it, just that, as it is, there’s no path forward for it. In other words, no one has or is putting in the work to make it happen. In practice, that means it’s not going to happen and, unfortunately, the tickets just end up adding more clutter.

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

No branches or pull requests

3 participants