yarn.config.cjs support#864
Conversation
| cwd, | ||
| }); | ||
|
|
||
| assert(issues.files.size === 0); |
There was a problem hiding this comment.
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.
The only nitpick I have is that Yarn seems to be the official spelling (title cased).
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.
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)
|
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