moduleValidity
Enforces that the
moduleproperty is valid.
✅ This rule is included in the package-json logical presets.
This rule checks that the module property is a non-empty string.
The value should be the path to the package’s module entry point.
Examples
Section titled “Examples”{ "module": ""}{ "module": []}{ "module": "./index.js"}{ "module": "index.js"}When Not To Use It
Section titled “When Not To Use It”If you don’t need compliance with this package’s module field expectations, you can disable this rule.
For example, if your package uses exports instead of module, this rule may not be useful for you.
Related Rules
Section titled “Related Rules”- modulePresence - Enforces that the
moduleproperty is present.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
package-json/valid-module
Made with ❤️🔥 around the world by
the Flint team and contributors.