[英]husky and lint staged not prettifying the code
使用反應項目。 這是我的項目結構 這是我的 package.json git 在前端文件夾之外,我需要在提交時在前端安裝 husky prettier ... 以上不起作用我在這里缺少什么? 我只想美化而不是棉絨 ...
[英]husky and lint staged not prettifying the code
使用反應項目。 這是我的項目結構 這是我的 package.json git 在前端文件夾之外,我需要在提交時在前端安裝 husky prettier ... 以上不起作用我在這里缺少什么? 我只想美化而不是棉絨 ...
[英]Can't run commitlint in husky with another custom command
我怎樣才能在 husky 中有兩個預提交掛鈎? 我希望將 commitlint 與我的 package.json 中定義的自定義腳本一起使用。 我已經安裝了 husky 並且在 .husky 文件夾中有一個預提交腳本。 這是我試過的: 我試過npx commitlint --edit && ...
[英]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 ...
[英]Can't commit using husky: .husky/pre-commit: line 4: npx: command not found
我已經安裝了 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 節點 ...
[英]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 "$ ...
[英]How to configure husky pre-push hook to run tests
我正在嘗試配置 husky pre-push 掛鈎以在推送前運行測試。 一切看起來都很好。 運行git push origin掛鈎被觸發並且測試正在運行。 問題是,當測試完成后,即使操作成功,推送也會被凍結,沒有其他任何事情發生。 package.json .husky/pre-push ...
[英]Unable to commit due to Husky failure in node application
我創建了一個節點應用程序並安裝了 Husky7.0.4 和 lint-staged12.3.5 以下是 .husky/pre-commit --- 文件的配置 以下是 package.json 配置 但是每次我提交代碼時都會收到以下錯誤 ...
[英].husky/pre-commit: 2: .: Can't open .husky/_/husky.sh
在一個項目中,我們使用 Husky,但是當我嘗試使用 git 添加提交時。 和 git 提交 -m“測試”,我收到以下錯誤 .husky/pre-commit: 2: .: 無法打開.husky/_/husky.sh 我該如何解決這個問題? 我的操作系統是 Windows 但我在這個項目上使用 ...
[英]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^ ...
[英]Run ESLint during commit on Angular projects
我在 Angular 項目上配置了Eslint ,以在提交期間檢查代碼。 我故意犯了一個錯誤來測試我的配置是否有效:我設置了規則"no-console":"error"並且我在代碼中留下了一個console.log() 。 當提交 ESLint 時給我這個錯誤: 我懷疑我看到 2 行用 ✖ 簽名的 ...
[英]Run Husky hooks only for specific folder changes
當僅更改某些文件夾中的文件時,是否可以僅運行 git hooks? 我有后端和前端的 monorepo。 我只想在前端的文件發生更改時運行 husky hook。 否則它不應該被觸發,也不應該運行 linting 測試等......這讓后端開發人員很惱火 ...
[英]Use Husky without node installed (use in Docker)
我們有多個團隊。 前端和后端。 所有前端開發人員在計算機上都有node ,但后端開發人員沒有。 Husky ( https://typicode.github.io/husky/#/ ) 安裝 commit-Hooks。 對於后端開發人員,我們收到錯誤消息Can't find Husky, sk ...
[英]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 does not work properly with Test
如果prettier或eslint同時指責error或warn ,我將Husky配置為阻止commits ,如果未通過tests則阻止push 。 但是,在運行test時,會顯示test CLI (如下圖所示) ,這樣,沒有任何鍵可以工作,但我只能通過單擊快捷鍵ctrl+z來完成,這會暫停我的pus ...
[英]sh: husky: command not found
我已經用 husky 設置了一個節點項目,但是當我的同事嘗試在他的 Mac 上運行npm install時,他收到以下錯誤: 這些是相關的 package.json 部件:{ "scripts": { "prepare": "husky install" }, ...
[英]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 desktop Husky pre-commit hook does not
我按照許多其他項目(在 Mac OS11 上)安裝了 husky husky@4和lint-staged 。 終端指令流程git add. 和git commit -m 'something'流程工作正常:Husky 的預提交鈎子和lint-staged命令被成功拾取。 但是,Github 桌面預提 ...