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.

{
"browser": ""
}
{
"browser": {}
}

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.

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