-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add globbing to ES Lint onlyDependOnLibsWithTags
#15264
Comments
TIL "picayune" is a word 😄 I'm going to try to implement this, not because I have any attachment to this particular issue, but because Nx is an amazing project and I'd love to help close out a community issue. I believe the fix should be straight forward, it looks like the relevant code is in the In the meantime, @kschaefe , if I'm reading the source code correctly, you might be able to achieve your goal right now by using a string that looks like a regex, e.g.
or even just
It seems like this could be better explained in the docs so I'll try to update that while implementing non-regex glob support. If the Nx team has any opinions on how/where I document this, I'm all ears, otherwise I'll take a stab somewhere that feels reasonable. |
…onfiguration option add support for globs (in addition to existing string, regex, and * options) to the onlyDependOnLibsWithTags configuration option for the eslint-plugin closed nrwl#15264
…onfiguration option add support for globs (in addition to existing string, regex, and * options) to the onlyDependOnLibsWithTags configuration option for the eslint-plugin closed nrwl#15264
…onfiguration option add support for globs (in addition to existing string, regex, and * options) to the onlyDependOnLibsWithTags configuration option for the eslint-plugin closed nrwl#15264
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. |
Description
Currently, only special-case
*
globbing exists foronlyDependOnLibsWithTags
. Add the ability to use*
to pattern match with partial strings.Note: I filed this as a request instead of a bug because this feature does not exist, but the current Nx implementation feels like a miss. See all of these places that support globbing.
allow
globs, cf. https://nx.dev/recipes/other/tags-allow-list#tags-allow-list.sourceTag
globs. I did not find that in the docs, but it seems to work, when testing locally.onlyDependOnLibsWithTags
currently supports*
as a special case, cf. https://nx.dev/core-features/enforce-project-boundaries#enforce-project-boundariesbannedExternalImports
globs, cf. https://nx.dev/recipes/other/ban-external-imports#ban-external-importsIf you decide not to implement this, I'd recommend making the documentation more clear that
onlyDependOnLibsWithTags
doesn't support any globbing other than the special case. My assumption was that it would because everything else globs and you note*
special case in the docs.Motivation
We have a few tag types. They're perhaps overly picayune, but we're using them to help developers focus in on making more, smaller libraries. As such we're using a two part tag
main:specifier
, such asutil:types
for a shared, types-only library orutil:data-access
. Given our wide usage of this pattern we want to be able to setonlyDependOnLibsWithTags
toutil:*
for things like features or apps. As we add moremain:new-specifier
libraries, we don't want to have to update the ES Lint tag rules.Splitting the
main
andspecifier
portions into independent tags creates the same problem. As we add new things (new specifiers), we still have to go update our ES Lint rules.The text was updated successfully, but these errors were encountered: