Update TypeScript, Prettier and typescript-eslint for new TypeScript 3.8 syntax
This commit is contained in:
parent
5758ed44ac
commit
26884432a2
65 changed files with 286 additions and 185 deletions
|
@ -6,7 +6,7 @@
|
|||
/* eslint-disable more/no-then */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
function resolveTheme() {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* global Whisper */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.BannerView = Whisper.View.extend({
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/* eslint-disable no-new */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
const { Logs } = window.Signal;
|
||||
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* global textsecure: false */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.ContactListView = Whisper.ListView.extend({
|
||||
|
|
|
@ -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:',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* global Whisper, loadImage */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
/*
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.StickerPackInstallFailedToast = Whisper.ToastView.extend({
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
/* eslint-disable more/no-then */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
const Steps = {
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* global Backbone, Whisper, _ */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* global libphonenumber, Whisper */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.PhoneInputView = Whisper.View.extend({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* global Whisper, Signal */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.SafetyNumberChangeDialogView = Whisper.View.extend({
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* global Whisper, Mustache, _ */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.ToastView = Whisper.View.extend({
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.View = Backbone.View.extend(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue