Skip to content

Commit

Permalink
refactor: Fix various typos, code formatting and style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Göran Sander committed May 6, 2024
1 parent 19a4eb7 commit caf9439
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/lib/import-meta-url.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export var import_meta_url = require('url').pathToFileURL(__filename);
// 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);
3 changes: 2 additions & 1 deletion src/lib/msteams_notification.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
8 changes: 4 additions & 4 deletions src/lib/qliksense_license.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/lib/service_uptime.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit caf9439

Please sign in to comment.