What are the naming conventions for files and folders in a large Node.js project?
Should I capitalize, camelCase, or under-score?
Ie. is this considered vali
Use kebab-case
for all package, folder and file names.
You should imagine that any folder or file might be extracted to its own package some day. Packages cannot contain uppercase letters.
New packages must not have uppercase letters in the name. https://docs.npmjs.com/files/package.json#name
Therefore, camelCase
should never be used. This leaves snake_case
and kebab-case
.
kebab-case
is by far the most common convention today. The only use of underscores is for internal node packages, and this is simply a convention from the early days.