Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 572 Bytes

File metadata and controls

28 lines (19 loc) · 572 Bytes

valid-type

💼 This rule is enabled in the following configs: ✔️ legacy-recommended, ✅ recommended, 📦 recommended-publishable.

This rule does the following checks on the value of the type property:

  • It must be a string
  • The value must be either commonjs or module

Example of incorrect code for this rule:

{
	"type": "esm"
}

Example of correct code for this rule:

{
	"type": "module"
}

See also: Node Documentation