Are circular dependencies an issue, or should I just ignore my linting rules? #1183
Unanswered
kevin-mitchell
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My linting rules are complaining about
import/no-cycle
,Dependency cycle detected.
This is in a situation where I have two separate files / classes, e.g.
and on the other side
Functionally this works OK, there are no issues or errors and all is well. I guess, maybe (???) this is because there isn't actually a real circular dependency because the decorator isn't something that fires on import or something?
Either way, the linter isn't pleased with this and I'm wondering if the best way forward is simply disabling the linter for these files, or if there is an alternative method of doing things here?
I should point out / add the other decorators are from TypeORM, FWIW.
Thanks for any thoughts!
Beta Was this translation helpful? Give feedback.
All reactions