From cfa8127c1b6b018454fb9f31dbd8ec91769ee9eb Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Thu, 29 Apr 2021 15:30:54 +0100 Subject: [PATCH] [misc] add linting for missing explicit dependencies and fix any errors --- services/clsi/.eslintrc | 13 +++++++++++-- services/clsi/app/js/LocalCommandRunner.js | 2 +- services/clsi/buildscript.txt | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/services/clsi/.eslintrc b/services/clsi/.eslintrc index 76dad1561d..321353f971 100644 --- a/services/clsi/.eslintrc +++ b/services/clsi/.eslintrc @@ -22,7 +22,10 @@ "rules": { // Swap the no-unused-expressions rule with a more chai-friendly one "no-unused-expressions": 0, - "chai-friendly/no-unused-expressions": "error" + "chai-friendly/no-unused-expressions": "error", + + // Do not allow importing of implicit dependencies. + "import/no-extraneous-dependencies": "error" }, "overrides": [ { @@ -57,7 +60,13 @@ "files": ["app/**/*.js", "app.js", "index.js"], "rules": { // don't allow console.log in backend code - "no-console": "error" + "no-console": "error", + + // Do not allow importing of implicit dependencies. + "import/no-extraneous-dependencies": ["error", { + // Do not allow importing of devDependencies. + "devDependencies": false + }] } } ] diff --git a/services/clsi/app/js/LocalCommandRunner.js b/services/clsi/app/js/LocalCommandRunner.js index 6f57731c9c..d5fd3090a7 100644 --- a/services/clsi/app/js/LocalCommandRunner.js +++ b/services/clsi/app/js/LocalCommandRunner.js @@ -15,7 +15,7 @@ */ let CommandRunner const { spawn } = require('child_process') -const _ = require('underscore') +const _ = require('lodash') const logger = require('logger-sharelatex') logger.info('using standard command runner') diff --git a/services/clsi/buildscript.txt b/services/clsi/buildscript.txt index a86911dc61..84a43ecb83 100644 --- a/services/clsi/buildscript.txt +++ b/services/clsi/buildscript.txt @@ -6,4 +6,4 @@ clsi --env-pass-through=TEXLIVE_IMAGE --node-version=12.21.0 --public-repo=True ---script-version=3.7.0 +--script-version=3.8.0