Skip to content

Commit 3aeccfb

Browse files
committed
linting fixes
1 parent 4b8fd0c commit 3aeccfb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/mcapi/utils/utils.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const forge = require("node-forge");
22
const fs = require("fs");
3-
const path = require("path")
43
const c = require("../utils/constants");
54

65
/**
@@ -208,17 +207,17 @@ module.exports.getPrivateKey = function (config) {
208207
);
209208
}
210209

211-
return getUnencryptedPrivateKey(config.keyStore)
210+
return getUnencryptedPrivateKey(config.keyStore);
212211
}
213212

214213
return null;
215214
};
216215

217216
function getUnencryptedPrivateKey(filePath) {
218-
const fileContent = fs.readFileSync(filePath)
217+
const fileContent = fs.readFileSync(filePath);
219218

220219
if (!fileContent || fileContent.length < 1) {
221-
throw new Error("private key file content is empty")
220+
throw new Error("private key file content is empty");
222221
}
223222

224223
// key is PEM
@@ -333,6 +332,8 @@ module.exports.checkConfigFieldsArePopulated = function(config, propertiesBasic,
333332
return config[elem] !== null && typeof config[elem] !== "undefined";
334333
});
335334
};
335+
336+
// eslint-disable-next-line eqeqeq
336337
if (typeof config !== "object" || config == null) {
337338
throw Error("Config not valid: config should be an object.");
338339
}
@@ -445,11 +446,11 @@ module.exports.readPublicCertificateContent = function (config) {
445446
throw new Error("Public certificate content is not valid");
446447
}
447448
return forge.pki.certificateFromPem(config.encryptionCertificate);
448-
}
449+
};
449450

450451
module.exports.getPrivateKeyFromContent = function(config) {
451452
if (config.privateKey) {
452453
return forge.pki.privateKeyFromPem(config.privateKey);
453454
}
454455
return null;
455-
}
456+
};

0 commit comments

Comments
 (0)