Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Boundaries #248

Open
LavanyaBurlagadda opened this issue Nov 23, 2022 · 0 comments
Open

Module Boundaries #248

LavanyaBurlagadda opened this issue Nov 23, 2022 · 0 comments

Comments

@LavanyaBurlagadda
Copy link

Currently, I am doing a POC with NX along with module boundaries. all the projects are react projects

When I am doing I have a use case that no imports should happen between projects. How can we stop developers from importing those files?

In the root .eslintrc.json file I gave the below code, here main is able to load files even from other libs which I haven't listed. It is not showing any errors

 "@nrwl/nx/enforce-module-boundaries": [
          "error",
          {
            "enforceBuildableLibDependency": true,
            "allow": [],
            "depConstraints": [
              {
                "sourceTag": "scope:main",
                "onlyDependOnLibsWithTags": ["scope:shared-data-access"]
              },
              {
                "sourceTag": "scope:discussions",
                "onlyDependOnLibsWithTags": ["scope:shared-data-access"]
              },
              {
                "sourceTag": "scope:sub-app-mf",
                "onlyDependOnLibsWithTags": ["scope:shared-data-access"]
              },
              {
                "sourceTag": "scope:shared-data-access",
                "onlyDependOnLibsWithTags": ["scope:shared-data-access"]
              }
            ]
          }]

Is there an example referring to all the above cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant