mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
style(projects): format code
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const path = require('path');
|
||||
const path = require('node:path');
|
||||
const jiti = require('jiti')(__filename);
|
||||
|
||||
jiti(path.resolve(__dirname, './src/index.ts'));
|
||||
|
@ -1,19 +1,17 @@
|
||||
{
|
||||
"name": "@sa/scripts",
|
||||
"version": "1.0.0",
|
||||
"bin": {
|
||||
"sa": "./bin.cjs"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
"*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"bin": {
|
||||
"sa": "./bin.cjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"c12": "1.5.1",
|
||||
"cac": "6.7.14",
|
||||
@ -21,8 +19,8 @@
|
||||
"enquirer": "2.4.1",
|
||||
"execa": "8.0.1",
|
||||
"jiti": "1.21.0",
|
||||
"lint-staged": "15.1.0",
|
||||
"npm-check-updates": "16.14.6",
|
||||
"lint-staged": "15.2.0",
|
||||
"npm-check-updates": "16.14.12",
|
||||
"rimraf": "5.0.5"
|
||||
}
|
||||
}
|
||||
|
@ -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';
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import process from 'node:process';
|
||||
import { loadConfig } from 'c12';
|
||||
import type { CliOption } from '../types';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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[]>;
|
||||
}
|
||||
|
@ -1,19 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"jsx": "preserve",
|
||||
"lib": ["DOM", "ESNext"],
|
||||
"baseUrl": ".",
|
||||
"module": "ESNext",
|
||||
"target": "ESNext",
|
||||
"lib": ["DOM", "ESNext"],
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"jsx": "preserve",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"noUnusedLocals": true,
|
||||
"types": ["node"],
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"types": ["node"]
|
||||
"noUnusedLocals": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*", "typings/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
|
Reference in New Issue
Block a user