-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Route segments naming convention #374
Comments
@rwjblue do you happen to know the answer? I stumbled upon this question yesterday too and couldn't find an answer |
Basically IMHO, this has aged pretty poorly and should be reconsidered, but given that this type of implicit behavior is actually kinda hard to migrate away from the exact transition path is tricky. |
We could probably make that regexp match either |
FWIW, I think we could tweak the rule to make it clearer that |
could we make it an optional feature to use postId instead of post_id, or something like that? |
I would like to find a path towards dropping snake-casing conventions entirely. EDIT: Looks like there's an RFC: emberjs/rfcs#556. |
This rule is only needed if your app depends on the fallback model loading behaviour. That behaviour is considered bad practise and will be deprecated in the future. That means we can disable the linting rule that forces snake_case and can start using camelCase instead. ember-cli/eslint-plugin-ember#374
This is more in line with the JS ecosystem and the snake_case version provides no benefits for us. ember-cli/eslint-plugin-ember#374
Can anyone explain why snake_case is the recommended naming convention for route segments?
The route-segments-snake-case documentation mentions
Ember doesn't have to do extra serialization in order to resolve promises
but I'm not sure what that means exactly.I would prefer to just use camelCase in our apps, but I first want to understand why snake_case was recommended in the first place 😄
The text was updated successfully, but these errors were encountered: