NPM package naming: Moving away from camelCase

Hey everyone,

I just heard that NPM is changing how we name our packages. They don’t want us to use camelCase anymore. This is kinda confusing for me.

Does anyone know why they’re doing this? What should we use instead? Like, should we go with kebab-case or something else?

I’m working on a new project and I want to make sure I follow the right naming rules. Any tips or examples would be super helpful!

Also, has anyone run into issues with old packages that use camelCase? I’m wondering if this change might break stuff.

Thanks for any info you can share!

As someone who’s been working with npm for years, I can tell you this change is actually pretty sensible. Kebab-case isn’t just easier on the eyes, it’s also more practical when you’re typing out package names in the terminal. I’ve had my fair share of typos with camelCase, especially with longer names.

One thing to keep in mind is that this mainly affects new packages. Your existing projects won’t suddenly break because of this. But moving forward, it’s a good habit to adopt kebab-case for new packages you create.

In my recent projects, I’ve started using names like ‘data-processor’ or ‘api-connector’ instead of ‘dataProcessor’ or ‘apiConnector’. It feels more natural, and it’s definitely easier to read in package.json files.

Just remember, consistency is key. If you’re updating an existing project, you might want to stick with its current naming convention to avoid confusion. But for new stuff, kebab all the way!

yo alexj, npm’s move away from camelCase is about making package names easier to read and type. kebab-case is the way to go now. it’s not gonna break old packages, but for new ones, stick to hyphens. like ‘my-awesome-package’ instead of ‘myAwesomePackage’. keeps things consistent across different systems too. no stress about existing stuff tho!

Drawing from my experience using npm, the shift from camelCase to kebab-case is aimed at standardizing naming conventions across packages. Kebab-case provides clearer readability, especially when dealing with lengthy names, and it avoids issues related to differing case sensitivities in operating systems. Although existing camelCase packages will continue to function without mandatory updates, new packages and upgrades should adopt kebab-case. This change promotes uniformity and minimizes potential confusion, so transitioning to kebab-case for your project is a prudent choice.