From 7267e977d3e42c41dc943134aad3f088998512f8 Mon Sep 17 00:00:00 2001 From: Zak Burke Date: Fri, 6 Oct 2023 19:08:06 -0400 Subject: [PATCH] lint --- lib/create-app.js | 2 +- lib/doc/generator.js | 2 +- lib/environment/development.js | 2 +- lib/stripes-cli.js | 2 +- test/cli/stripes-config-middleware.spec.js | 2 +- test/okapi/okapi-client-helper.spec.js | 3 +-- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/create-app.js b/lib/create-app.js index 0ab623d1..ea57b7ab 100644 --- a/lib/create-app.js +++ b/lib/create-app.js @@ -5,7 +5,7 @@ const semver = require('semver'); const pascalCase = require('just-pascal-case'); const simpleGit = require('simple-git'); const { templates } = require('./environment/inventory'); -const { version: currentCLIVersion } = require('../package.json'); +const { version: currentCLIVersion } = require('../package'); const COOKIECUTTER_PREFIX = '__'; diff --git a/lib/doc/generator.js b/lib/doc/generator.js index e506c73e..789a8229 100644 --- a/lib/doc/generator.js +++ b/lib/doc/generator.js @@ -3,7 +3,7 @@ */ const fs = require('fs'); const path = require('path'); -const { version } = require('../../package.json'); +const { version } = require('../../package'); const logger = require('../cli/logger')('docs'); const { gatherCommands } = require('./yargs-help-parser'); const { generateToc, generateMarkdown } = require('./commands-to-markdown'); diff --git a/lib/environment/development.js b/lib/environment/development.js index d5121d1e..6ae3e1fc 100644 --- a/lib/environment/development.js +++ b/lib/environment/development.js @@ -8,7 +8,7 @@ const yarn = require('../yarn'); const { allModules, allModulesAsFlatArray, toFolioName } = require('./inventory'); const AliasService = require('../platform/alias-service'); const logger = require('../cli/logger')(); -const { version: currentCLIVersion } = require('../../package.json'); +const { version: currentCLIVersion } = require('../../package'); // Compare a list of module names against those known to be valid function validateModules(theModules) { diff --git a/lib/stripes-cli.js b/lib/stripes-cli.js index 37c7c1da..7f2e6b48 100755 --- a/lib/stripes-cli.js +++ b/lib/stripes-cli.js @@ -3,7 +3,7 @@ const yargs = require('yargs/yargs'); const { hideBin } = require('yargs/helpers'); const isInstalledGlobally = require('is-installed-globally'); -const packageJson = require('../package.json'); +const packageJson = require('../package'); const AliasError = require('./platform/alias-error'); const { yargsConfig, commandDirOptions } = require('./cli/config'); const logger = require('./cli/logger')(); diff --git a/test/cli/stripes-config-middleware.spec.js b/test/cli/stripes-config-middleware.spec.js index f5dd8f3b..de817a3e 100644 --- a/test/cli/stripes-config-middleware.spec.js +++ b/test/cli/stripes-config-middleware.spec.js @@ -3,7 +3,7 @@ const path = require('path'); const stdin = require('../../lib/cli/stdin'); const { stripesConfigMiddleware } = require('../../lib/cli/stripes-config-middleware'); const StripesCliError = require('../../lib/cli/stripes-cli-error'); -const stripesConfigTestFile = require('./stripes-test.config.js'); +const stripesConfigTestFile = require('./stripes-test.config'); const stripesConfigStub = { okapi: { diff --git a/test/okapi/okapi-client-helper.spec.js b/test/okapi/okapi-client-helper.spec.js index 20d144b7..bbc1f9ce 100644 --- a/test/okapi/okapi-client-helper.spec.js +++ b/test/okapi/okapi-client-helper.spec.js @@ -6,7 +6,6 @@ const { ensureOk, optionsHeaders, optionsBody, - okapiFetch, } = require('../../lib/okapi/okapi-client-helper'); @@ -43,7 +42,7 @@ describe('okapi-client-helpers', function () { }; let didError = false; try { - const r = await ensureOk(res); + await ensureOk(res); } catch (e) { didError = true; expect(e instanceof OkapiError).to.be.true;