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 1e525dcf..79e4f0d1 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/lint/ESLint.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/lint/ESLint.groovy @@ -20,9 +20,11 @@ class ESLint extends LinterBase { } def doLint() { - steps.log.info("${linterType.linter}", "Install eslint dependencies...") - steps.sh("npm install -g ${deps.join(' ')}") - steps.log.info("${linterType.linter}", "Running eslint...") - steps.sh("eslint --config ${configs} ${workspace}") + steps.dir(workspace) { + steps.log.info("${linterType.linter}", "Install eslint dependencies...") + steps.sh("npm install --save-dev ${deps.join(' ')}") + steps.log.info("${linterType.linter}", "Running eslint...") + steps.sh("eslint --config ${configs} ${workspace}") + } } } \ No newline at end of file diff --git a/first-class-pipeline/src/com/freeleaps/devops/lint/PyLint.groovy b/first-class-pipeline/src/com/freeleaps/devops/lint/PyLint.groovy index 928a3119..e0b6c9c8 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/lint/PyLint.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/lint/PyLint.groovy @@ -9,6 +9,8 @@ class PyLint extends LinterBase { } def doLint() { - steps.sh("pylint --rcfile=${configs} ${workspace}") + steps.dir(workspace) { + steps.sh("pylint --rcfile=${configs} ${workspace}") + } } } \ No newline at end of file