From 59c03bde20a7624d996a943f88b4025d6c92eb94 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 11 May 2021 15:44:50 -0400 Subject: [PATCH] lint: Re-run `eslint --fix` --- src/bin/plugins/stalePlugins.js | 6 +++--- src/node/db/AuthorManager.js | 2 +- src/node/hooks/express/webaccess.js | 2 +- src/node/utils/Settings.js | 2 +- src/tests/backend/specs/api/api.js | 1 - src/tests/frontend/specs/chat.js | 1 - 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/bin/plugins/stalePlugins.js b/src/bin/plugins/stalePlugins.js index 8b2427f27..7e1817c66 100644 --- a/src/bin/plugins/stalePlugins.js +++ b/src/bin/plugins/stalePlugins.js @@ -5,7 +5,7 @@ const superagent = require('superagent'); const currentTime = new Date(); -(async() => { +(async () => { const res = await superagent.get('https://static.etherpad.org/plugins.full.json'); const plugins = JSON.parse(res.text); for (const plugin of Object.keys(plugins)) { @@ -13,8 +13,8 @@ const currentTime = new Date(); const date = new Date(plugins[plugin].time); const diffTime = Math.abs(currentTime - date); const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); - if (diffDays > (365*2)) { - console.log(`${name}, ${plugins[plugin].data.maintainers[0].email}`) + if (diffDays > (365 * 2)) { + console.log(`${name}, ${plugins[plugin].data.maintainers[0].email}`); } } })(); diff --git a/src/node/db/AuthorManager.js b/src/node/db/AuthorManager.js index de868b97d..e457b7eb2 100644 --- a/src/node/db/AuthorManager.js +++ b/src/node/db/AuthorManager.js @@ -156,7 +156,7 @@ async function mapAuthorWithDBKey(mapperkey, mapper) { // return the author return {authorID: author}; -}; +} /** * Internal function that creates the database entry for an author diff --git a/src/node/hooks/express/webaccess.js b/src/node/hooks/express/webaccess.js index 99210d9c5..8a183681c 100644 --- a/src/node/hooks/express/webaccess.js +++ b/src/node/hooks/express/webaccess.js @@ -23,7 +23,7 @@ const staticPathsRE = new RegExp(`^/(?:${[ 'robots.txt', 'static/.*', 'stats/?', - 'tests/frontend(?:/.*)?' + 'tests/frontend(?:/.*)?', ].join('|')})$`); exports.normalizeAuthzLevel = (level) => { diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index b31cf16b4..38ac5bcea 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -602,7 +602,7 @@ const lookupEnvironmentVariables = (obj) => { const defaultValue = match[3]; if ((envVarValue === undefined) && (defaultValue === undefined)) { - console.warn(`Environment variable "${envVarName}" does not contain any value for `+ + console.warn(`Environment variable "${envVarName}" does not contain any value for ` + `configuration key "${key}", and no default was given. Returning null.`); /* diff --git a/src/tests/backend/specs/api/api.js b/src/tests/backend/specs/api/api.js index d05a9989d..1415795b2 100644 --- a/src/tests/backend/specs/api/api.js +++ b/src/tests/backend/specs/api/api.js @@ -55,5 +55,4 @@ describe(__filename, function () { } }); }); - }); diff --git a/src/tests/frontend/specs/chat.js b/src/tests/frontend/specs/chat.js index f471c4479..3b1eaebf3 100644 --- a/src/tests/frontend/specs/chat.js +++ b/src/tests/frontend/specs/chat.js @@ -87,7 +87,6 @@ describe('Chat messages and UI', function () { xit('Checks showChat=false URL Parameter hides chat then' + ' when removed it shows chat', async function () { - // give it a second to save the username on the server side await new Promise((resolve) => setTimeout(resolve, 3000));