You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our repo is structured into yarn workspaces like this:
applications/app1
applications/app2
common/c1
common/c2
The desired rule is that applications might import from packages common/c1 and common/c2, but never from another application. In other words, in app1 there must never be an import from app2.
Currently we use depencency-cruiser for such advanced checks. Sounds like a good use case for this plugin though.
The text was updated successfully, but these errors were encountered:
assume your application package has an @Application prefix then, using standard eslint rule
"no-restricted-imports": ["error",
{
name: '@applications/*',
message: 'Please don't import from another application. Extract common parts into separate package.'
}
]
And you either can put this into your root .eslintrc.js or create a dedicated in a sub-package folder.
Our repo is structured into yarn workspaces like this:
The desired rule is that applications might import from packages
common/c1
andcommon/c2
, but never from another application. In other words, in app1 there must never be an import from app2.Currently we use depencency-cruiser for such advanced checks. Sounds like a good use case for this plugin though.
The text was updated successfully, but these errors were encountered: