MCPcopy Create free account
hub / github.com/code-pushup/cli / createCategories

Function createCategories

packages/plugin-js-packages/src/lib/binding.ts:155–174  ·  view source on GitHub ↗
({
  packageManager,
  checks,
}: JsPackagesOptions)

Source from the content-addressed store, hash-verified

153}
154
155function createCategories({
156 packageManager,
157 checks,
158}: JsPackagesOptions): CategoryConfig[] {
159 return CATEGORIES.filter(({ check }) => checks.includes(check)).map(
160 ({ check, slug, title, description }) => ({
161 slug,
162 title,
163 description,
164 refs: [
165 {
166 type: 'group',
167 plugin: JS_PACKAGES_PLUGIN_SLUG,
168 slug: `${packageManager}-${check}`,
169 weight: 1,
170 },
171 ],
172 }),
173 );
174}
175
176async function isRecommended(targetDir: string): Promise<boolean> {
177 return fileExists(path.join(targetDir, 'package.json'));

Callers 1

binding.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected