From c8211f28982b7d8857d79b9d19785ba5b744d17c Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 21 Feb 2022 00:36:14 -0500 Subject: [PATCH] lint: Run `eslint --fix` --- src/node/handler/APIHandler.js | 26 +++++++++---------- src/node/handler/PadMessageHandler.js | 2 +- src/node/hooks/express/specialpages.js | 2 +- src/node/utils/ExportHtml.js | 2 +- src/node/utils/toolbar.js | 6 ++--- src/static/js/ace2_inner.js | 2 +- .../frontend/specs/adminupdateplugins.js | 2 +- src/tests/frontend/specs/change_user_color.js | 2 +- .../frontend/specs/easysync-mutations.js | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/node/handler/APIHandler.js b/src/node/handler/APIHandler.js index 9807c2ce..66460c1a 100644 --- a/src/node/handler/APIHandler.js +++ b/src/node/handler/APIHandler.js @@ -73,65 +73,65 @@ version['1'] = Object.assign({}, setPublicStatus: ['padID', 'publicStatus'], getPublicStatus: ['padID'], listAuthorsOfPad: ['padID'], - padUsersCount: ['padID']} + padUsersCount: ['padID']}, ); version['1.1'] = Object.assign({}, version['1'], {getAuthorName: ['authorID'], padUsers: ['padID'], sendClientsMessage: ['padID', 'msg'], - listAllGroups: []} + listAllGroups: []}, ); version['1.2'] = Object.assign({}, version['1.1'], - {checkToken: []} + {checkToken: []}, ); version['1.2.1'] = Object.assign({}, version['1.2'], - {listAllPads: []} + {listAllPads: []}, ); version['1.2.7'] = Object.assign({}, version['1.2.1'], {createDiffHTML: ['padID', 'startRev', 'endRev'], getChatHistory: ['padID', 'start', 'end'], - getChatHead: ['padID']} + getChatHead: ['padID']}, ); version['1.2.8'] = Object.assign({}, version['1.2.7'], {getAttributePool: ['padID'], - getRevisionChangeset: ['padID', 'rev']} + getRevisionChangeset: ['padID', 'rev']}, ); version['1.2.9'] = Object.assign({}, version['1.2.8'], {copyPad: ['sourceID', 'destinationID', 'force'], - movePad: ['sourceID', 'destinationID', 'force']} + movePad: ['sourceID', 'destinationID', 'force']}, ); version['1.2.10'] = Object.assign({}, version['1.2.9'], - {getPadID: ['roID']} + {getPadID: ['roID']}, ); version['1.2.11'] = Object.assign({}, version['1.2.10'], {getSavedRevisionsCount: ['padID'], listSavedRevisions: ['padID'], saveRevision: ['padID', 'rev'], - restoreRevision: ['padID', 'rev']} + restoreRevision: ['padID', 'rev']}, ); version['1.2.12'] = Object.assign({}, version['1.2.11'], - {appendChatMessage: ['padID', 'text', 'authorID', 'time']} + {appendChatMessage: ['padID', 'text', 'authorID', 'time']}, ); version['1.2.13'] = Object.assign({}, version['1.2.12'], - {appendText: ['padID', 'text']} + {appendText: ['padID', 'text']}, ); version['1.2.14'] = Object.assign({}, version['1.2.13'], - {getStats: []} + {getStats: []}, ); version['1.2.15'] = Object.assign({}, version['1.2.14'], - {copyPadWithoutHistory: ['sourceID', 'destinationID', 'force']} + {copyPadWithoutHistory: ['sourceID', 'destinationID', 'force']}, ); version['1.3.0'] = { diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index cdc20309..c7ee1973 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -1287,7 +1287,7 @@ const composePadChangesets = async (padId, startNum, endNum) => { const changesets = {}; await Promise.all(changesetsNeeded.map( (revNum) => pad.getRevisionChangeset(revNum) - .then((changeset) => changesets[revNum] = changeset) + .then((changeset) => changesets[revNum] = changeset), )); // compose Changesets diff --git a/src/node/hooks/express/specialpages.js b/src/node/hooks/express/specialpages.js index e0a2e681..3c5dfcf7 100644 --- a/src/node/hooks/express/specialpages.js +++ b/src/node/hooks/express/specialpages.js @@ -36,7 +36,7 @@ exports.expressPreSession = async (hookName, {app}) => { 'static', 'skins', settings.skinName, - 'robots.txt' + 'robots.txt', ); res.sendFile(filePath, (err) => { // there is no custom robots.txt, send the default robots.txt which dissallows all diff --git a/src/node/utils/ExportHtml.js b/src/node/utils/ExportHtml.js index 3d5f4cc7..97a483fc 100644 --- a/src/node/utils/ExportHtml.js +++ b/src/node/utils/ExportHtml.js @@ -316,7 +316,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => { if ((!prevLine || prevLine.listLevel !== line.listLevel) || (line.listTypeName !== prevLine.listTypeName)) { const exists = _.find(openLists, (item) => ( - item.level === line.listLevel && item.type === line.listTypeName) + item.level === line.listLevel && item.type === line.listTypeName), ); if (!exists) { let prevLevel = 0; diff --git a/src/node/utils/toolbar.js b/src/node/utils/toolbar.js index 3e435d28..037318cf 100644 --- a/src/node/utils/toolbar.js +++ b/src/node/utils/toolbar.js @@ -103,8 +103,8 @@ _.extend(Button.prototype, { tag('button', { 'class': ` ${this.attributes.class}`, 'data-l10n-id': this.attributes.localizationId, - }) - ) + }), + ), ); }, }); @@ -145,7 +145,7 @@ _.extend(SelectButton.prototype, Button.prototype, { 'data-type': 'select', }; return tag('li', attributes, - this.select({id: this.attributes.selectId}) + this.select({id: this.attributes.selectId}), ); }, }); diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 77912057..785473df 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -1855,7 +1855,7 @@ function Ace2Inner(editorInfo, cssManagers) { }; const analyzeChange = ( - oldText, newText, oldAttribs, newAttribs, optSelStartHint, optSelEndHint) => { + oldText, newText, oldAttribs, newAttribs, optSelStartHint, optSelEndHint) => { // we need to take into account both the styles attributes & attributes defined by // the plugins, so basically we can ignore only the default line attribs used by // Etherpad diff --git a/src/tests/frontend/specs/adminupdateplugins.js b/src/tests/frontend/specs/adminupdateplugins.js index 7ab47285..8381e5dc 100755 --- a/src/tests/frontend/specs/adminupdateplugins.js +++ b/src/tests/frontend/specs/adminupdateplugins.js @@ -65,7 +65,7 @@ describe('Plugins page', function () { // Ensure it's a higher minor version IE 0.3.x as 0.2.x was installed // Coverage for https://github.com/ether/etherpad-lite/issues/4536 await helper.waitForPromise(() => parseInt(helper.admin$( - '.ep_align .version' + '.ep_align .version', ) .text() .split('.')[1]) > minorVersionBefore, 60000, 1000); diff --git a/src/tests/frontend/specs/change_user_color.js b/src/tests/frontend/specs/change_user_color.js index e39dc52e..4c2ad2f2 100644 --- a/src/tests/frontend/specs/change_user_color.js +++ b/src/tests/frontend/specs/change_user_color.js @@ -92,7 +92,7 @@ describe('change user color', function () { $chatInput.sendkeys('{enter}'); // wait until the chat message shows up - helper.waitFor(() => chrome$('#chattext').children('p').length !== 0 + helper.waitFor(() => chrome$('#chattext').children('p').length !== 0, ).done(() => { const $firstChatMessage = chrome$('#chattext').children('p'); // expect the first chat message to be of the user's color diff --git a/src/tests/frontend/specs/easysync-mutations.js b/src/tests/frontend/specs/easysync-mutations.js index 06aa63da..f293fc8e 100644 --- a/src/tests/frontend/specs/easysync-mutations.js +++ b/src/tests/frontend/specs/easysync-mutations.js @@ -227,7 +227,7 @@ describe('easysync-mutations', function () { // turn 123\n 456\n 789\n into 123\n 456\n 789\n runMutateAttributionTest(1, - ['bold,true'], 'Z:c>0|1=4=1*0=1$', ['|1+4', '|1+4', '|1+4'], ['|1+4', '+1*0+1|1+2', '|1+4'] + ['bold,true'], 'Z:c>0|1=4=1*0=1$', ['|1+4', '|1+4', '|1+4'], ['|1+4', '+1*0+1|1+2', '|1+4'], ); // make a document bold