cost 413 ms
husky 和 lint 上演不美化代碼

[英]husky and lint staged not prettifying the code

使用反應項目。 這是我的項目結構 這是我的 package.json git 在前端文件夾之外,我需要在提交時在前端安裝 husky prettier ... 以上不起作用我在這里缺少什么? 我只想美化而不是棉絨 ...

無法使用另一個自定義命令在 husky 中運行 commitlint

[英]Can't run commitlint in husky with another custom command

我怎樣才能在 husky 中有兩個預提交掛鈎? 我希望將 commitlint 與我的 package.json 中定義的自定義腳本一起使用。 我已經安裝了 husky 並且在 .husky 文件夾中有一個預提交腳本。 這是我試過的: 我試過npx commitlint --edit && ...

哈士奇預提交希望開發人員強制在兩個相似文件中進行相關更改,否則提交 msg thow 錯誤

[英]husky precommit want to developer to force make relivant changes in two similar file otherwise commit msg thow error

如果你想當開發人員更改項目的一個文件並且你想在 husky 和 shellScript 的幫助下強制對另一個“類似”文件進行相關更改.. ...

哈士奇安裝導致路徑錯誤

[英]husky install causes patherror

我正在嘗試將 Husky 手動添加到我的項目中,如下所述: https://typicode.github.io/husky/#/?id=manual 我運行npm install husky --save-dev並按應有的方式添加並安裝了 husky 作為開發依賴項。 然后我嘗試運行 npx hu ...

將 Cypress 命令添加到 husky 預推時出現模塊未找到錯誤

[英]Module not found error when adding Cypress command to husky pre-push

當從終端運行cy run (通過npm run test:e2e )時,它工作得很好。 添加到 husky pre-push中的相同命令導致以下錯誤: 我的.husky/pre-push文件如下所示: 我無法通過終端復制錯誤。 為什么這個錯誤只發生在哈士奇身上,我該如何解決? 平台:MacOS 節點 ...

如何安裝 husky 以使用帶有嵌套文件夾的 commitlint?

[英]how do i install husky to use commitlint with nested folders?

我已經安裝了husky 和 ​​commitlint,但是當我做出 commitlint 應該認為無效的提交時,它通常會像未安裝一樣通過。 這是我的目錄樹 我有一個在package.json上安裝 husky 的腳本: .husky 中pre-commit文件 我應該怎么辦? 我的哈士奇 ...

如果測試覆蓋率低於一定百分比,如何停止提交?

[英]How to stop a commit if test coverage is below a certain percentage?

我正在使用 Jest 來測試 NestJS 應用程序,我正在嘗試創建一個 git 鈎子,如果測試覆蓋率低於 95%,它將不允許提交,我還沒有嘗試任何東西,因為我真的不知道如何正確描述我的問題。 但為了更清楚,我需要的是一個 git 鈎子,就像這樣:#!/bin/sh . "$(dirname "$ ...

如何配置 husky pre-push hook 來運行測試

[英]How to configure husky pre-push hook to run tests

我正在嘗試配置 husky pre-push 掛鈎以在推送前運行測試。 一切看起來都很好。 運行git push origin掛鈎被觸發並且測試正在運行。 問題是,當測試完成后,即使操作成功,推送也會被凍結,沒有其他任何事情發生。 package.json .husky/pre-push ...

.husky/pre-commit: 2: .: 無法打開.husky/_/husky.sh

[英].husky/pre-commit: 2: .: Can't open .husky/_/husky.sh

在一個項目中,我們使用 Husky,但是當我嘗試使用 git 添加提交時。 和 git 提交 -m“測試”,我收到以下錯誤 .husky/pre-commit: 2: .: 無法打開.husky/_/husky.sh 我該如何解決這個問題? 我的操作系統是 Windows 但我在這個項目上使用 ...

赫斯基鈎子合並后檢查 package.json 是否有任何更改,如果檢測到更改,則執行 npm 安裝

[英]Husky hook post-merge checking if any changes on package.json and execute npm install if detected changes

我想在合並分支后執行 NPM install 之類的操作,但前提是 package.json 文件正在被修改我不確定我是否做得正確,請在下面找到我的合並后#!/bin/sh . "$(dirname "$0")/_/husky.sh" differenceCode=$git diff HEAD^ ...

在 Angular 個項目的提交期間運行 ESLint

[英]Run ESLint during commit on Angular projects

我在 Angular 項目上配置了Eslint ,以在提交期間檢查代碼。 我故意犯了一個錯誤來測試我的配置是否有效:我設置了規則"no-console":"error"並且我在代碼中留下了一個console.log() 。 當提交 ESLint 時給我這個錯誤: 我懷疑我看到 2 行用 ✖ 簽名的 ...

僅針對特定文件夾更改運行 Husky 掛鈎

[英]Run Husky hooks only for specific folder changes

當僅更改某些文件夾中的文件時,是否可以僅運行 git hooks? 我有后端和前端的 monorepo。 我只想在前端的文件發生更改時運行 husky hook。 否則它不應該被觸發,也不應該運行 linting 測試等......這讓后端開發人員很惱火 ...

運行預提交 husky 腳本時未找到 Npx

[英]Npx not found when runing pre-commit husky script

環境節點安裝在~/node-v14.15.3-linux-x64/bin/node並且已經在PATH變量中設置。 VSCode 1.55.2 問題每次當我嘗試提交代碼中的更改時,我都會得到: .husky/pre-commit: 4: npx: not found husky - pre-co ...

Husky Hook 無法與 Test 一起正常工作

[英]Husky Hook does not work properly with Test

如果prettier或eslint同時指責error或warn ,我將Husky配置為阻止commits ,如果未通過tests則阻止push 。 但是,在運行test時,會顯示test CLI (如下圖所示) ,這樣,沒有任何鍵可以工作,但我只能通過單擊快捷鍵ctrl+z來完成,這會暫停我的pus ...

sh: husky: 找不到命令

[英]sh: husky: command not found

我已經用 husky 設置了一個節點項目,但是當我的同事嘗試在他的 Mac 上運行npm install時,他收到以下錯誤: 這些是相關的 package.json 部件:{ "scripts": { "prepare": "husky install" }, ...

使用husky時如何解決.husky/_/husky.sh: No such file or directory 錯誤?

[英]How do I resolve .husky/_/husky.sh: No such file or directory error when using husky?

我與同事合作的一個項目使用 husky 版本 ^5.1.0,當我嘗試推送我的提交時,我不斷收到此錯誤。 我該如何解決這個問題? 我目前使用的是 git 版本 2.18.0。 我參考了https://github.com/typicode/husky/issues/712和https://githu ...

GitHub 桌面赫斯基預提交鈎子不

[英]GitHub desktop Husky pre-commit hook does not

我按照許多其他項目(在 Mac OS11 上)安裝了 husky husky@4和lint-staged 。 終端指令流程git add. 和git commit -m 'something'流程工作正常:Husky 的預提交鈎子和lint-staged命令被成功拾取。 但是,Github 桌面預提 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM