Match multiple tags in nx-enforce-module-boundaries sourceTag
See original GitHub issue- I’d be willing to implement this feature (contributing guide)
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/*']
}
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
nx-enforce-module-boundaries for source project with multiple ...
Prerequisites I have a workspace that contains some projects with multiple tags likes below nx.json file { "booking-api": { "tags": ...
Read more >Tag in Multiple Dimensions - Nx
It's always good to draw a diagram and carefully plan the boundaries. Matching multiple source tags. Matching just a single source tag is...
Read more >How to deal with the TSLint error "A project without tags ...
A project without tags cannot depend on any libraries ... By default, the nx-enforce-module-boundaries TSLint rule in nx.json comes with the ...
Read more >Taming Code Organization with Module Boundaries in Nx
Using tags to enforce boundaries ... Our repository consists of two applications — Store and Admin. Each of them is composed of several...
Read more >Taming Code Organization with Module Boundaries in Nx
Zack DeRose is joined by Nrwlian Miroslav Jonas to talk about Taming Code Organization with Module Boundaries in Nx.Submit questions ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Perfect! I love it! I’ll give it a shot and send you a PR as soon as I can.
I would add new property e.g.
sourceTagCombo, just to make it clear that those tags are combined, and not used asor. That would also help to not modify the existing functionality.Also,
sourceTagandsourceTagComboshould be mutually exclusive.