diff --git a/docs/.vitepress/theme/components/markdown/plugins/image.ts b/docs/.vitepress/theme/components/markdown/plugins/image.ts index d4dc120a1..50384c50a 100644 --- a/docs/.vitepress/theme/components/markdown/plugins/image.ts +++ b/docs/.vitepress/theme/components/markdown/plugins/image.ts @@ -8,7 +8,7 @@ import type MarkdownIt from 'markdown-it' * `![Image Example](/img/a.png) ` use lazy attrs * `![Image Example](/img/a.png) ` use lazy attrs. width 200. height 200. * `![Image Example](/img/a.gif) ` use lazy attrs. width 900. height 220. - * @author Zhengqbbb + * @author Zhengqbbb */ export function ImagePlugin(md: MarkdownIt) { const imageRender = md.renderer.rules.image! diff --git a/packages/@cz-git/plugin-inquirer/src/checkbox/index.ts b/packages/@cz-git/plugin-inquirer/src/checkbox/index.ts index 4752ae5ec..1734f001c 100644 --- a/packages/@cz-git/plugin-inquirer/src/checkbox/index.ts +++ b/packages/@cz-git/plugin-inquirer/src/checkbox/index.ts @@ -1,6 +1,6 @@ /** * @description inquirer plugin - Search Checkbox - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @author Zhengqbbb * @license MIT */ diff --git a/packages/@cz-git/plugin-inquirer/src/input/index.ts b/packages/@cz-git/plugin-inquirer/src/input/index.ts index 4abd4bd1f..e3e1017df 100644 --- a/packages/@cz-git/plugin-inquirer/src/input/index.ts +++ b/packages/@cz-git/plugin-inquirer/src/input/index.ts @@ -1,6 +1,6 @@ /** - * @description inquirer plugin - Search Checkbox - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @description inquirer plugin - Support completion of input + * @author Zhengqbbb * @license MIT */ diff --git a/packages/@cz-git/plugin-inquirer/src/list/index.ts b/packages/@cz-git/plugin-inquirer/src/list/index.ts index c8eb16a2e..24997942e 100644 --- a/packages/@cz-git/plugin-inquirer/src/list/index.ts +++ b/packages/@cz-git/plugin-inquirer/src/list/index.ts @@ -1,6 +1,6 @@ /** * @description inquirer plugin - Search List - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @author Zhengqbbb * @license MIT * Powered by `inquirer-autocomplete-prompt` */ diff --git a/packages/@cz-git/plugin-inquirer/src/shared/utils/fuzzy.ts b/packages/@cz-git/plugin-inquirer/src/shared/utils/fuzzy.ts index f13d11002..4341d24e4 100644 --- a/packages/@cz-git/plugin-inquirer/src/shared/utils/fuzzy.ts +++ b/packages/@cz-git/plugin-inquirer/src/shared/utils/fuzzy.ts @@ -1,13 +1,14 @@ /** - * @description provide list and checkBox fuzzy search - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @description Provide list and checkBox fuzzy search + * @author Zhengqbbb * @license MIT */ import type { FilterArrayItemType } from '../types' /** - * @description inputString match targetString return match score + * input string match target string return match score + * * @param {string} input input string * @param {string} target target string * @param {boolean} caseSensitive isCaseSensitive, default: false @@ -50,7 +51,8 @@ export function fuzzyMatch( } /** - * @description Array fuzzy filter + * Array fuzzy filter + * * @param {string} input input string * @param {Array} arr target Array * @return {Array} filtered array diff --git a/packages/@cz-git/plugin-inquirer/src/shared/utils/style.ts b/packages/@cz-git/plugin-inquirer/src/shared/utils/style.ts index 93e783c1c..c6297f4e0 100644 --- a/packages/@cz-git/plugin-inquirer/src/shared/utils/style.ts +++ b/packages/@cz-git/plugin-inquirer/src/shared/utils/style.ts @@ -1,7 +1,7 @@ /** * Terminal style output colorizen - * Inspired by picocolors(https://www.npmjs.com/package/picocolors) - * @author: @Zhengqbbb (zhengqbbb@gmail.com) + * Inspired by `picocolors` (https://www.npmjs.com/package/picocolors) + * @author Zhengqbbb * @license MIT */ diff --git a/packages/@cz-git/plugin-loader/src/index.ts b/packages/@cz-git/plugin-loader/src/index.ts index a4b6c3ce5..c4576056a 100644 --- a/packages/@cz-git/plugin-loader/src/index.ts +++ b/packages/@cz-git/plugin-loader/src/index.ts @@ -1,3 +1,9 @@ +/** + * @description Commitizen and Commitlint config loader (Main: `configLoader`) + * @author Zhengqbbb + * @license MIT + */ + import '@commitlint/types' import path from 'node:path' import os from 'node:os' diff --git a/packages/cz-git/src/generator/message.ts b/packages/cz-git/src/generator/message.ts index ba4d81d8a..4db3987ea 100644 --- a/packages/cz-git/src/generator/message.ts +++ b/packages/cz-git/src/generator/message.ts @@ -1,6 +1,6 @@ /** - * @description generate commit message `generateMessage` - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @description (Main: `generateMessage`) - Generate commit message + * @author Zhengqbbb * @license MIT */ diff --git a/packages/cz-git/src/generator/option.ts b/packages/cz-git/src/generator/option.ts index 5b670f6b4..18047431f 100644 --- a/packages/cz-git/src/generator/option.ts +++ b/packages/cz-git/src/generator/option.ts @@ -1,6 +1,6 @@ /** - * @description generate commitizen config option(generateOptions) - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @description (Main: `generateOptions`) - Generate commitizen config option + * @author Zhengqbbb * @license MIT */ diff --git a/packages/cz-git/src/generator/question.ts b/packages/cz-git/src/generator/question.ts index d8ad2e878..1f0d3425e 100644 --- a/packages/cz-git/src/generator/question.ts +++ b/packages/cz-git/src/generator/question.ts @@ -1,5 +1,5 @@ /** - * @description generate commitizen questions(generateQuestions) + * @description (Main: `generateQuestions`) - Generate commitizen questions * @author @Zhengqbbb (zhengqbbb@gmail.com) * @license MIT */ @@ -227,6 +227,7 @@ export function generateQuestions(options: CommitizenGitOptions, cz: any) { completeValue: options.defaultBody || undefined, when: (answers: Answers) => { const answerType = getAnswersType(options, answers) + if ( options.allowBreakingChanges && answerType @@ -234,7 +235,6 @@ export function generateQuestions(options: CommitizenGitOptions, cz: any) { ) { return true } - else { return answers.markBreaking || Boolean(process.env.break === '1') || false } @@ -286,10 +286,9 @@ export function generateQuestions(options: CommitizenGitOptions, cz: any) { transformer: (input: string) => useThemeCode(input, options.themeColorCode), }, ].filter( - i => - !options.skipQuestions?.includes( - i.name as 'scope' | 'body' | 'breaking' | 'footer' | 'footerPrefix' | 'confirmCommit', - ), + i => !options.skipQuestions?.includes( + i.name as 'scope' | 'body' | 'breaking' | 'footer' | 'footerPrefix' | 'confirmCommit', + ), ) } diff --git a/packages/cz-git/src/generator/questionAI.ts b/packages/cz-git/src/generator/questionAI.ts index 268cde1f2..45e30b1ff 100644 --- a/packages/cz-git/src/generator/questionAI.ts +++ b/packages/cz-git/src/generator/questionAI.ts @@ -1,6 +1,6 @@ /** - * @description generate commitizen questions(generateQuestions) - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @description (Main: `generateAIPrompt`) - Generate AI returns a single or multiple messages in the Terminal display + * @author Zhengqbbb * @license MIT */ diff --git a/packages/cz-git/src/index.ts b/packages/cz-git/src/index.ts index 6ceda2ce9..73bec4370 100644 --- a/packages/cz-git/src/index.ts +++ b/packages/cz-git/src/index.ts @@ -1,8 +1,7 @@ /** * @description customizable and git support commitizen adapter - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @author Zhengqbbb * @license MIT - * @copyright Copyright (c) 2022-present Qiubin Zheng */ import process from 'node:process' diff --git a/packages/cz-git/src/shared/types/options.ts b/packages/cz-git/src/shared/types/options.ts index 84181801e..5e39d5113 100644 --- a/packages/cz-git/src/shared/types/options.ts +++ b/packages/cz-git/src/shared/types/options.ts @@ -1,9 +1,9 @@ /** * @description cz-git types - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @author Zhengqbbb * @license MIT - * @copyright Copyright (c) 2022-present Qiubin Zheng */ + import type { QuestionsType } from '../../generator' import type { CommitlintUserConfig } from './commitlint' diff --git a/packages/cz-git/src/shared/utils/util.ts b/packages/cz-git/src/shared/utils/util.ts index cc523c8be..e1a8a2f79 100644 --- a/packages/cz-git/src/shared/utils/util.ts +++ b/packages/cz-git/src/shared/utils/util.ts @@ -1,6 +1,6 @@ /** - * @description provide until function - * @author @Zhengqbbb (zhengqbbb@gmail.com) + * @description Provide until function + * @author Zhengqbbb * @license MIT */