In package.json
I have this script name with two words lint
and fix
. How should I make a right name?
There are options:
lintFix
LintFix
lint_fix
lint-fix
lint:fix
What option is right? And why?
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/