fix(lint): change npm install command to install eslint dependencies globally

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-02-07 16:30:27 +08:00
parent b2eaf0481c
commit c6c47d8785

View File

@ -22,7 +22,7 @@ class ESLint extends LinterBase {
def doLint() { def doLint() {
steps.dir(workspace) { steps.dir(workspace) {
steps.log.info("${linterType.linter}", "Install eslint dependencies...") 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.log.info("${linterType.linter}", "Running eslint...")
steps.sh("eslint --config ${configs} ${workspace}") steps.sh("eslint --config ${configs} ${workspace}")
} }