Skip to content

Commit 9c07294

Browse files
committed
Add isRootOnly to moonrepo and yarn plugins
1 parent 84088d8 commit 9c07294

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/knip/src/plugins/moonrepo/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ const enablers = ['@moonrepo/cli'];
1010

1111
const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
1212

13-
const config: string[] = ['moon.yml', '.moon/tasks.yml', '.moon/tasks/*.yml'];
13+
const isRootOnly = true;
14+
15+
const config = ['moon.yml', '.moon/tasks.yml', '.moon/tasks/*.yml'];
1416

1517
const resolveConfig: ResolveConfig<MoonConfiguration> = async (config, options) => {
1618
const tasks = config.tasks ? Object.values(config.tasks) : [];
@@ -27,6 +29,7 @@ export default {
2729
title,
2830
enablers,
2931
isEnabled,
32+
isRootOnly,
3033
config,
3134
resolveConfig,
3235
} satisfies Plugin;

packages/knip/src/plugins/yarn/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ const enablers = 'This plugin is enabled when a `yarn.lock` file is found in the
99

1010
const isEnabled: IsPluginEnabled = async ({ cwd }) => Boolean(await _firstGlob({ cwd, patterns: ['yarn.lock'] }));
1111

12-
const entry: string[] = ['yarn.config.cjs'];
12+
const isRootOnly = true;
13+
14+
const entry = ['yarn.config.cjs'];
1315

1416
export default {
1517
title,
1618
enablers,
1719
isEnabled,
20+
isRootOnly,
1821
entry,
1922
} satisfies Plugin;

0 commit comments

Comments
 (0)