scripts-audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseScripts Audit
脚本审计
Purpose
审计目的
Audit scripts to:
package.json- Classify the package with minimal manifest context
- Check whether the script interface fits that package role
- Prefer Vite Plus conventions for app-style repos
- Enforce stable naming and suffix conventions
- Improve composition, CI ergonomics, and performance
- Flag misleading, platform-specific, or overgrown scripts
对中的脚本进行审计,以实现:
package.json- 基于最少的清单上下文对包进行分类
- 检查脚本接口是否符合包的角色定位
- 针对应用类仓库优先遵循Vite Plus约定
- 强制执行稳定的命名及后缀规范
- 优化脚本组合、CI易用性与性能
- 标记具有误导性、平台特定或过于臃肿的脚本
When to Use This Skill
何时使用该技能
Use when the user asks to:
- "Audit my npm scripts"
- "Standardize package.json script names"
- "Decide whether this should be or
dev"start - "Review build, check, or release scripts"
- "Make root workspace scripts consistent with package scripts"
Trigger phrases: "scripts audit", "package.json scripts", "npm scripts", "pnpm scripts", "bun scripts", "script naming", "script conventions"
当用户提出以下需求时使用:
- "审计我的npm脚本"
- "标准化package.json的脚本名称"
- "判断应该用还是
dev"start - "审核build、check或release脚本"
- "使根工作区脚本与包脚本保持一致"
触发短语:"scripts audit"、"package.json scripts"、"npm scripts"、"pnpm scripts"、"bun scripts"、"script naming"、"script conventions"
Scope
审计范围
This is still a scripts skill, not a full audit.
package.jsonRead adjacent manifest fields only when they change what "good scripts" means:
privatepackageManagerworkspacestypebinexportsfilesengines
Do not drift into dependency hygiene, , , publish metadata, or security scanning unless the user explicitly asks for that broader audit.
exportspeerDependencies这仍是一项仅针对脚本的技能,并非完整的审计。
package.json仅当以下清单字段会影响“优质脚本”的定义时,才会读取这些字段:
privatepackageManagerworkspacestypebinexportsfilesengines
除非用户明确要求进行更广泛的审计,否则请勿涉及依赖管理、、、发布元数据或安全扫描等内容。
exportspeerDependenciesVite Plus First
优先遵循Vite Plus规范
If a repo uses , aliases to , or invokes in scripts, treat Vite Plus as the primary app workflow.
vite-plusvite@voidzero-dev/vite-plus-corevpPrefer VP-native guidance:
- :
buildvp run clean && tsgo && vp build - :
checkvp check && vp run typecheck - :
testvp test --run - :
test:civp test --run --coverage - :
preparevp config
Do not recommend ESLint-specific patterns in this skill. If the repo exposes Biome explicitly, it is fine to mention scripts as optional non-VP companion scripts, but VP remains the primary app workflow.
biome如果仓库使用、将别名指向,或在脚本中调用,则将Vite Plus作为主要的应用工作流。
vite-plusvite@voidzero-dev/vite-plus-corevp优先采用VP原生指导方案:
- :
buildvp run clean && tsgo && vp build - :
checkvp check && vp run typecheck - :
testvp test --run - :
test:civp test --run --coverage - :
preparevp config
本技能中不推荐ESLint特定的模式。如果仓库明确使用Biome,可以将脚本作为可选的非VP配套脚本提及,但VP仍为主要应用工作流。
biomeNon-VP Patterns
非VP模式
Non-VP patterns are still worth mentioning when the repo actually uses them:
- Plain script composition is the normal baseline for monorepo roots, publishable libraries, and release flows.
pnpm - scripts are a valid non-VP quality layer, especially in libraries, CLIs, and repos with explicit lint or format commands.
biome - is a valid non-VP setup pattern when the repo manages git hooks explicitly.
prepare: "husky"
When VP is detected, do not try to "improve" the repo by replacing VP-native app flows with separate non-VP app scripts unless the user explicitly asks for that direction.
当仓库实际使用非VP模式时,这些模式仍值得关注:
- 纯脚本组合是单体仓库根目录、可发布库及发布流程的常规基准方案。
pnpm - 脚本是有效的非VP质量保障层,尤其适用于库、CLI及明确包含lint或format命令的仓库。
biome - 当仓库明确管理git钩子时,是一种有效的非VP设置模式。
prepare: "husky"
当检测到VP时,请勿尝试用独立的非VP应用脚本替换VP原生应用工作流来“优化”仓库,除非用户明确要求这样做。
Workflow
审计流程
Step 1: Load Minimal Manifest Context
步骤1:加载最少的清单上下文
Read plus only the manifest fields that affect script expectations:
scriptsbash
jq '{
name,
private,
packageManager,
type,
workspaces,
bin,
exports,
files,
engines,
scripts
}' package.jsonOnly inspect or when they explain a script choice, for example:
dependenciesdevDependencies- ,
vite-plusaliased tovite,@voidzero-dev/vite-plus-core,tsgo-> Vite Plus app expectationsreact - ,
storybook-> non-VP app expectationsnext - ->
typescripttypecheck - ,
biome,prettier-> non-VP quality/setup expectationshusky - ,
vitest,jest-> test naming expectations when the repo is not VP-drivenbun:test
Extract and categorize scripts by purpose:
- Runtime: ,
dev,startpreview - Quality: ,
typecheck,lint,lint:*,format,format:*,checkcheck:* - Build: ,
build,build:*clean - Test: ,
test,test:*coverage - Release: ,
prepack,prepublishOnlyrelease:*
读取以及仅会影响脚本预期的清单字段:
scriptsbash
jq '{
name,
private,
packageManager,
type,
workspaces,
bin,
exports,
files,
engines,
scripts
}' package.json仅当或能解释脚本选择时,才会检查这些依赖,例如:
dependenciesdevDependencies- 、
vite-plus别名指向vite、@voidzero-dev/vite-plus-core、tsgo→ 符合Vite Plus应用预期react - 、
storybook→ 符合非VP应用预期next - → 需要
typescript脚本typecheck - 、
biome、prettier→ 符合非VP质量保障/设置预期husky - 、
vitest、jest→ 当仓库非VP驱动时的测试命名预期bun:test
按用途提取并分类脚本:
- 运行时:、
dev、startpreview - 质量保障:、
typecheck、lint、lint:*、format、format:*、checkcheck:* - 构建:、
build、build:*clean - 测试:、
test、test:*coverage - 发布:、
prepack、prepublishOnlyrelease:*
Step 2: Classify Package Role
步骤2:分类包的角色
Use minimal manifest signals to decide what a sensible script surface looks like.
| Role | Typical signals | Script expectations |
|---|---|---|
| App | | Prefer VP-native |
| Monorepo root | | Root scripts should mostly delegate and mirror leaf package names |
| Publishable library | | |
| Service / bot / CLI | | |
If the package is ambiguous, say so and audit against the closest role instead of inventing missing requirements.
利用最少的清单信号来确定合理的脚本界面。
| 角色 | 典型信号 | 脚本预期 |
|---|---|---|
| 应用 | | 优先采用VP原生的 |
| 单体仓库根目录 | | 根目录脚本应主要委托执行并镜像子包的脚本名称 |
| 可发布库 | | 需要 |
| 服务/机器人/CLI | | 需要 |
如果包的角色不明确,请明确说明,并参照最接近的角色进行审计,而非凭空添加缺失的要求。
Step 3: Check Whether the Public Script Interface Fits the Role
步骤3:检查公共脚本接口是否符合角色定位
Do not demand the same scripts from every package.
不要要求所有包都使用相同的脚本。
App
应用类
Healthy default surface:
json
{
"dev": "vp dev",
"build": "vp run clean && tsgo && vp build",
"clean": "rm -rf dist coverage reports",
"check": "vp check && vp run typecheck",
"typecheck": "tsgo --noEmit",
"test": "vp test --run",
"test:ci": "vp test --run --coverage",
"prepare": "vp config"
}If the repo is VP-driven, separate , , , and scripts are optional. Keep them only when they expose distinct Biome behavior the team actually uses.
lintlint:fixformatformat:check健康的默认脚本集合:
json
{
"dev": "vp dev",
"build": "vp run clean && tsgo && vp build",
"clean": "rm -rf dist coverage reports",
"check": "vp check && vp run typecheck",
"typecheck": "tsgo --noEmit",
"test": "vp test --run",
"test:ci": "vp test --run --coverage",
"prepare": "vp config"
}如果仓库由VP驱动,单独的、、和脚本为可选。仅当团队实际使用这些脚本来展示Biome的独特功能时,才保留它们。
lintlint:fixformatformat:checkMonorepo root
单体仓库根目录
Root scripts should preserve the same public contract as the main package they expose:
json
{
"build": "pnpm --filter @edloidas/example run build",
"check": "pnpm --filter @edloidas/example run check",
"test": "pnpm --filter @edloidas/example run test",
"test:ci": "pnpm --filter @edloidas/example run test:ci",
"dev": "pnpm --filter @edloidas/example exec vp dev"
}Prefer delegation over re-implementing leaf commands in the root package.
根目录脚本应与它所暴露的主包保持相同的公共约定:
json
{
"build": "pnpm --filter @edloidas/example run build",
"check": "pnpm --filter @edloidas/example run check",
"test": "pnpm --filter @edloidas/example run test",
"test:ci": "pnpm --filter @edloidas/example run test:ci",
"dev": "pnpm --filter @edloidas/example exec vp dev"
}优先采用委托执行,而非在根目录包中重新实现子包的命令。
Publishable library
可发布库
Healthy default surface:
json
{
"build": "pnpm clean && pnpm build:*",
"clean": "rm -rf dist coverage",
"typecheck": "tsc --noEmit",
"lint": "biome lint .",
"format:check": "biome format .",
"test": "vitest run",
"validate": "pnpm check && pnpm build && pnpm test:ci",
"prepublishOnly": "pnpm validate"
}健康的默认脚本集合:
json
{
"build": "pnpm clean && pnpm build:*",
"clean": "rm -rf dist coverage",
"typecheck": "tsc --noEmit",
"lint": "biome lint .",
"format:check": "biome format .",
"test": "vitest run",
"validate": "pnpm check && pnpm build && pnpm test:ci",
"prepublishOnly": "pnpm validate"
}Service / bot / CLI
服务/机器人/CLI
Healthy default surface:
json
{
"start": "bun src/index.ts",
"check": "bun run typecheck && bun run lint && bun run format:check",
"test": "bun test"
}build健康的默认脚本集合:
json
{
"start": "bun src/index.ts",
"check": "bun run typecheck && bun run lint && bun run format:check",
"test": "bun test"
}如果运行时可直接执行源码,则此处的为可选。
buildStep 4: Check Naming Conventions
步骤4:检查命名约定
Prefer a small stable vocabulary of public script names:
| Script | Meaning |
|---|---|
| Interactive local development server |
| Runtime entrypoint for an app, service, or CLI |
| Production or distributable build |
| Remove generated artifacts |
| Static type checking only |
| Non-mutating lint pass |
| Lint pass with writes |
| Formatter with writes |
| Formatter verification only |
| Default test run |
| Interactive watch mode |
| Deterministic CI-oriented test run |
| Coverage-focused test run |
| Fast preflight quality gate |
| Mutating version of the quality gate |
| Preview built output |
| Slower release gate |
| Dry-run publish or release path |
Naming rules:
- Prefer one canonical name per concern. Flag synonyms such as plus
serve, ordevplusverify, unless they are clearly different tasks.check - Prefer , for example
action:target:variantorbuild:ui:css.typecheck:node - means mutating,
:fixmeans verification-only,:checkmeans interactive,:watchmeans deterministic strict mode, and:cimeans no side effects.:dry - Root scripts should keep the same public names as leaf scripts when delegating.
- Use for long-running local development workflows. Use
devfor the runtime entrypoint of a service, bot, or CLI.start - In VP repos, is the primary quality command. Separate
checkorlintscripts are optional, not mandatory.format - In non-VP repos, explicit ,
lint, andformatscripts are normal and worth keeping clear.format:check
优先使用一套小型且稳定的公共脚本名称词汇:
| 脚本 | 含义 |
|---|---|
| 交互式本地开发服务器 |
| 应用、服务或CLI的运行时入口 |
| 生产环境或可分发版本构建 |
| 删除生成的产物 |
| 仅静态类型检查 |
| 非修改型lint检查 |
| 可修改代码的lint检查 |
| 可修改代码的格式化 |
| 仅格式化验证 |
| 默认测试运行 |
| 交互式监听模式 |
| 面向CI的确定性测试运行 |
| 聚焦覆盖率的测试运行 |
| 快速预检查质量关卡 |
| 可修改代码的质量关卡 |
| 预览构建产物 |
| 较慢的发布关卡 |
| 发布或流程的干运行 |
命名规则:
- 每个关注点优先使用一个标准名称。标记同义词,例如和
serve、dev和verify,除非它们是明显不同的任务。check - 优先采用格式,例如
action:target:variant或build:ui:css。typecheck:node - 表示可修改代码,
:fix表示仅验证,:check表示交互式,:watch表示确定性严格模式,:ci表示无副作用。:dry - 根目录脚本在委托执行时应与子包脚本保持相同的公共名称。
- 长期运行的本地开发工作流使用。服务、机器人或CLI的运行时入口使用
dev。start - 在VP仓库中,是主要的质量保障命令。单独的
check或lint脚本为可选,而非强制要求。format - 在非VP仓库中,明确的、
lint和format脚本是常规操作,值得保持清晰。format:check
Step 5: Check Composition
步骤5:检查脚本组合
Leaf scripts should do one job well. Composite scripts should compose those leaf scripts instead of duplicating raw command strings everywhere.
Good composition:
json
{
"clean": "rm -rf dist coverage reports",
"typecheck": "tsgo --noEmit",
"build": "vp run clean && tsgo && vp build",
"check": "vp check && vp run typecheck",
"test": "vp test --run",
"test:ci": "vp test --run --coverage",
"prepare": "vp config"
}Guidelines:
- should be the fast, repeatable preflight gate.
check - should touch the same surfaces as
check:fix, but with writes enabled where appropriate.check - should be the slower gate, usually
validateorcheck && build && test.check && build && test:ci - should usually call
prepublishOnlyorvalidaterather than inventing a separate release path.release:dry - Prefer calling scripts from composite scripts. Avoid copying the same raw command string into multiple places.
Move script logic into files when the command becomes hard to review:
scripts/- shell conditionals or loops
- multiple or
node -esnippetsbun -e - cross-platform branching
- long inline smoke tests or packaging logic
子脚本应专注完成单一任务。组合脚本应调用这些子脚本,而非在各处重复原始命令字符串。
良好的组合示例:
json
{
"clean": "rm -rf dist coverage reports",
"typecheck": "tsgo --noEmit",
"build": "vp run clean && tsgo && vp build",
"check": "vp check && vp run typecheck",
"test": "vp test --run",
"test:ci": "vp test --run --coverage",
"prepare": "vp config"
}指导原则:
- 应为快速、可重复的预检查关卡。
check - 应覆盖与
check:fix相同的范围,但在适当情况下启用代码修改。check - 应为较慢的关卡,通常是
validate或check && build && test。check && build && test:ci - 通常应调用
prepublishOnly或validate,而非单独创建发布流程。release:dry - 组合脚本优先调用其他脚本。避免在多个地方复制相同的原始命令字符串。
当命令难以审阅时,将脚本逻辑移至目录下的文件中:
scripts/- shell条件语句或循环
- 多个或
node -e代码片段bun -e - 跨平台分支逻辑
- 冗长的内联冒烟测试或打包逻辑
Step 6: Check Consistency and Performance
步骤6:检查一致性与性能
Look for consistency across related variants:
检查相关变体之间的一致性:
Vite Plus mode pairing
Vite Plus模式配对
jsonc
// Good
"check": "vp check && vp run typecheck",
"test": "vp test --run",
"test:ci": "vp test --run --coverage"If a VP repo exposes , it should usually add something CI-specific such as coverage or stricter reporting rather than duplicating .
test:citestjsonc
// 良好示例
"check": "vp check && vp run typecheck",
"test": "vp test --run",
"test:ci": "vp test --run --coverage"如果VP仓库暴露,通常应添加CI特定的内容,例如覆盖率或更严格的报告,而非重复的内容。
test:citestBiome pairing
Biome模式配对
jsonc
"lint": "biome check .",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"format:check": "biome format ."If the repo keeps Biome scripts, related variants should usually target the same scope unless the difference is intentional and documented.
jsonc
"lint": "biome check .",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"format:check": "biome format ."如果仓库保留Biome脚本,相关变体通常应针对相同的范围,除非差异是有意为之且有文档说明。
Runtime consistency
运行时一致性
Within one package, prefer one script runner style unless there is a real reason to mix:
pnpm run ...bun run ...npm run ...
If the scripts depend on package-manager-specific features such as , , or Bun-only runtime behavior, call out missing or stale metadata because it affects script usability and reproducibility.
pnpm --filterpnpm /^build:.*/packageManager在单个包中,优先使用一种脚本运行器风格,除非有合理的理由混合使用:
pnpm run ...bun run ...npm run ...
如果脚本依赖包管理器特定的功能,例如、或仅Bun支持的运行时行为,请指出缺失或过时的元数据,因为这会影响脚本的可用性和可复现性。
pnpm --filterpnpm /^build:.*/packageManagerParallelization
并行化
When sub-builds are independent, consider runner-native fan-out:
jsonc
// Sequential
"build": "pnpm build:lib && pnpm build:css"
// Better when independent
"build:ui": "pnpm --color /^build:ui:.*$/"Parallelize only when it preserves readable output and does not break dependency order.
当子构建任务相互独立时,考虑使用运行器原生的并行执行:
jsonc
// 串行执行
"build": "pnpm build:lib && pnpm build:css"
// 独立任务时更优的方式
"build:ui": "pnpm --color /^build:ui:.*$/"仅当并行执行能保持输出可读性且不破坏依赖顺序时,才进行并行化。
Step 7: Check Lifecycle Hook Usage
步骤7:检查生命周期钩子的使用
Use package lifecycle hooks for real lifecycle boundaries:
json
{
"prepare": "vp config",
"prepack": "pnpm build",
"prepublishOnly": "pnpm validate"
}Guidelines:
- In VP repos, is a strong default.
prepare: "vp config" - In non-VP repos, is a valid setup hook when the project manages git hooks explicitly.
prepare: "husky" - is for local setup such as VP configuration or git hooks, not for hidden build work.
prepare - is for ensuring distributable artifacts exist before packing.
prepack - is for the final release gate.
prepublishOnly - Avoid build steps unless the package truly requires them.
postinstall
将包生命周期钩子用于真实的生命周期边界:
json
{
"prepare": "vp config",
"prepack": "pnpm build",
"prepublishOnly": "pnpm validate"
}指导原则:
- 在VP仓库中,是一个强有力的默认设置。
prepare: "vp config" - 在非VP仓库中,当项目明确管理git钩子时,是有效的设置钩子。
prepare: "husky" - 用于本地设置,例如VP配置或git钩子,而非隐藏的构建工作。
prepare - 用于确保打包前存在可分发的产物。
prepack - 用于最终的发布关卡。
prepublishOnly - 除非包确实需要,否则避免使用构建步骤。
postinstall
Step 8: Flag Anti-Patterns
步骤8:标记反模式
Call out these issues explicitly:
- Placeholder success scripts such as or
test: "exit 0".prepack: "echo Packaging..." - Platform-specific helpers hidden behind generic names, for example . If kept, prefer a more explicit name such as
analyze: "open dist/stats.html".analyze:open - Root workspace scripts that embed leaf-package implementation instead of delegating.
- Missing paired scripts where the workflow expects them, such as without
format, orformat:checkwithoutlintwhen Biome is exposed explicitly.lint:fix - VP app repos that skip and require manual local setup.
prepare: "vp config" - Duplicate aliases that do the same thing without adding clarity.
- Very long inline script strings that should live in .
scripts/
明确指出以下问题:
- 占位符成功脚本,例如或
test: "exit 0"。prepack: "echo Packaging..." - 使用通用名称隐藏的平台特定辅助脚本,例如。如果保留,建议使用更明确的名称,例如
analyze: "open dist/stats.html"。analyze:open - 根工作区脚本嵌入子包实现而非委托执行。
- 工作流预期存在但缺失的配对脚本,例如当明确使用Biome时,有但无
format,或有format:check但无lint。lint:fix - 跳过并需要手动本地设置的VP应用仓库。
prepare: "vp config" - 无意义的重复别名,即执行相同操作但未增加清晰度的脚本。
- 应移至目录的极长内联脚本字符串。
scripts/
Step 9: Generate Report
步骤9:生成审计报告
markdown
undefinedmarkdown
undefinedScripts Audit Report
脚本审计报告
Package Role
包角色
- Monorepo root delegating to
@edloidas/example
- 单体仓库根目录,委托执行的脚本
@edloidas/example
Naming Issues
命名问题
- duplicates
servewithout a clearer contractdev - should be
lint:checklint
- 与
serve重复,且未提供更清晰的约定dev - 应改为
lint:checklint
Composition Issues
组合问题
- duplicates
prepublishOnly; reusecheck && build && testvalidate - Root re-implements leaf build steps instead of delegating
build
- 重复了
prepublishOnly的逻辑;应复用check && build && test脚本validate - 根目录脚本重新实现了子包的构建步骤,而非委托执行
build
Lifecycle Issues
生命周期问题
- runs a build; move that work to
prepareorbuildprepack
- 执行了构建工作;应将该工作移至
prepare或buildprepack
Performance / Consistency Issues
性能/一致性问题
- and
linttarget different file setslint:fix - duplicates
test:ciinstead of adding coverage or stricter CI behaviortest
- 和
lint针对不同的文件集合lint:fix - 重复了
test:ci的内容,未添加覆盖率或更严格的CI行为test
Recommendations
建议
- Standardize on ,
build,check,test, andtest:cias the public VP surface, withpreparewhen the repo exposes it.dev - Rename scripts to follow .
action:target:variant - Introduce and let
validatecall it.prepublishOnly - Move long inline smoke-test logic into .
scripts/
undefined- 标准化使用、
build、check、test和test:ci作为VP的公共脚本集合,仓库暴露prepare时也应包含该脚本。dev - 按照格式重命名脚本。
action:target:variant - 引入脚本,并让
validate调用它。prepublishOnly - 将冗长的内联冒烟测试逻辑移至目录。
scripts/
undefinedCommon Patterns
常见模式
Use these as pattern families, not a single universal template. VP app repos should prefer the VP example. Libraries, CLIs, and monorepo roots often use the non-VP or Bun patterns below.
pnpm将这些作为模式家族使用,而非单一的通用模板。VP应用仓库应优先采用VP示例。库、CLI和单体仓库根目录通常使用以下非VP的或Bun模式。
pnpmVite Plus App
Vite Plus 应用
json
{
"dev": "vp dev",
"build": "vp run clean && tsgo && vp build",
"clean": "rm -rf dist coverage reports",
"typecheck": "tsgo --noEmit",
"check": "vp check && vp run typecheck",
"test": "vp test --run",
"test:ci": "vp test --run --coverage",
"prepare": "vp config"
}Optional Biome companion scripts:
json
{
"lint": "biome check .",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"format:check": "biome format ."
}json
{
"dev": "vp dev",
"build": "vp run clean && tsgo && vp build",
"clean": "rm -rf dist coverage reports",
"typecheck": "tsgo --noEmit",
"check": "vp check && vp run typecheck",
"test": "vp test --run",
"test:ci": "vp test --run --coverage",
"prepare": "vp config"
}可选的Biome配套脚本:
json
{
"lint": "biome check .",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"format:check": "biome format ."
}Monorepo Root (pnpm)
单体仓库根目录(pnpm)
json
{
"build": "pnpm --filter @edloidas/example run build",
"check": "pnpm --filter @edloidas/example run check",
"test": "pnpm --filter @edloidas/example run test",
"test:ci": "pnpm --filter @edloidas/example run test:ci",
"dev": "pnpm --filter @edloidas/example exec vp dev",
"prepare": "pnpm --filter @edloidas/example run prepare"
}json
{
"build": "pnpm --filter @edloidas/example run build",
"check": "pnpm --filter @edloidas/example run check",
"test": "pnpm --filter @edloidas/example run test",
"test:ci": "pnpm --filter @edloidas/example run test:ci",
"dev": "pnpm --filter @edloidas/example exec vp dev",
"prepare": "pnpm --filter @edloidas/example run prepare"
}Non-VP Publishable Library
非VP可发布库
json
{
"clean": "rm -rf dist coverage",
"typecheck": "tsc --noEmit",
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"format:check": "biome format .",
"check": "pnpm typecheck && pnpm lint && pnpm format:check",
"check:fix": "pnpm typecheck && pnpm lint:fix && pnpm format",
"build": "pnpm clean && pnpm build:*",
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest run --coverage",
"validate": "pnpm check && pnpm build && pnpm test:ci",
"release:dry": "pnpm publish --dry-run --no-git-checks",
"prepublishOnly": "pnpm validate"
}json
{
"clean": "rm -rf dist coverage",
"typecheck": "tsc --noEmit",
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"format:check": "biome format .",
"check": "pnpm typecheck && pnpm lint && pnpm format:check",
"check:fix": "pnpm typecheck && pnpm lint:fix && pnpm format",
"build": "pnpm clean && pnpm build:*",
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest run --coverage",
"validate": "pnpm check && pnpm build && pnpm test:ci",
"release:dry": "pnpm publish --dry-run --no-git-checks",
"prepublishOnly": "pnpm validate"
}Non-VP Service / CLI
非VP服务/CLI
json
{
"start": "bun src/index.ts",
"typecheck": "tsc --noEmit",
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"format:check": "biome format .",
"check": "bun run typecheck && bun run lint && bun run format:check",
"check:fix": "bun run typecheck && bun run lint:fix && bun run format",
"test": "bun test",
"test:watch": "bun test --watch",
"validate": "bun run check && bun run test"
}json
{
"start": "bun src/index.ts",
"typecheck": "tsc --noEmit",
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"format:check": "biome format .",
"check": "bun run typecheck && bun run lint && bun run format:check",
"check:fix": "bun run typecheck && bun run lint:fix && bun run format",
"test": "bun test",
"test:watch": "bun test --watch",
"validate": "bun run check && bun run test"
}