Filenames with different UpperCamelCase are unsafe in case-insensitive filesystems
See original GitHub issueUsing upper-camel-case for filenames, or any sort of case that involves different letter casing, is dangerous when your team includes developers committing code from case insensitive filesystems (mostly people with windows and NTFS, and OSX and case insensitive HFS+).
It’s a problem specifically when a developer in a case insensitive filesystem renames a folder in a way that just changes the folder’s case, and pushes it. Because github (and probably all git hosts) run on linux, you’ll get an inconsistency there that you will not observe in an inconsistent file system.
For instance if you had Button/Button.jsx
and Button/style.css
, and you rename the button folder and file to button/button.jsx
, in the remote git repository you would end up with two folders, button/button.jsx
and Button/style.css
. Nothing would be different in your local filesystem.
I understand if you strictly follow the conventions and never ever change a folder case you will be fine, but it’s easy to overlook if someone does it.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:4
- Comments:11
Top GitHub Comments
It’s a good thought but at Airbnb we follow PascalCaseNaming practices. You’re welcome to fork our guide though and add your own rules 😃
I literally faced this issue. One of my file name was “LiveUnassignedOrdersListItem.js”. It was working on my local system (OSX), but when I tried to put the build on cloud server the build was failing. These are such bugs you can’t debug easily.