From a21dfa205c39866400852ff82f791a52d53285c6 Mon Sep 17 00:00:00 2001 From: Omar Jaroudi <30807936+OmarJaroudi@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:39:40 +0000 Subject: [PATCH] fix: override npm config --- .pre-commit-hooks.yaml | 1 + hooks/cspell/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 7491306..f29549a 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -103,6 +103,7 @@ entry: cspell-cli language: node types: [text] + additional_dependencies: ["--globalconfig=\"./.npmrc\""] args: - --no-must-find-files - --no-progress diff --git a/hooks/cspell/index.js b/hooks/cspell/index.js index 323a5c9..f23cc70 100644 --- a/hooks/cspell/index.js +++ b/hooks/cspell/index.js @@ -1,3 +1,4 @@ #!/usr/bin/env node +process.env.NPM_CONFIG_GLOBALCONFIG = "../../.npmrc"; import "cspell/bin";