Skip to content

modulePresence

Enforces that the module property is present.

✅ This rule is included in the package-json preset.

This rule requires the module field in package.json to be present.

{}
{
"name": "my-repository"
}

Whether the property should still be required when the package’s private property is true. Defaults to false.

This option can be useful if the rule is enabled on many package.json files and some files differ in privacy.

If your package does not publish a separate ES module entry point, you can disable this rule. For example, a package that uses exports for all entry points may not need a module field.

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