From 828444aadc8d6027786c9ae5d009eefb8f209267 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Tue, 31 Mar 2020 12:32:57 +1100 Subject: [PATCH] Linting --- app/password_util.js | 1 - js/modules/debuglogs.js | 4 ++-- js/modules/privacy.js | 4 ++-- main.js | 1 - stylesheets/_theme_dark.scss | 1 - test/modules/privacy_test.js | 4 ++-- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/password_util.js b/app/password_util.js index d2bf73c20..915f017fe 100644 --- a/app/password_util.js +++ b/app/password_util.js @@ -35,7 +35,6 @@ const validatePassword = (phrase, i18n) => { return null; }; - module.exports = { generateHash, matchesHash, diff --git a/js/modules/debuglogs.js b/js/modules/debuglogs.js index 66fd6252b..bea65a431 100644 --- a/js/modules/debuglogs.js +++ b/js/modules/debuglogs.js @@ -12,7 +12,7 @@ const USER_AGENT = `Session ${VERSION}`; exports.upload = async content => { const signedForm = await fetch(BASE_URL, { headers: { - 'user-agent': USER_AGENT, + 'user-agent': USER_AGENT, }, }); const json = await signedForm.json(); @@ -45,7 +45,7 @@ exports.upload = async content => { const { status } = result; if (status !== 204) { - throw new Error(`Failed to upload to S3, got status ${status}`) + throw new Error(`Failed to upload to S3, got status ${status}`); } return `${BASE_URL}/${fields.key}`; diff --git a/js/modules/privacy.js b/js/modules/privacy.js index 21bdc6e66..1720b7420 100644 --- a/js/modules/privacy.js +++ b/js/modules/privacy.js @@ -7,7 +7,7 @@ const { compose } = require('lodash/fp'); const { escapeRegExp } = require('lodash'); const APP_ROOT_PATH = path.join(__dirname, '..', '..', '..'); -const SESSION_ID_PATTERN = /\b(05[0-9a-f]{64})\b/gi +const SESSION_ID_PATTERN = /\b(05[0-9a-f]{64})\b/gi; const GROUP_ID_PATTERN = /(group\()([^)]+)(\))/g; const REDACTION_PLACEHOLDER = '[REDACTED]'; @@ -62,7 +62,7 @@ exports.redactSessionID = text => { } return text.replace(SESSION_ID_PATTERN, REDACTION_PLACEHOLDER); -} +}; // redactGroupIds :: String -> String exports.redactGroupIds = text => { diff --git a/main.js b/main.js index addf453f7..1990461fa 100644 --- a/main.js +++ b/main.js @@ -612,7 +612,6 @@ function showAbout() { let debugLogWindow; async function showDebugLogWindow() { - if (debugLogWindow) { debugLogWindow.show(); return; diff --git a/stylesheets/_theme_dark.scss b/stylesheets/_theme_dark.scss index b291bb442..6ff2f4e76 100644 --- a/stylesheets/_theme_dark.scss +++ b/stylesheets/_theme_dark.scss @@ -1670,7 +1670,6 @@ body.dark-theme { // _options - // _progress // Not sure we need to change anything there - it's blue diff --git a/test/modules/privacy_test.js b/test/modules/privacy_test.js index 1f91fbdeb..e51959f6a 100644 --- a/test/modules/privacy_test.js +++ b/test/modules/privacy_test.js @@ -22,8 +22,8 @@ describe('Privacy', () => { it('should not redact non session IDS', () => { const text = - 'This is a log line with a non-session ID sadsad0531032fc7415b7cc1b7516480ad121d391eddce3cfb2cee27dd5b215609c32827888\n' + - 'and another one 766049a70e725ad02f7fe61b10e461380a4d7433f98096b3cacbf0362d5cab6234'; + 'This is a log line with a non-session ID sadsad0531032fc7415b7cc1b7516480ad121d391eddce3cfb2cee27dd5b215609c32827888\n' + + 'and another one 766049a70e725ad02f7fe61b10e461380a4d7433f98096b3cacbf0362d5cab6234'; const actual = Privacy.redactSessionID(text); assert.equal(actual, text);