Best Way to Nodejs Project 📚
Naming Conventions
-
Folders (Directors) names
(this-is-kebab-case)- lowercase and separate words by
(-) - should contain an
indextoexportall files from it - Should contain letters only
- lowercase and separate words by
-
Files names
(this-is-kebab-case)- lowercase and separate words by
(-) - if the file contains a single function make its name the function name
- if the file contains class make the file name as class name
- Should contain letters only
- lowercase and separate words by
-
Constant names
(THIS_IS_SNAKE_CASE)- Should be all upper case and separate words by
( _ ) - Should contain letters only
- Should be all upper case and separate words by
-
Variables names
(camelCase)- Should be camelCase
- Should contain letters only
-
Methods (Functions) names
(camelCase)- Should be camelCase
- should begin with a verb
- should contain letters only
-
Classes names
(PascalCase)- Should as in
PascalCasestart with an uppercase letter with every word likeUserClass - Should be a noun
- Should contain letters only
- Should as in