3 ms·
As stated in the repo, you could just go with anything, just pick one for your project, and follow. The general rule that applies here is consistency. So let's
by khangnd 6y ago
As stated in the repo, you could just go with anything, just pick one for your project, and follow. The general rule that applies here is consistency.
So let's say in PHP, the preferred convention is snake_cake, then use it for the whole project. Then if you are working on a JS project, which the team demands camelCase, then just follow it.
There could be some cases, like in your 3rd example, the team applies camelCase for normal variables, and snake_cake for properties. Again, you still have to follow if it is something the team has agreed.
- Akcium 6y agoYep, I understand, I just dislike the fact that we'll have 2 types (like fullName and user.first_name + user.last_name), even though it's an agreement. Just a bit annoying :)