module-name-snake-case - ESLint plugin rules
This rule requires that the name passed to Module(name, ...) contains only alphanumeric characters and underscores.
Severity#
error. This rule is enabled in the recommended preset.
What it Targets#
This rule targets module definition files (index.ts) in your project's src/modules directory. It reports the name passed to Module(name, ...) when it contains characters other than letters, digits, and underscores.
The following code is reported by the rule:
Instead, use a name with only alphanumeric characters and underscores:
Why it's Important#
The module name is used as a registration key in the Medusa container. A name with dashes, spaces, or special characters can break resolution and lead to runtime errors.
Learn more in the Modules documentation.
Fixable#
This rule isn't auto-fixable.
Was this page helpful?