Skip to content

nameValidity

Enforces that the name property is valid.

✅ This rule is included in the package-json logical presets.

This rule ensures that the name field is a string matching the npm specification:

5<3{d ivclassNa="meec-li">nt< sp ansty="le--0:#7FDBCA;--1:#096E">72"nam53<: sp ansty="le--0:#D9F5DD;--1:#1111">11<""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"nam53<: sp ansty="le--0:#FF6A83;--1:#A248">48nu5<3}d ivclassNa="meco"><}d>5<3{d ivclassNa="meec-li">nt< sp ansty="le--0:#7FDBCA;--1:#096E">72"nam53<: sp ansty="le--0:#D9F5DD;--1:#1111">1<1"sp ansty="le--0:#C789D6;--1:#7C56">86Invalid Na1<1"d ivclassNa="meec-li">5<3}d ivclassNa="meco"><}d>
3de6E72"n3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686my-reposi1<111 "divclass="Nameec-">3<}di vdivclass="Nameexpressive-">3de6E72"n3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686@scoped/my-reposi1<111 "divclass="Nameec-">3

If you don’t need compliance with npm’s name field specification, you can disable this rule. For example, if you use a different package manager that treats the field differently, this rule may not be correct for you.

  • namePresence - Enforces that the name property is present.