Skip to content

exportsValidity

Enforces that the exports property is valid.

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

The rule checks that, if present, the exports property is a string or object. If it’s a string, it should be a path to an entry point. If it’s an export condition object, its properties should have values that are either a path to an entry point, or another exports condition object.

{
"exports": {
"import": true
}
}

If you don’t need compliance with npm’s exports 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.

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