diff --git a/.eslintrc.js b/.eslintrc.js
index a9459faab..55286c224 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -15,6 +15,12 @@ const rules = {
},
],
+ // Overrides recommended by typescript-eslint
+ // https://github.com/typescript-eslint/typescript-eslint/releases/tag/v4.0.0
+ '@typescript-eslint/no-redeclare': 'error',
+ '@typescript-eslint/no-shadow': 'error',
+ 'no-shadow': 'off',
+
// prevents us from accidentally checking in exclusive tests (`.only`):
'mocha/no-exclusive-tests': 'error',
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 0c6c49ab8..59888c7b9 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -13,11 +13,11 @@ Lastly, be sure to preview your issue before saving. Thanks!
-->
- [ ] I have searched open and closed issues for duplicates
-
+
---
diff --git a/.prettierrc.js b/.prettierrc.js
index 9fd82ac99..26000173a 100644
--- a/.prettierrc.js
+++ b/.prettierrc.js
@@ -3,5 +3,6 @@
module.exports = {
singleQuote: true,
+ arrowParens: 'avoid',
trailingComma: 'es5',
};
diff --git a/js/database.js b/js/database.js
index b1d1ba09d..d48616add 100644
--- a/js/database.js
+++ b/js/database.js
@@ -4,7 +4,7 @@
/* global Whisper: false */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
window.Whisper.Database = window.Whisper.Database || {};
window.Whisper.Database.id = window.Whisper.Database.id || 'signal';
diff --git a/js/deletes.js b/js/deletes.js
index 8dabd01a8..dfbfa0870 100644
--- a/js/deletes.js
+++ b/js/deletes.js
@@ -11,7 +11,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.Deletes = new (Backbone.Collection.extend({
forMessage(message) {
diff --git a/js/delivery_receipts.js b/js/delivery_receipts.js
index e04031cd4..44be4b5e5 100644
--- a/js/delivery_receipts.js
+++ b/js/delivery_receipts.js
@@ -12,7 +12,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.DeliveryReceipts = new (Backbone.Collection.extend({
diff --git a/js/expiring_messages.js b/js/expiring_messages.js
index 95f177f01..5618ca5f2 100644
--- a/js/expiring_messages.js
+++ b/js/expiring_messages.js
@@ -8,7 +8,7 @@
*/
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
async function destroyExpiredMessages() {
diff --git a/js/expiring_tap_to_view_messages.js b/js/expiring_tap_to_view_messages.js
index 37e37e69c..52ff70ea8 100644
--- a/js/expiring_tap_to_view_messages.js
+++ b/js/expiring_tap_to_view_messages.js
@@ -8,7 +8,7 @@
*/
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
async function eraseTapToViewMessages() {
diff --git a/js/keychange_listener.js b/js/keychange_listener.js
index 273960c6f..84053e6f9 100644
--- a/js/keychange_listener.js
+++ b/js/keychange_listener.js
@@ -6,7 +6,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.KeyChangeListener = {
diff --git a/js/libphonenumber-util.js b/js/libphonenumber-util.js
index 49e1801e6..57e4155cc 100644
--- a/js/libphonenumber-util.js
+++ b/js/libphonenumber-util.js
@@ -1,7 +1,7 @@
// Copyright 2014-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
-(function() {
+(function () {
'use strict';
/*
@@ -12,7 +12,7 @@
window.libphonenumber = window.libphonenumber || {};
window.libphonenumber.util = {
- getRegionCodeForNumber: function(number) {
+ getRegionCodeForNumber: function (number) {
try {
var parsedNumber = libphonenumber.parse(number);
return libphonenumber.getRegionCodeForNumber(parsedNumber);
@@ -21,7 +21,7 @@
}
},
- splitCountryCode: function(number) {
+ splitCountryCode: function (number) {
var parsedNumber = libphonenumber.parse(number);
return {
country_code: parsedNumber.values_[1],
@@ -29,12 +29,12 @@
};
},
- getCountryCode: function(regionCode) {
+ getCountryCode: function (regionCode) {
var cc = libphonenumber.getCountryCodeForRegion(regionCode);
return cc !== 0 ? cc : '';
},
- parseNumber: function(number, defaultRegionCode) {
+ parseNumber: function (number, defaultRegionCode) {
try {
var parsedNumber = libphonenumber.parse(number, defaultRegionCode);
@@ -53,7 +53,7 @@
}
},
- getAllRegionCodes: function() {
+ getAllRegionCodes: function () {
return {
AD: 'Andorra',
AE: 'United Arab Emirates',
diff --git a/js/message_controller.js b/js/message_controller.js
index 9db7e4e85..c42933b50 100644
--- a/js/message_controller.js
+++ b/js/message_controller.js
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
const messageLookup = Object.create(null);
diff --git a/js/message_requests.js b/js/message_requests.js
index 55c5753b3..60873b8b6 100644
--- a/js/message_requests.js
+++ b/js/message_requests.js
@@ -10,7 +10,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.MessageRequests = new (Backbone.Collection.extend({
forConversation(conversation) {
diff --git a/js/models/blockedNumbers.js b/js/models/blockedNumbers.js
index 979dabb39..a06b0ecca 100644
--- a/js/models/blockedNumbers.js
+++ b/js/models/blockedNumbers.js
@@ -4,7 +4,7 @@
/* global storage, _ */
// eslint-disable-next-line func-names
-(function() {
+(function () {
const BLOCKED_NUMBERS_ID = 'blocked';
const BLOCKED_UUIDS_ID = 'blocked-uuids';
const BLOCKED_GROUPS_ID = 'blocked-groups';
diff --git a/js/modules/attachment_downloads.js b/js/modules/attachment_downloads.js
index 823f00081..01936bf83 100644
--- a/js/modules/attachment_downloads.js
+++ b/js/modules/attachment_downloads.js
@@ -199,8 +199,9 @@ async function _runJob(job) {
logger.warn(
`_runJob: Got 404 from server for CDN ${
attachment.cdnNumber
- }, marking attachment ${attachment.cdnId ||
- attachment.cdnKey} from message ${message.idForLogging()} as permanent error`
+ }, marking attachment ${
+ attachment.cdnId || attachment.cdnKey
+ } from message ${message.idForLogging()} as permanent error`
);
await _finishJob(message, id);
diff --git a/js/notifications.js b/js/notifications.js
index 626922f1b..72c3dc050 100644
--- a/js/notifications.js
+++ b/js/notifications.js
@@ -11,7 +11,7 @@
/* global _: false */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
// The keys and values don't match here. This is because the values correspond to old
diff --git a/js/reactions.js b/js/reactions.js
index 4d9791c3a..fd1d04f52 100644
--- a/js/reactions.js
+++ b/js/reactions.js
@@ -11,7 +11,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.Reactions = new (Backbone.Collection.extend({
forMessage(message) {
diff --git a/js/read_receipts.js b/js/read_receipts.js
index 8d3dc4595..0f1b17328 100644
--- a/js/read_receipts.js
+++ b/js/read_receipts.js
@@ -12,7 +12,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.ReadReceipts = new (Backbone.Collection.extend({
forMessage(conversation, message) {
diff --git a/js/read_syncs.js b/js/read_syncs.js
index 8c5df2d79..ca76472f5 100644
--- a/js/read_syncs.js
+++ b/js/read_syncs.js
@@ -10,7 +10,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.ReadSyncs = new (Backbone.Collection.extend({
forMessage(message) {
diff --git a/js/reliable_trigger.js b/js/reliable_trigger.js
index b9fcbeae6..4e3c79e8a 100644
--- a/js/reliable_trigger.js
+++ b/js/reliable_trigger.js
@@ -6,7 +6,7 @@
// This file was taken from Backbone and then modified. It does not conform to this
// project's standards.
-(function() {
+(function () {
'use strict';
// Note: this is all the code required to customize Backbone's trigger() method to make
@@ -32,7 +32,7 @@
// Implement fancy features of the Events API such as multiple event
// names `"change blur"` and jQuery-style event maps `{change: action}`
// in terms of the existing API.
- const eventsApi = function(obj, action, name, rest) {
+ const eventsApi = function (obj, action, name, rest) {
if (!name) return true;
// Handle event maps.
@@ -58,14 +58,14 @@
// A difficult-to-believe, but optimized internal dispatch function for
// triggering events. Tries to keep the usual cases speedy (most internal
// Backbone events have 3 arguments).
- const triggerEvents = function(events, name, args) {
+ const triggerEvents = function (events, name, args) {
let ev,
i = -1,
l = events.length,
a1 = args[0],
a2 = args[1],
a3 = args[2];
- const logError = function(error) {
+ const logError = function (error) {
window.log.error(
'Model caught error triggering',
name,
diff --git a/js/rotate_signed_prekey_listener.js b/js/rotate_signed_prekey_listener.js
index c49d2f109..4589cc543 100644
--- a/js/rotate_signed_prekey_listener.js
+++ b/js/rotate_signed_prekey_listener.js
@@ -4,7 +4,7 @@
/* global Whisper, storage, getAccountManager */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
const ROTATION_INTERVAL = 48 * 60 * 60 * 1000;
let timeout;
diff --git a/js/signal_protocol_store.js b/js/signal_protocol_store.js
index 840b4c5c2..792d4dd80 100644
--- a/js/signal_protocol_store.js
+++ b/js/signal_protocol_store.js
@@ -7,7 +7,7 @@
/* eslint-disable no-proto */
// eslint-disable-next-line func-names
-(function() {
+(function () {
const TIMESTAMP_THRESHOLD = 5 * 1000; // 5 seconds
const Direction = {
SENDING: 1,
diff --git a/js/storage.js b/js/storage.js
index f4417c2b9..47eb94b4b 100644
--- a/js/storage.js
+++ b/js/storage.js
@@ -5,7 +5,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
let ready = false;
diff --git a/js/view_syncs.js b/js/view_syncs.js
index e21540afd..4346234e3 100644
--- a/js/view_syncs.js
+++ b/js/view_syncs.js
@@ -10,7 +10,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.ViewSyncs = new (Backbone.Collection.extend({
forMessage(message) {
diff --git a/js/views/app_view.js b/js/views/app_view.js
index e5b55b0f9..bf12e61f6 100644
--- a/js/views/app_view.js
+++ b/js/views/app_view.js
@@ -6,7 +6,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
function resolveTheme() {
diff --git a/js/views/banner_view.js b/js/views/banner_view.js
index c75197fae..70eea630b 100644
--- a/js/views/banner_view.js
+++ b/js/views/banner_view.js
@@ -4,7 +4,7 @@
/* global Whisper */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.BannerView = Whisper.View.extend({
diff --git a/js/views/clear_data_view.js b/js/views/clear_data_view.js
index ff6313c85..ebdae23e4 100644
--- a/js/views/clear_data_view.js
+++ b/js/views/clear_data_view.js
@@ -7,7 +7,7 @@
/* eslint-disable no-new */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
const { Logs } = window.Signal;
diff --git a/js/views/confirmation_dialog_view.js b/js/views/confirmation_dialog_view.js
index b40f83502..4a95637de 100644
--- a/js/views/confirmation_dialog_view.js
+++ b/js/views/confirmation_dialog_view.js
@@ -4,7 +4,7 @@
/* global Backbone, Whisper, i18n */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.ConfirmationDialogView = Whisper.View.extend({
diff --git a/js/views/contact_list_view.js b/js/views/contact_list_view.js
index 9af1cc658..fdbe5d2b6 100644
--- a/js/views/contact_list_view.js
+++ b/js/views/contact_list_view.js
@@ -5,7 +5,7 @@
/* global textsecure: false */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.ContactListView = Whisper.ListView.extend({
diff --git a/js/views/debug_log_view.js b/js/views/debug_log_view.js
index 8ae526a55..519091156 100644
--- a/js/views/debug_log_view.js
+++ b/js/views/debug_log_view.js
@@ -5,7 +5,7 @@
/* global Whisper: false */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.LinkedCopiedToast = Whisper.ToastView.extend({
@@ -80,9 +80,7 @@
});
this.$('.loading').removeClass('loading');
view.render();
- this.$('.link')
- .focus()
- .select();
+ this.$('.link').focus().select();
} catch (error) {
window.log.error(
'DebugLogView error:',
diff --git a/js/views/group_member_list_view.js b/js/views/group_member_list_view.js
index fd080f625..d0c75b616 100644
--- a/js/views/group_member_list_view.js
+++ b/js/views/group_member_list_view.js
@@ -4,7 +4,7 @@
/* global Whisper, i18n */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
// TODO: take a title string which could replace the 'members' header
diff --git a/js/views/identicon_svg_view.js b/js/views/identicon_svg_view.js
index c6f6f9394..60b51999d 100644
--- a/js/views/identicon_svg_view.js
+++ b/js/views/identicon_svg_view.js
@@ -4,7 +4,7 @@
/* global Whisper, loadImage */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
/*
diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js
index 66bdb5e09..535a24190 100644
--- a/js/views/inbox_view.js
+++ b/js/views/inbox_view.js
@@ -9,7 +9,7 @@
*/
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.StickerPackInstallFailedToast = Whisper.ToastView.extend({
diff --git a/js/views/install_view.js b/js/views/install_view.js
index 19737d384..221ccb888 100644
--- a/js/views/install_view.js
+++ b/js/views/install_view.js
@@ -6,7 +6,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
const Steps = {
diff --git a/js/views/key_verification_view.js b/js/views/key_verification_view.js
index ad0c89682..116f3cce9 100644
--- a/js/views/key_verification_view.js
+++ b/js/views/key_verification_view.js
@@ -6,7 +6,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.KeyVerificationPanelView = Whisper.View.extend({
diff --git a/js/views/list_view.js b/js/views/list_view.js
index 7ae52e43a..b546ce89a 100644
--- a/js/views/list_view.js
+++ b/js/views/list_view.js
@@ -4,7 +4,7 @@
/* global Backbone, Whisper, _ */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
/*
diff --git a/js/views/phone-input-view.js b/js/views/phone-input-view.js
index 6c9c738dc..8e185fcc9 100644
--- a/js/views/phone-input-view.js
+++ b/js/views/phone-input-view.js
@@ -4,7 +4,7 @@
/* global libphonenumber, Whisper */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.PhoneInputView = Whisper.View.extend({
diff --git a/js/views/react_wrapper_view.js b/js/views/react_wrapper_view.js
index a672da667..58a614fe7 100644
--- a/js/views/react_wrapper_view.js
+++ b/js/views/react_wrapper_view.js
@@ -7,7 +7,7 @@
/* global ReactDOM: false */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
window.Whisper.ReactWrapperView = Backbone.View.extend({
diff --git a/js/views/recorder_view.js b/js/views/recorder_view.js
index f7b485dad..b481da405 100644
--- a/js/views/recorder_view.js
+++ b/js/views/recorder_view.js
@@ -6,7 +6,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.RecorderView = Whisper.View.extend({
diff --git a/js/views/safety_number_change_dialog_view.js b/js/views/safety_number_change_dialog_view.js
index c37607e45..64ff82001 100644
--- a/js/views/safety_number_change_dialog_view.js
+++ b/js/views/safety_number_change_dialog_view.js
@@ -4,7 +4,7 @@
/* global Whisper, Signal */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.SafetyNumberChangeDialogView = Whisper.View.extend({
diff --git a/js/views/settings_view.js b/js/views/settings_view.js
index f86d8165f..d5eff2de3 100644
--- a/js/views/settings_view.js
+++ b/js/views/settings_view.js
@@ -8,7 +8,7 @@
/* eslint-disable no-new */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
const { Settings } = window.Signal.Types;
diff --git a/js/views/standalone_registration_view.js b/js/views/standalone_registration_view.js
index 98308c350..3df07054c 100644
--- a/js/views/standalone_registration_view.js
+++ b/js/views/standalone_registration_view.js
@@ -6,7 +6,7 @@
/* eslint-disable more/no-then */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.StandaloneRegistrationView = Whisper.View.extend({
@@ -37,9 +37,7 @@
},
verifyCode() {
const number = this.phoneView.validateNumber();
- const verificationCode = $('#code')
- .val()
- .replace(/\D+/g, '');
+ const verificationCode = $('#code').val().replace(/\D+/g, '');
this.accountManager
.registerSingleDevice(number, verificationCode)
@@ -53,9 +51,7 @@
this.$('#status').text(s);
},
validateCode() {
- const verificationCode = $('#code')
- .val()
- .replace(/\D/g, '');
+ const verificationCode = $('#code').val().replace(/\D/g, '');
if (verificationCode.length === 6) {
return verificationCode;
@@ -64,11 +60,7 @@
return null;
},
displayError(error) {
- this.$('#error')
- .hide()
- .text(error)
- .addClass('in')
- .fadeIn();
+ this.$('#error').hide().text(error).addClass('in').fadeIn();
},
onValidation() {
if (this.$('#number-container').hasClass('valid')) {
@@ -92,9 +84,7 @@
this.accountManager
.requestVoiceVerification(number)
.catch(this.displayError.bind(this));
- this.$('#step2')
- .addClass('in')
- .fadeIn();
+ this.$('#step2').addClass('in').fadeIn();
} else {
this.$('#number-container').addClass('invalid');
}
@@ -107,9 +97,7 @@
this.accountManager
.requestSMSVerification(number)
.catch(this.displayError.bind(this));
- this.$('#step2')
- .addClass('in')
- .fadeIn();
+ this.$('#step2').addClass('in').fadeIn();
} else {
this.$('#number-container').addClass('invalid');
}
diff --git a/js/views/toast_view.js b/js/views/toast_view.js
index be7e72185..51e14a213 100644
--- a/js/views/toast_view.js
+++ b/js/views/toast_view.js
@@ -4,7 +4,7 @@
/* global Whisper, Mustache, _ */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.ToastView = Whisper.View.extend({
diff --git a/js/views/whisper_view.js b/js/views/whisper_view.js
index 20bcabd82..1388b69c6 100644
--- a/js/views/whisper_view.js
+++ b/js/views/whisper_view.js
@@ -24,7 +24,7 @@
*/
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
Whisper.View = Backbone.View.extend(
diff --git a/js/wall_clock_listener.js b/js/wall_clock_listener.js
index 7936d4d43..4b4bf63b7 100644
--- a/js/wall_clock_listener.js
+++ b/js/wall_clock_listener.js
@@ -4,7 +4,7 @@
/* global Whisper */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.Whisper = window.Whisper || {};
let lastTime;
diff --git a/libtextsecure/protobufs.js b/libtextsecure/protobufs.js
index 1c0a910a2..5b6d57dc5 100644
--- a/libtextsecure/protobufs.js
+++ b/libtextsecure/protobufs.js
@@ -4,7 +4,7 @@
/* global window, dcodeIO, textsecure */
// eslint-disable-next-line func-names
-(function() {
+(function () {
const FILES_TO_LOAD = [
'SignalService.proto',
'SignalStorage.proto',
diff --git a/libtextsecure/protocol_wrapper.js b/libtextsecure/protocol_wrapper.js
index 4ab35a0c0..559a3ee42 100644
--- a/libtextsecure/protocol_wrapper.js
+++ b/libtextsecure/protocol_wrapper.js
@@ -4,7 +4,7 @@
/* global window, textsecure, SignalProtocolStore, libsignal */
// eslint-disable-next-line func-names
-(function() {
+(function () {
window.textsecure = window.textsecure || {};
window.textsecure.storage = window.textsecure.storage || {};
diff --git a/libtextsecure/storage/unprocessed.js b/libtextsecure/storage/unprocessed.js
index 97448b922..60645c97e 100644
--- a/libtextsecure/storage/unprocessed.js
+++ b/libtextsecure/storage/unprocessed.js
@@ -4,7 +4,7 @@
/* global window, textsecure */
// eslint-disable-next-line func-names
-(function() {
+(function () {
/** ***************************************
*** Not-yet-processed message storage ***
**************************************** */
diff --git a/libtextsecure/storage/user.js b/libtextsecure/storage/user.js
index 00e2533ed..3a6aa7f3e 100644
--- a/libtextsecure/storage/user.js
+++ b/libtextsecure/storage/user.js
@@ -4,7 +4,7 @@
/* global textsecure, window */
// eslint-disable-next-line func-names
-(function() {
+(function () {
/** *******************************************
*** Utilities to store data about the user ***
********************************************* */
diff --git a/package.json b/package.json
index cd2806b8f..137374b4b 100644
--- a/package.json
+++ b/package.json
@@ -206,8 +206,8 @@
"@types/webpack": "4.39.0",
"@types/webpack-dev-server": "3.1.7",
"@types/websocket": "1.0.0",
- "@typescript-eslint/eslint-plugin": "3.10.1",
- "@typescript-eslint/parser": "3.10.1",
+ "@typescript-eslint/eslint-plugin": "4.8.1",
+ "@typescript-eslint/parser": "4.8.1",
"arraybuffer-loader": "1.0.3",
"asar": "0.14.0",
"babel-core": "7.0.0-bridge.0",
@@ -246,7 +246,7 @@
"npm-run-all": "4.1.5",
"nyc": "11.4.1",
"patch-package": "6.1.2",
- "prettier": "1.19.1",
+ "prettier": "2.1.2",
"react-docgen-typescript": "1.2.6",
"sass-loader": "7.2.0",
"sinon": "9.2.0",
@@ -256,7 +256,7 @@
"ts-loader": "4.1.0",
"ts-node": "8.3.0",
"typed-scss-modules": "0.0.11",
- "typescript": "3.7.4",
+ "typescript": "3.8.3",
"webpack": "4.39.2",
"webpack-cli": "3.3.7",
"webpack-dev-server": "3.8.0"
diff --git a/preload.js b/preload.js
index 456396ab0..414a01de9 100644
--- a/preload.js
+++ b/preload.js
@@ -367,8 +367,8 @@ try {
directoryEnclaveId: config.directoryEnclaveId,
directoryTrustAnchor: config.directoryTrustAnchor,
cdnUrlObject: {
- '0': config.cdnUrl0,
- '2': config.cdnUrl2,
+ 0: config.cdnUrl0,
+ 2: config.cdnUrl2,
},
certificateAuthority: config.certificateAuthority,
contentProxyUrl: config.contentProxyUrl,
diff --git a/sticker-creator/components/StickerFrame.tsx b/sticker-creator/components/StickerFrame.tsx
index 5e86ee48e..5b7dfbf1d 100644
--- a/sticker-creator/components/StickerFrame.tsx
+++ b/sticker-creator/components/StickerFrame.tsx
@@ -188,14 +188,16 @@ export const StickerFrame = React.memo(
onMouseLeave={handleMouseLeave}
ref={rootRef}
>
- {// eslint-disable-next-line no-nested-ternary
- mode !== 'add' ? (
- image ? (
-