-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Filenames should be consistent with a styleguide rule #5383
Comments
I'll echo what I assume I've said before, possibly multiple times (but thanks for creating a formal issue about it). I'm partial to snake_case naming, since it's more common in the JS ecosystem and it's what we've mostly used so far. However, as long as we are consistent, I honestly do not care. |
I strongly prefer camelCase and am willing to do the work to transition the code base. I am want camelCase because there is no good reason to use two capitalization styles. If we used snake_case variable names I would prefer snake_case file names. We don't. Let's be consistent and use camelCase everywhere! 🎉 🐫 🐫 🐫 🐫 🐫 🐫 🐫 🐫 🐫 🐫 🐫 🐫 🐫 |
I'm also a fan of the 🐫 Just today I found myself trying to name an exported function with 🐍 to match its filename, and eslint rapped me across the knuckles. |
🐫s all the way! I've started mapping filenames directly to my default export. I just find it easier to read and work with. |
I vote for the exact naming conventions in the airbnb styleguide: https://github.com/airbnb/javascript#22.6 So:
|
If we're doing camel, I kind of like this in principle, but I can see it becoming a problem on OS's that are loose with case (Windows and most people on Mac, so almost everyone). Renaming that file becomes a pain, requiring you to rename it to something completely different, check in the "remove" to git, then rename it back to the case you actually want... |
@rashidkpc has settled this, we're moving all filenames to snake_case. |
The current styleguide doesn't explicitly define a filename format. A PR to close this issue should include an addition to the styleguide and a cleanup of existing filenames.
Previous debate was over camelCase vs. snake_case
For snake_case:
For camelCase:
The text was updated successfully, but these errors were encountered: