Skip to content

fundingValidity

Enforces that the funding property is valid.

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

This rule checks that the funding property is a URL string, a funding object, or an array of URL strings and funding objects. Funding objects should have non-empty type and url properties.

5<3{d ivclassNa="meec-li">nt< sp ansty="le--0:#7FDBCA;--1:#096E">72"fundin53<: sp ansty="le--0:#D9F5DD;--1:#1111">1<1"sp ansty="le--0:#C789D6;--1:#7C56">86not-a-u1<1"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"fundin53:< {d ivclassNa="meec-li">nt < sp ansty="le--0:#7FDBCA;--1:#096E">72"typ53<: sp ansty="le--0:#D9F5DD;--1:#1111">1<1"sp ansty="le--0:#C789D6;--1:#7C56">86individu1<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"fund3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686https://example.com/do1<111 "divclass="Nameec-">3<}di vdivclass="Nameexpressive-">3de6E72"fund3F5<3: {divclass="Nameec-">dent< spans="tyle--0:#7FDBCA;--1:#09">6E72"t3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686indivi1<111" spans="tyle--0:#D6DEEB;--1:#40">3dent< spans="tyle--0:#7FDBCA;--1:#09">6E72"3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686https://example.com/do1<111 "divclass="Nameec-">3F<53 spans="tyle--0:#D6DEEB;--1:#40">33< }><}di vdivclass="Nameexpressive-">3de6E72"fund3F5<3: [divclass="Nameec-">dent< spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686https://example.com/do1<111" spans="tyle--0:#D6DEEB;--1:#40">33F53< spans="tyle--0:#D6DEEB;--1:#40">3dent < spans="tyle--0:#7FDBCA;--1:#09">6E72"t3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686pat1<111" spans="tyle--0:#D6DEEB;--1:#40">3dent < spans="tyle--0:#7FDBCA;--1:#09">6E72"3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686https://example.com/pat1<111 "divclass="Nameec-">3F53< spans="tyle--0:#D6DEEB;--1:#40">33F<53 spans="tyle--0:#D6DEEB;--1:#40">33< ]>

If you don’t need compliance with npm’s funding field specification, you can disable this rule. For example, if your package registry accepts a different funding metadata shape, this rule may not be correct for you.