subscriber-config-export-required - ESLint plugin rules
This rule requires subscriber files to export a config object with at least an event property.
Severity#
error. This rule is enabled in the recommended preset.
What it Targets#
This rule targets files in your project's src/subscribers directory. It reports a subscriber file that's missing the named config export, or whose config object doesn't declare an event property.
The following code is reported by the rule:
Instead, export a config object with an event property:
Why it's Important#
The export tells Medusa which event(s) the subscriber listens to. Without an property, Medusa can't register the subscriber for any event.
Learn more in the Subscribers documentation.
Fixable#
This rule isn't auto-fixable.
Was this page helpful?