【问题标题】:jest & pre-push/pre-commit doesn't work correctly开玩笑和预推送/预提交无法正常工作
【发布时间】:2022-10-24 01:25:49
【问题描述】:

我想在我的项目中使用 pre-push(husky) 设置玩笑。

当我输入$git 推送,测试正在运行,但推送未执行。

有什么问题吗?

[版本]

“哈士奇:“^7.0.4”

[包.json]

  "husky": {
    "hooks": {
      "pre-commit": "npx lint-staged",
      "pre-push": "npm run test"
    }
  },

[.husky/pre-push]

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run test

【问题讨论】:

    标签: reactjs git next.js husky


    【解决方案1】:

    你不需要在 package.json 指定哈士奇

    【讨论】:

      猜你喜欢
      • 2021-07-09
      • 2018-11-13
      • 2021-08-18
      • 2021-02-25
      • 1970-01-01
      • 2019-07-08
      • 1970-01-01
      • 1970-01-01
      • 2016-06-19
      相关资源
      最近更新 更多