scriptsNameCasing
Enforce that names for scripts properties are in kebab case.
✅ This rule is included in the package-json stylistic presets.
scripts maps command keys to executable commands.
Users generally expect those command keys to be in kebab-case naming, optionally with : to delineate nested commands.
This rule enforces kebab-case command names, such as my-command, to match common that CLI naming conventions.
Examples
Section titled “Examples”{ "scripts": { "Key": "flint" }}{ "scripts": { "invalidKey": "flint" }}{ "scripts": { "Invalid-Key": "flint" }}{ "scripts": { "key": "flint" }}{ "scripts": { "valid-key": "flint" }}{ "scripts": { "valid:key": "flint" }}When Not To Use It
Section titled “When Not To Use It”If a package intentionally uses script names with another casing style for a non-standard preference, this rule may not be for you.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
package-json/scripts-name-casing
Made with ❤️🔥 around the world by
the Flint team and contributors.