What naming convention do I use for scripts in package.json?
Please always use kebab case. The colon is a throwback to gulp, and it looks terrible. I hate it.
Disclaimer: My opinions are often wrong.
There is no official naming convention. Before npm@v4 standard scripts had only one word, for example test
, start
, prestart
. npm@v4 introduced a new script prepublishOnly
*.
So now, the best practice is use lowerCamelCase.
*Reference: https://iamakulov.com/notes/npm-4-prepublish/