circular dependencies #772
Replies: 3 comments
-
What do you recommend? |
Beta Was this translation helpful? Give feedback.
-
depends on the situation. If you want to add more features to the template in a near future. Or if others using this template are reading this thread, I recommend to:
This way there should be no additional circular dependency added. That's what I'm gonna do. I'm still on eslint 8, I do not know yet how to configure this rule on eslint 9. I haven't switched yet, I'm waiting for more plugins to be available. When my mvp will finally go to production, I will address these issues and will be happy to open a PR. But I still have a long way to go. It's low priority on my backlog In the mid time if someone picks up the task, the solution to a circular dependency between 2 files is usually to create a 3rd one, with in it the function that these files both use |
Beta Was this translation helpful? Give feedback.
-
ESM has intentional support for these types of circular dependencies so I think it's probably fine to just ignore. |
Beta Was this translation helpful? Give feedback.
-
I don't know if that's so much an issue but I noticed circular dependencies while trying to apply the import/no-cycle eslint rule
app/utils/connections.server.ts:
app/utils/providers/github.server.ts
app/routes/_auth+/verify.server.ts
app/routes/settings+/profile.change-email.tsx
app/routes/_auth+/verify.server.ts
app/routes/_auth+/verify.tsx
app/routes/_auth+/verify.server.ts
app/routes/_auth+/login.server.ts
the full log
line numbers could be a bit off
Beta Was this translation helpful? Give feedback.
All reactions