Skip to content

Commit 8bd27ad

Browse files
committed
refactor: simplify aws-cdk plugin by removing unused types and resolveConfig
1 parent 6d06906 commit 8bd27ad

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import type { IsPluginEnabled, Plugin, ResolveConfig } from '../../types/config.js';
2-
import { toDeferResolve } from '../../util/input.js';
1+
import type { IsPluginEnabled, Plugin } from '../../types/config.js';
32
import { hasDependency } from '../../util/plugin.js';
4-
import type { PluginConfig } from './types.js';
53

64
// https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib-readme.html
75

@@ -13,18 +11,17 @@ const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependenc
1311

1412
const config: string[] = ["cdk.json"];
1513

16-
const production: string[] = [];
14+
const production: string[] = [
15+
'{src/,cdk/,}bin/**/*.{js,ts}',
16+
'{src/,cdk/,}lib/**/*.{js,ts}',
17+
];
18+
1719

18-
const resolveConfig: ResolveConfig<PluginConfig> = async config => {
19-
const inputs = config?.plugins ?? [];
20-
return [...inputs].map(toDeferResolve);
21-
};
2220

2321
export default {
2422
title,
2523
enablers,
2624
isEnabled,
2725
config,
2826
production,
29-
resolveConfig,
3027
} satisfies Plugin;

packages/knip/src/plugins/aws-cdk/types.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)