Skip to content

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.

{
"scripts": {
"Key": "flint"
}
}
{
"scripts": {
"invalidKey": "flint"
}
}
{
"scripts": {
"Invalid-Key": "flint"
}
}

If a package intentionally uses script names with another casing style for a non-standard preference, this rule may not be for you.

Made with ❤️‍🔥 around the world by the Flint team and contributors.