Skip to content

browserValidity

Enforces that the browser property is valid.

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

This rule checks that the browser property is a non-empty string. The value should be the path to the module used when the package is bundled for browsers.

5<3{d ivclassNa="meec-li">nt< sp ansty="le--0:#7FDBCA;--1:#096E">72"browse53<: 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"browse53: <{}d ivclassNa="meec-li">5<3}d ivclassNa="meco"><}d>
3de6E72"brow3F<53: spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#C789D6;--1:#7C">5686./browse1<111 "divclass="Nameec-">3

If you don’t need compliance with npm’s browser field specification, you can disable this rule. For example, if your package’s browser entry point is interpreted by tooling that accepts a different shape, this rule may not be correct for you.