-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
yarn.config.cjs
support
#864
Conversation
cwd, | ||
}); | ||
|
||
assert(issues.files.size === 0); |
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.
Just saying, baseCounters
contains files: 0
which is essentially the same assertion (no need to change though).
|
||
// https://yarnpkg.com/features/constraints | ||
|
||
const title = 'yarn'; |
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.
The only nitpick I have is that Yarn seems to be the official spelling (title cased).
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.
fixed on 40bc99b
commit: |
|
||
const enablers = 'This plugin is enabled when a `yarn.lock` file is found in the root folder.'; | ||
|
||
const isEnabled: IsPluginEnabled = async ({ cwd }) => (await _glob({ cwd, patterns: ['yarn.lock'] })).length > 0; |
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.
There's _firstGlob
for this, any chance we could use that? Example: https://github.com/webpro-nl/knip/blob/main/packages/knip/src/plugins/github-actions/index.ts#L13-L14 (probably should move into a nice helper but we could consider this in another PR)
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.
Great! I've changed it 0b8a898
Thanks, Jeong! |
🚀 This pull request is included in v5.39.0. See Release 5.39.0 for release notes. Using Knip in a commercial project? Please consider becoming a sponsor. |
Close #597