在推动react-native 项目时,由于husky pre push失败,我遇到了错误

husky > pre-push hook failed (add --no-verify to bypass)

显示的所有这些错误都是lint错误,如下所示

unused-vars

27:48  error    Trailing spaces not allowed    
                     no-trailing-spaces

75:5   warning  Unexpected console statement   
                     no-console

92:93  error    Unexpected trailing comma   
                        comma-dangle

96:81  error    Unexpected trailing comma

如何在mac上的Sourcetree应用程序上关闭此功能?

推荐答案

问题(尽管不是真正的问题!)是因为React创建的钩子.解决方案是简单地删除git的hooks文件夹,该文件夹定义了预提交钩子,因此可以在提交后推送.

编辑:当您提供git命令行参数时,您也可以跳过钩子-无验证,

React-native相关问答推荐

复活的夹子在Panguesture上崩溃

在原生react 中更改图像源URI时闪烁

应用管理

任务:react-native-async-storage_async-storage:generateReleaseRFile FAILED

使用 React Native 下载数据文件以供离线使用

如何在react-native 中存储/保存数据

React Native 获取视图相对于屏幕的绝对位置

使用 react-native 单击时如何更改图像和文本 colored颜色 ?

纯在 Swift 中的 React Native 应用程序

如何在 React Native 中将静态图像拉伸为背景?

React 中的 getSnapshotBeforeUpdate() 是什么?

mapDispatchToProps:有什么意义吗?

在配置 react-native-maps 中获取 "supportLibVersion" 、 "playServicesVersion" 和 "androidMapsUtilsVersion" 值

词法或预处理器问题 - 未找到 event2/event-config.h 文件

opneUrl react-native 链接调用,mailto

React-native:图像未显示在 android 设备中,但在模拟器中完美显示

无法在react-native元素中扩展 Zip

在 OPTIONS 响应后使 fetch API 与 CORS 一起工作

在 React Native 中检测向左滑动

如何在 react-native 中为带有图标的按钮建模