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

Relationships rule #93

Open
javierbrea opened this issue Feb 22, 2021 · 1 comment
Open

Relationships rule #93

javierbrea opened this issue Feb 22, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@javierbrea
Copy link
Owner

It is desirable to add a new rule allowing to define allowed relationships for different elements.

The configuration for the rule could be like:

{
  "rules": {
    "boundaries/relationships": [2, {
      "default": "allow",
      "rules": [
        {
          "from": ["helpers"],
          "disallow": ["child", "parent"]
        },
        {
          "from": ["components"],
          "disallow": ["uncle"]
        }
      ]
    }]
  }
}
@javierbrea javierbrea added this to To do in Open source issues via automation Feb 22, 2021
@javierbrea javierbrea added the enhancement New feature or request label Mar 4, 2021
@javierbrea
Copy link
Owner Author

javierbrea commented Feb 1, 2022

This proposed rule may have conflicts with the no-private one, because child elements, for example, would be considered private elements. See #198 for further info.

Maybe it could be implemented as advanced configuration of the no-private rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant