Apply new ESLint rules to legacy code

This commit is contained in:
Chris Svenningsen 2020-09-08 17:46:29 -07:00 committed by Scott Nonnenberg
parent 91cf075697
commit 8a2c17f65f
70 changed files with 376 additions and 516 deletions

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
function resolveTheme() {

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.BannerView = Whisper.View.extend({

View file

@ -5,8 +5,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
const { Logs } = window.Signal;

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.ConfirmationDialogView = Whisper.View.extend({

View file

@ -3,8 +3,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.ContactListView = Whisper.ListView.extend({

View file

@ -14,8 +14,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
const FIVE_MINUTES = 1000 * 60 * 5;
window.Whisper = window.Whisper || {};
@ -2717,14 +2715,15 @@
Component: window.Signal.Components.Quote,
elCallback: el =>
this.$(this.compositionApi.current.attSlotRef.current).prepend(el),
props: Object.assign({}, props, {
props: {
...props,
withContentAbove: true,
onClose: () => {
// This can't be the normal 'onClose' because that is always run when this
// view is removed from the DOM, and would clear the draft quote.
this.setQuoteMessage(null);
},
}),
},
});
},

View file

@ -3,8 +3,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.LinkedCopiedToast = Whisper.ToastView.extend({

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
// TODO: take a title string which could replace the 'members' header

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
/*

View file

@ -7,8 +7,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.StickerPackInstallFailedToast = Whisper.ToastView.extend({

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
const Steps = {

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.KeyVerificationPanelView = Whisper.View.extend({

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
/*

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.PhoneInputView = Whisper.View.extend({

View file

@ -5,8 +5,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
window.Whisper.ReactWrapperView = Backbone.View.extend({
@ -66,12 +64,13 @@
});
},
augmentProps(props) {
return Object.assign({}, props, {
return {
...props,
close: () => {
this.remove();
},
i18n,
});
};
},
remove() {
if (this.onClose) {

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.RecorderView = Whisper.View.extend({

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.SafetyNumberChangeDialogView = Whisper.View.extend({

View file

@ -6,8 +6,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
const { Settings } = window.Signal.Types;

View file

@ -4,8 +4,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.StandaloneRegistrationView = Whisper.View.extend({

View file

@ -2,8 +2,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.ToastView = Whisper.View.extend({

View file

@ -22,8 +22,6 @@
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.View = Backbone.View.extend(