question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
yjaaidicommented, Oct 28, 2022

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

1reaction
meeroslavcommented, Oct 28, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found