DEV Community

Discussion on: You, me and package.json

Collapse
 
victorcazanave profile image
Victor Cazanave • Edited

Nice article! Although I use npm for several years, I still learnt new things :)

Even though it's considered a good practice to use related names if the package belongs to a certain technology (like using react-{something} for React libraries), it's also recommended to not use node or js in the name.

Why using node or js in the name is not recommended?

Collapse
 
xabadu profile image
Fernando Larrañaga

Thanks! Glad to hear it was useful :)

For the most part, it's considered redundant. According to npm and their recommendation, users can infer that it supports JS by being on npm and having a package.json file, and if you need to specify that it's specifically for Node, you can do so by adding an "engine" entry in your package file.

I would also add, though this is purely personal opinion, that adding js and/or node to the name might lead less experienced users to believe that it's an official package.