diff --git a/src/lib/import-meta-url.js b/src/lib/import-meta-url.js index db6eb853..2e5f8730 100644 --- a/src/lib/import-meta-url.js +++ b/src/lib/import-meta-url.js @@ -1 +1,2 @@ -export var import_meta_url = require('url').pathToFileURL(__filename); \ No newline at end of file +// eslint-disable-next-line import/prefer-default-export, import/no-mutable-exports, no-var, camelcase, import/no-commonjs, global-require +export var import_meta_url = require('url').pathToFileURL(__filename); diff --git a/src/lib/msteams_notification.js b/src/lib/msteams_notification.js index 286e02f3..f467c5bc 100644 --- a/src/lib/msteams_notification.js +++ b/src/lib/msteams_notification.js @@ -1,6 +1,7 @@ /* eslint-disable no-param-reassign */ import fs from 'fs'; -import { Webhook, SimpleTextCard } from "ms-teams-wrapper"; +// eslint-disable-next-line no-unused-vars +import { Webhook, SimpleTextCard } from 'ms-teams-wrapper'; import handlebars from 'handlebars'; import { RateLimiterMemory } from 'rate-limiter-flexible'; diff --git a/src/lib/qliksense_license.js b/src/lib/qliksense_license.js index b84842a0..e9106f84 100644 --- a/src/lib/qliksense_license.js +++ b/src/lib/qliksense_license.js @@ -362,7 +362,7 @@ async function licenseReleaseAnalyzer(config, logger, qrsInstance) { logger.error( `QLIKSENSE LICENSE RELEASE ANALYZER: Could not get list of assigned analyzer licenses. HTTP status code ${result3.statusCode}` ); - return; + return false; } // Debug log @@ -390,7 +390,7 @@ async function licenseReleaseAnalyzer(config, logger, qrsInstance) { logger.error( `QLIKSENSE LICENSE RELEASE ANALYZER: Failed getting user info for user [${license.user.id}] ${license.user.userDirectory}\\${license.user.userId}` ); - return; + return false; } currentUser = res.body; } catch (err) { @@ -402,7 +402,7 @@ async function licenseReleaseAnalyzer(config, logger, qrsInstance) { `QLIKSENSE LICENSE RELEASE ANALYZER: Failed getting user info for user [${license.user.id}] ${license.user.userDirectory}\\${license.user.userId}. ${err.stack}` ); } - return; + return false; } // Get days since last use @@ -586,7 +586,7 @@ async function licenseReleaseAnalyzer(config, logger, qrsInstance) { // Is status code 204? Error if it's nmt if (result4.statusCode !== 204) { logger.error(`QLIKSENSE LICENSE RELEASE ANALYZER: HTTP status code ${result4.statusCode}`); - return; + return false; } // Debug log diff --git a/src/lib/service_uptime.js b/src/lib/service_uptime.js index f65adbb3..f07f531a 100644 --- a/src/lib/service_uptime.js +++ b/src/lib/service_uptime.js @@ -13,7 +13,7 @@ function serviceUptimeStart() { const formatter = new Intl.NumberFormat('en-US'); // Log uptime to console - // eslint-disable-next-line no-extend-native + // eslint-disable-next-line no-extend-native, func-names Number.prototype.toTime = function (isSec) { const ms = isSec ? this * 1e3 : this; // eslint-disable-next-line no-bitwise