Skip to content

Conversation

@jwoo0122
Copy link
Contributor

Close #597

@jwoo0122 jwoo0122 changed the title Yarn config cjs support yarn.config.cjs support Nov 30, 2024
cwd,
});

assert(issues.files.size === 0);
Copy link
Member

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';
Copy link
Member

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed on 40bc99b

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 2, 2024

Open in Stackblitz

npm i https://pkg.pr.new/knip@864

commit: 0b8a898


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;
Copy link
Member

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)

Copy link
Contributor Author

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

@webpro webpro merged commit 759503d into webpro-nl:main Dec 2, 2024
23 checks passed
@webpro
Copy link
Member

webpro commented Dec 2, 2024

Thanks, Jeong!

@webpro
Copy link
Member

webpro commented Dec 2, 2024

🚀 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect yarn.config.cjs

2 participants