Skip to content

typeValidity

Enforces that the type property is valid.

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

This rule checks that the type property is a string with a value of either commonjs or module.

{
"type": "esm"
}

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

  • typePresence - Enforces that the type property is present.
Made with ❤️‍🔥 around the world by the Flint team and contributors.