enforce-pure-src
src/ must contain only production code and co-located unit tests.
Storybook, demo, and sandbox content must live outside src/.
What it checks
Any import statement inside a src/-rooted file that resolves to a path
containing storybook, demo, sandbox, or preview.
Why
A library's src/ directory represents the published surface of the package.
Demo and documentation code views the library from the outside — as a
consumer would. Mixing them into src/ creates two problems:
- Accidental inclusion in the bundle. Bundlers can mis-tree-shake demo code into the production output.
- Blurred responsibility. It becomes unclear which code ships and which is only for local development.
Place external-perspective content in a sibling directory (src-docs/,
src-demo/, etc.) and reference the library as an external module there.

