-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
jsdocs-pluginJSDocs pluginJSDocs plugin🤓 UXUX improvement for CLI usersUX improvement for CLI users🧩 create-cli
Description
User story
Our setup wizard should be able to configure a basic working version of each of our official plugins. Each plugin may prompt for its own specific configuration options and infer smart defaults from the user's repo. The resulting configuration code adds the plugin to the user's config and sets up some basic categories.
This issue is about @code-pushup/jsdocs-plugin specifically.
Output example
import jsDocsPlugin from '@code-pushup/jsdocs-plugin';
import type { CoreConfig } from '@code-pushup/models';
const config: CoreConfig = {
plugins: [
jsDocsPlugin([
'packages/*/src/**/*.ts',
'!**/node_modules',
'!**/*.test.ts',
]),
],
categories: [
{
slug: 'docs',
title: 'Documentation',
description: 'Measures how much of your code is **documented**.',
refs: [
{
type: 'group',
plugin: 'jsdocs',
slug: 'documentation-coverage',
weight: 1,
},
],
},
],
};
export default config;Acceptance criteria
- The JSDocs plugin is unselected by default.
- The user is prompted (or provides a CLI argument) for a list of patterns, representing source code that should have documentation annotations.
- The default patterns are
['src/**/*.ts', 'src/**/*.js', '!**/node_modules'].
- The default patterns are
- The user should confirm (via prompt or CLI argument) if they want to also generate basic categories.
- The default answer is yes (create the categories).
- If confirmed, 1 category is created - Documentation (from
documentation-coveragegroup). - If denied, no categories are created.
- All of the above logic lives in
@code-pushup/jsdocs-plugin. The core of the setup wizard in@code-pushup/create-cliorchestrates plugin selection and generation, but doesn't know any specifics about individual plugins.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
jsdocs-pluginJSDocs pluginJSDocs plugin🤓 UXUX improvement for CLI usersUX improvement for CLI users🧩 create-cli