-
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
feat(linter): allow globs in onlyDependOnLibsWithTags eslint-plugin configuration option #17530
feat(linter): allow globs in onlyDependOnLibsWithTags eslint-plugin configuration option #17530
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit e297d72. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
// if the tag is a glob, check if the project matches the glob prefix | ||
if (tag.endsWith('*')) { | ||
const prefix = tag.substring(0, tag.length - 1); | ||
return (proj.data.tags || []).some((t) => t.startsWith(prefix)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is a pretty naïve implementation of glob support, but since this option already supports regex I figured it didn't really need to be ultra robust. Happy to revisit if desired
…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
6103878
to
e297d72
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
onlyDependOnLibsWithTags
does not handle glob patterns in the tags list. However, several other options for theeslint-plugin
do support glob patterns.Expected Behavior
Update
onlyDependOnLibsWithTags
to handle glob patterns in tag lists. This allows a tagged package to depend on any packages matching the glob, rather than only specific tags.Note: this behavior was already available, via Regex support. However, the ability to use regular expressions in the tag list was undocumented. This PR adds documentation for the new glob pattern as well as the existing regex pattern.
Related Issue(s)
Fixes #15264
Questions to maintainers
pnpm i
and it added 10k+ files to a.pnpm-store
directory. Should this directory be added to.gitignore
? This didn't happen when I ranpnpm install
outside of the devcontainer, so I'm not clear where the discrepancy comes from