Skip to content

Warn when a story file contains no exported stories#641

Open
MuhammadTalha57 wants to merge 1 commit into
tajo:mainfrom
MuhammadTalha57:enhancement/warning-on-empty-stories-file
Open

Warn when a story file contains no exported stories#641
MuhammadTalha57 wants to merge 1 commit into
tajo:mainfrom
MuhammadTalha57:enhancement/warning-on-empty-stories-file

Conversation

@MuhammadTalha57

Copy link
Copy Markdown

Summary

This PR adds a warning when Ladle encounters a .stories file that contains no exported stories.

Previously, such files were silently ignored, making it difficult to understand why a story wasn't appearing. With this change, Ladle prints a warning during story parsing so users can quickly identify files that are missing story exports.

Changes

  • Print a warning when a .stories file contains no exported stories.
  • Add a unit test verifying that the warning is emitted.
  • Add a changeset for @ladle/react.

Fixes #579.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show warning when Ladle finds empty stories file

1 participant