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

Match multiple tags in nx-enforce-module-boundaries sourceTag #12871

Closed
1 task done
yjaaidi opened this issue Oct 28, 2022 · 6 comments · Fixed by #13817
Closed
1 task done

Match multiple tags in nx-enforce-module-boundaries sourceTag #12871

yjaaidi opened this issue Oct 28, 2022 · 6 comments · Fixed by #13817
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: feature

Comments

@yjaaidi
Copy link
Contributor

yjaaidi commented Oct 28, 2022

Description

Allow rules that match multiple tags sourceTag: ['platform:frontend', 'type:core'].

Motivation

This is useful in order to be more precise when using logic similar to allowedExternalImports. Cf. #12870
E.g.:

{
  sourceTag: 'type:core',
  allowedExternalImports: []
},
{
  sourceTag: ['platform:frontend', 'type:app'],
  allowedExternalImports: ['@angular/*']
},
{
  sourceTag: ['platform:backend', 'type:app'],
  allowedExternalImports: ['@nestjs/*']
}
@meeroslav meeroslav added the scope: linter Issues related to Eslint support in Nx label Oct 28, 2022
@meeroslav
Copy link
Contributor

I would add new property e.g. sourceTagCombo, just to make it clear that those tags are combined, and not used as or.
That would also help to not modify the existing functionality.

Also, sourceTag and sourceTagCombo should be mutually exclusive.

@meeroslav meeroslav self-assigned this Oct 28, 2022
@yjaaidi
Copy link
Contributor Author

yjaaidi commented Oct 28, 2022

Perfect! I love it!
I'll give it a shot and send you a PR as soon as I can.

@blessanm86
Copy link

@yjaaidi will u be able to look into this anytime soon? Or I could give it a try

@meeroslav
Copy link
Contributor

@blessanm86 I'm already working on that. PR should come out soon

@yjaaidi
Copy link
Contributor Author

yjaaidi commented Dec 16, 2022

@blessanm86 I was about to respond to tell you that you can go ahead and here it done 😅

Thx @meeroslav and thx @blessanm86 for suggesting your help

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: linter Issues related to Eslint support in Nx type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants