n8n项目编译时取消类型检测,提交代码时取消校验

修改前

src/command-registry.ts:63:5 - error TS2322: Type 'FlagsSchema | undefined' is not assignable to type 'ZodObject<ZodRawShape, UnknownKeysParam, ZodTypeAny, { [x: string]: any; }, { [x: string]: any; }> | undefined'.

Type 'ZodObject<Record<string, ZodType<unknown, unknown, ZodTypeInternals\\>\>, strip>' is missing the following properties from type 'ZodObject<ZodRawShape, UnknownKeysParam, ZodTypeAny, { [x: string]: any; }, { [x: string]: any; }>': _cached, _getCached, _parse, nonstrict, and 14 more.

63 flagsSchema: commandEntry.flagsSchema,

~~~~~~~~~~~

../@n8n/backend-common/dist/cli-parser.d.ts:5:5

5 flagsSchema?: z.ZodObject<Flags>;

~~~~~~~~~~~

The expected type comes from property 'flagsSchema' which is declared here on type 'CliInput<ZodRawShape>'

src/command-registry.ts:132:13 - error TS2345: Argument of type 'FlagsSchema' is not assignable to parameter of type 'AnyZodObject'.

Type 'ZodObject<Record<string, ZodType<unknown, unknown, ZodTypeInternals\\>\>, strip>' is missing the following properties from type 'ZodObject<any, any, any, { [x: string]: any; }, { [x: string]: any; }>': _cached, _getCached, _parse, nonstrict, and 14 more.

132 .merge(flagsSchema).shape,

~~~~~~~~~~~

编译时取消类型检测

"build": "tsc -p tsconfig.build.json --noCheck && tsc-alias -p tsconfig.build.json && pnpm run build:data",
"skipLibCheck": true,

"noEmitOnError": false

git提交代码报错

lefthook v1.7.15 hook: pre-commit actionlint_check (skip) no files for inspection biome_check> Checked 1 file in 1175us. No fixes applied. prettier_check (skip) no files for inspection styles_check (skip) no matching staged files workspace_deps_check exec: "if": executable file not found in %PATH% summary: (done in 0.67 seconds) biome_check workspace_deps_check Hook process exited.

需要注释调lefthook.yml文件的所有内容

相关推荐
我居然是兔子13 小时前
异常练习:在试错中吃透Java异常处理的底层逻辑
java·开发语言
养一回月亮!13 小时前
使用Qt实现简单绘图板:鼠标绘制与擦除功能详解
开发语言·qt
BanyeBirth13 小时前
C++差分数组(二维)
开发语言·c++·算法
布列瑟农的星空13 小时前
Playwright使用体验
前端·单元测试
Tony Bai13 小时前
Go 的 AI 时代宣言:我们如何用“老”原则,解决“新”问题?
开发语言·人工智能·后端·golang
Fcy64814 小时前
C++ map和multimap的使用
开发语言·c++·stl
卤代烃14 小时前
🦾 可为与不可为:CDP 视角下的 Browser 控制边界
前端·人工智能·浏览器
_XU14 小时前
AI工具如何重塑我的开发日常
前端·人工智能·深度学习
L Jiawen14 小时前
【Golang基础】基础知识(下)
服务器·开发语言·golang
C_心欲无痕14 小时前
vue3 - defineExpose暴露给父组件属性和方法
前端·javascript·vue.js·vue3