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.

5<3{d ivclassNa="meec-li">nt< sp ansty="le--0:#7FDBCA;--1:#096E">72"script53:< {d ivclassNa="meec-li">nt < sp ansty="le--0:#7FDBCA;--1:#096E">72"Ke53<: sp ansty="le--0:#D9F5DD;--1:#1111">1<1"sp ansty="le--0:#C789D6;--1:#7C56">86fli1<1"d ivclassNa="meec-li">53< sp ansty="le--0:#D6DEEB;--1:#403F">5<3}d ivclassNa="meec-li">5<3}d ivclassNa="meco"><}d>5<3{d ivclassNa="meec-li">nt< sp ansty="le--0:#7FDBCA;--1:#096E">72"script53:< {d ivclassNa="meec-li">nt < sp ansty="le--0:#7FDBCA;--1:#096E">72"invalidKe53<: sp ansty="le--0:#D9F5DD;--1:#1111">1<1"sp ansty="le--0:#C789D6;--1:#7C56">86fli1<1"d ivclassNa="meec-li">53< sp ansty="le--0:#D6DEEB;--1:#403F">5<3}d ivclassNa="meec-li">5<3}d ivclassNa="meco"><}d>5<3{d ivclassNa="meec-li">nt< sp ansty="le--0:#7FDBCA;--1:#096E">72"script53:< {d ivclassNa="meec-li">nt < sp ansty="le--0:#7FDBCA;--1:#096E">72"Invalid-Ke53<: sp ansty="le--0:#D9F5DD;--1:#1111">1<1"sp ansty="le--0:#C789D6;--1:#7C56">86fli1<1"d ivclassNa="meec-li">53< sp ansty="le--0:#D6DEEB;--1:#403F">5<3}d ivclassNa="meec-li">5<3}d ivclassNa="meco"><}d>
3de6E72"scri3F5<3: {divclass="Nameec-">dent< spans="tyle--0:#7FDBCA;--1:#09">6E72"3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686f1<111 "divclass="Nameec-">3F<53 spans="tyle--0:#D6DEEB;--1:#40">33< }><}di vdivclass="Nameexpressive-">3de6E72"scri3F5<3: {divclass="Nameec-">dent< spans="tyle--0:#7FDBCA;--1:#09">6E72"valid-3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686f1<111 "divclass="Nameec-">3F<53 spans="tyle--0:#D6DEEB;--1:#40">33< }><}di vdivclass="Nameexpressive-">3de6E72"scri3F5<3: {divclass="Nameec-">dent< spans="tyle--0:#7FDBCA;--1:#09">6E72"valid:3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686f1<111 "divclass="Nameec-">3F<53 spans="tyle--0:#D6DEEB;--1:#40">33< }>

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