From c6c47d87853cf508d1b5a678c9763e1ab050e9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=8C=AF=E5=AE=87?= <> Date: Fri, 7 Feb 2025 16:30:27 +0800 Subject: [PATCH] fix(lint): change npm install command to install eslint dependencies globally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 孙振宇 <> --- .../src/com/freeleaps/devops/lint/ESLint.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/first-class-pipeline/src/com/freeleaps/devops/lint/ESLint.groovy b/first-class-pipeline/src/com/freeleaps/devops/lint/ESLint.groovy index 611a3479..b954e558 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/lint/ESLint.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/lint/ESLint.groovy @@ -22,7 +22,7 @@ class ESLint extends LinterBase { def doLint() { steps.dir(workspace) { steps.log.info("${linterType.linter}", "Install eslint dependencies...") - // steps.sh("npm install --save-dev ${deps.join(' ')}") + steps.sh("npm install -g ${deps.join(' ')}") steps.log.info("${linterType.linter}", "Running eslint...") steps.sh("eslint --config ${configs} ${workspace}") }