personal-site icon indicating copy to clipboard operation
personal-site copied to clipboard

Blog: Use kebab case in package names

Open igeligel opened this issue 6 years ago • 1 comments
trafficstars

Proposed Blog Title

How to name files and directories in JavaScript projects

Title slug*

how-to-name-files-and-directories-in-javascript-projects

Description

Use kebab-case for all package, folder and file names.

Why? 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.

igeligel avatar Aug 06 '19 07:08 igeligel

  • 5 lessons I learned from file names in JavaScript projects
  • Step-by-step guide to file names in JavaScript projects
  • File names in JavaScript projects: It's Not as Difficult as You Think
  • A Beginner's Guide to file names in JavaScript projects (This is my favorite)

igeligel avatar Sep 27 '19 20:09 igeligel