From f781458a2ff28ff5612548c39c4dcfa578313214 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 22 Apr 2021 16:00:37 +0200 Subject: [PATCH] Run prettier --- jsdoc-lib.json | 11 +++-------- src/claim.js | 2 +- src/fetcher/index.js | 2 +- src/fetcher/xmpp.js | 2 +- src/keys.js | 15 ++++++++++----- src/proofs.js | 2 +- src/signatures.js | 2 +- src/utils.js | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/jsdoc-lib.json b/jsdoc-lib.json index 5ea6458..7cea1d6 100644 --- a/jsdoc-lib.json +++ b/jsdoc-lib.json @@ -1,18 +1,13 @@ { "plugins": ["plugins/markdown"], "source": { - "include": [ - "./src", - "./README.md" - ] + "include": ["./src", "./README.md"] }, "recurseDepth": 2, "templates": { "default": { "staticFiles": { - "include": [ - "./static" - ] + "include": ["./static"] } } }, @@ -22,4 +17,4 @@ "docdash": { "search": true } -} \ No newline at end of file +} diff --git a/src/claim.js b/src/claim.js index cb26755..67845a9 100644 --- a/src/claim.js +++ b/src/claim.js @@ -65,7 +65,7 @@ class Claim { if (uri && !validUrl.isUri(uri)) { throw new Error('Invalid URI') } - + // Verify validity of fingerprint if (fingerprint) { try { diff --git a/src/fetcher/index.js b/src/fetcher/index.js index be3604a..9d71e14 100644 --- a/src/fetcher/index.js +++ b/src/fetcher/index.js @@ -20,4 +20,4 @@ exports.http = require('./http') exports.irc = require('./irc') exports.matrix = require('./matrix') exports.twitter = require('./twitter') -exports.xmpp = require('./xmpp') \ No newline at end of file +exports.xmpp = require('./xmpp') diff --git a/src/fetcher/xmpp.js b/src/fetcher/xmpp.js index b0655dc..27ea6b3 100644 --- a/src/fetcher/xmpp.js +++ b/src/fetcher/xmpp.js @@ -58,7 +58,7 @@ const xmppStart = async (service, username, password) => { * @async * @param {object} data - Data used in the request * @param {string} data.id - The identifier of the targeted account - * @param {string} data.field - The vCard field to return (should be "note") + * @param {string} data.field - The vCard field to return (should be "note") * @param {object} opts - Options used to enable the request * @param {string} opts.claims.xmpp.service - The server hostname on which the library can log in * @param {string} opts.claims.xmpp.username - The username used to log in diff --git a/src/keys.js b/src/keys.js index 0edf9f4..c40acda 100644 --- a/src/keys.js +++ b/src/keys.js @@ -34,7 +34,7 @@ const Claim = require('./claim') * const key1 = doip.keys.fetchHKP('alice@domain.tld'); * const key2 = doip.keys.fetchHKP('123abc123abc'); */ - exports.fetchHKP = (identifier, keyserverDomain) => { +exports.fetchHKP = (identifier, keyserverDomain) => { return new Promise(async (resolve, reject) => { const keyserverBaseUrl = keyserverDomain ? `https://${keyserverDomain}` @@ -146,7 +146,7 @@ exports.fetchKeybase = (username, fingerprint) => { * @returns {openpgp.key.Key} * @example * const plainkey = `-----BEGIN PGP PUBLIC KEY BLOCK----- - * + * * mQINBF0mIsIBEADacleiyiV+z6FIunvLWrO6ZETxGNVpqM+WbBQKdW1BVrJBBolg * [...] * =6lib @@ -187,14 +187,19 @@ exports.fetchURI = (uri) => { switch (match[1]) { case 'hkp': resolve( - exports.fetchHKP(match[3] ? match[3] : match[2], match[3] ? match[2] : null) + exports.fetchHKP( + match[3] ? match[3] : match[2], + match[3] ? match[2] : null + ) ) break case 'wkd': resolve(exports.fetchWKD(match[2])) break case 'kb': - resolve(exports.fetchKeybase(match[2], match.length >= 4 ? match[3] : null)) + resolve( + exports.fetchKeybase(match[2], match.length >= 4 ? match[3] : null) + ) break default: reject('Invalid URI protocol') @@ -262,4 +267,4 @@ exports.process = (publicKey) => { }, }) }) -} \ No newline at end of file +} diff --git a/src/proofs.js b/src/proofs.js index 04c5b05..abc841f 100644 --- a/src/proofs.js +++ b/src/proofs.js @@ -19,7 +19,7 @@ const utils = require('./utils') const E = require('./enums') /** - * @module proofs + * @module proofs */ /** diff --git a/src/signatures.js b/src/signatures.js index f107f14..9dda8a3 100644 --- a/src/signatures.js +++ b/src/signatures.js @@ -18,7 +18,7 @@ const Claim = require('./claim') const keys = require('./keys') /** - * @module signatures + * @module signatures */ /** diff --git a/src/utils.js b/src/utils.js index 276a79a..0f0c5ab 100644 --- a/src/utils.js +++ b/src/utils.js @@ -17,7 +17,7 @@ const validator = require('validator') const E = require('./enums') /** - * @module utils + * @module utils */ /**