Skip to content

fix: NRP-2803 circular dependencies#114

Merged
stavros-tomas merged 7 commits intomainfrom
NRP-2803-fix-circular-dependencies
Feb 17, 2026
Merged

fix: NRP-2803 circular dependencies#114
stavros-tomas merged 7 commits intomainfrom
NRP-2803-fix-circular-dependencies

Conversation

@stavros-tomas
Copy link
Copy Markdown
Collaborator

@stavros-tomas stavros-tomas commented Feb 12, 2026

In this PR

  • I am fixing multiple circular dependency warnings we are getting when building QUUI
  • Introducing ESLint to not allow further cyclical dependencies. We can include further rules later on.
  • Introducing Husky to run a lint pre-commit check

Further notes

Even though JavaScript can handle cyclical dependencies relatively well, this does not mean we should ignore them, as they can lead to unexpected errors (which is why we were seeing multiple warnings about them).

Since this is a UI library, as a general rule, internal components should import other internal components directly.
Our barrel file (src/index.js) should be used only by external consumers.

It might be easier to review this PR commit by commit

ideally index.ts files should be plain barrel exports
barrel imports should not be used internally by the library
Basic ESLint config to check for cycle dependencies, we can expand later as required
@stavros-tomas stavros-tomas marked this pull request as ready for review February 16, 2026 18:26
Copy link
Copy Markdown
Collaborator

@aidanCQ aidanCQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏🏻 Thank you. I'm glad you left the stories src/... imports intact.

@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.7.0-NRP-2803-fix-circular-dependencies.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@stavros-tomas
Copy link
Copy Markdown
Collaborator Author

Stories is outside the src folder no issue there. The problem is when src folder consumes src folder.

@stavros-tomas stavros-tomas merged commit 7cae621 into main Feb 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants