The Potential Issues of Using CamelCase in File Names for Cross-Platform Compatibility
Khalid1G opened this issue · comments
Using CamelCase in file names can indeed create problems when working with both Windows and Linux operating systems. While Linux is case-sensitive, meaning it treats "file.txt" and "File.txt" as two different files, Windows is case-insensitive by default, considering them the same file. This can lead to confusion and potential issues when transferring files between the two systems or working on projects collaboratively.
For example, if you have a file named "UserModel.js" in a project and refer to it as "userModel.js" in your code or scripts, it may work fine on Linux but fail to locate the file on Windows. This discrepancy in naming conventions can cause errors and make code less portable.
To ensure cross-platform compatibility and avoid such problems, it is generally recommended to use lowercase filenames with words separated by underscores ("user.js"), ("user_model.js") or hyphens ("my-file.txt") instead of CamelCase when developing projects that need to work on both Windows and Linux. This helps maintain consistency and reduces the chances of issues arising due to case sensitivity differences between the two operating systems.
@Khalid1G
@muttaqin1
I want to mention the changing files name or code structure, is a very sensitive thing, when working collaboratively. So give this one a priority
Yes, we can use underscores to seperate words in the file names. I will send a pr soon @Khalid1G
great
@muttaqin1 are you working on this now,
yeah go ahead, im working on testing
@Khalid1G
@muttaqin1 are you working on this now,
yeah
any updates on this ?
@muttaqin1
I am traveling in ship now. Because one of our biggest festival Eid will be on 29th june.So i am going to my sister's home.Its 6.39 PM now. I will send a pr tomorrow before night.Is it okay for you?
@bellaabdelouahab
I am Changing names dont update the codebase please.
@bellaabdelouahab
but the pr isn't merged yet
I cant find this swagger-autogen lib in dev branch package.json.
const swaggerAutogen = require("swagger-autogen")
"dependencies": {
"bcryptjs": "^2.4.3",
"compression": "^1.7.4",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"express-mongo-sanitize": "^2.2.0",
"express-rate-limit": "^6.7.0",
"helmet": "^6.0.1",
"hpp": "^0.2.3",
"http-status-codes": "^2.2.0",
"jest": "^29.5.0",
"jsonwebtoken": "^9.0.0",
"mongoose": "^6.8.4",
"morgan": "^1.10.0",
"supertest": "^6.3.3",
"swagger-ui-express": "^4.6.3",
"validator": "^13.7.0",
"winston": "^3.8.2",
"winston-daily-rotate-file": "^4.7.1",
"xss-clean": "^0.1.1",
"yamljs": "^0.3.0"
},
can you add it, because I tried so many lib that I forgot whish one.
sure
@bellaabdelouahab
hey, any updates
@muttaqin1
yeah sending a pr @bellaabdelouahab