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文件的所有内容

相关推荐
xushichao19894 小时前
实时数据压缩库
开发语言·c++·算法
liurunlin8885 小时前
Go环境搭建(vscode调试)
开发语言·vscode·golang
进击的尘埃5 小时前
从多仓到 Monorepo 的渐进式迁移:Git 历史保留、依赖收敛与缓存调优
javascript
故事和你915 小时前
sdut-python-实验四-python序列结构(21-27)
大数据·开发语言·数据结构·python·算法
SuperEugene5 小时前
TypeScript+Vue 实战:告别 any 滥用,统一接口 / Props / 表单类型,实现类型安全|编码语法规范篇
开发语言·前端·javascript·vue.js·安全·typescript
liuyao_xianhui5 小时前
优选算法_模拟_提莫攻击_C++
开发语言·c++·算法·动态规划·哈希算法·散列表
我是永恒5 小时前
上架一个跨境工具导航网站
前端
.select.5 小时前
c++ 移动赋值/移动构造函数
开发语言·c++
电子羊5 小时前
Spec 编程工作流文档
前端
GISer_Jing5 小时前
从CLI到GUI桌面应用——前端工程化进阶之路
前端·人工智能·aigc·交互