Hey folks!
Today I wanted to talk to you about Frontend Architecture and more specifially how you can enforce folder boundaries with Eslint - a tool we usually think is only for making sure we have correct amount of spaces.
Enjoy!
Problem
When a project grows, it is very easy to introduce unwanted cross module dependencies .
Such dependencies will make it much more difficult in the future to touch certain areas as making changes to one place will eventually affect other places.
In FE, a popular circular dependency is something like following:
components β composables β components
Enter fullscreen mode
Exit fullscreen mode
Solution
One solution could be using Dependency Cruiser from my previous article but you can also utilize an Eslint rule that will warn you about these dependency issues in your IDE while you are writing code.β¦