style(projects): format code

This commit is contained in:
Soybean
2023-12-14 21:45:29 +08:00
parent a176dc443e
commit a748166399
127 changed files with 2472 additions and 3006 deletions

View File

@ -1,7 +1,7 @@
import path from 'node:path';
import { readFileSync } from 'node:fs';
import enquirer from 'enquirer';
import { bgRed, red, green } from 'kolorist';
import { bgRed, green, red } from 'kolorist';
import { execCommand } from '../shared';
import type { CliOption } from '../types';

View File

@ -1,3 +1,4 @@
import process from 'node:process';
import { loadConfig } from 'c12';
import type { CliOption } from '../types';

View File

@ -1,7 +1,7 @@
import cac from 'cac';
import { blue, lightGreen } from 'kolorist';
import { version } from '../package.json';
import { cleanup, updatePkg, gitCommit, gitCommitVerify, prettierWrite, execLintStaged } from './commands';
import { cleanup, execLintStaged, gitCommit, gitCommitVerify, prettierWrite, updatePkg } from './commands';
import { loadCliOptions } from './config';
type Command = 'cleanup' | 'update-pkg' | 'git-commit' | 'git-commit-verify' | 'prettier-write' | 'lint-staged';

View File

@ -1,37 +1,33 @@
export interface CliOption {
/**
* the project root directory
*/
/** The project root directory */
cwd: string;
/**
* cleanup dirs
* Cleanup dirs
*
* Glob pattern syntax {@link https://github.com/isaacs/minimatch}
*
* @default
* ```json
* ["** /dist", "** /pnpm-lock.yaml", "** /node_modules", "!node_modules/**"]
* ```
* @description glob pattern syntax {@link https://github.com/isaacs/minimatch}
*/
cleanupDirs: string[];
/**
* git commit types
*/
/** Git commit types */
gitCommitTypes: [string, string][];
/**
* git commit scopes
*/
/** Git commit scopes */
gitCommitScopes: [string, string][];
/**
* npm-check-updates command args
* @default ["--deep","-u"]
* Npm-check-updates command args
*
* @default ['--deep', '-u']
*/
ncuCommandArgs: string[];
/**
* prettier write glob
* @description glob pattern syntax {@link https://github.com/micromatch/micromatch}
* Prettier write glob
*
* Glob pattern syntax {@link https://github.com/micromatch/micromatch}
*/
prettierWriteGlob: string[];
/**
* lint-staged config
*/
/** Lint-staged config */
lintStagedConfig: Record<string, string | string[]>;
}