Skip to content

Commit 56ccde5

Browse files
committed
fix(lint) tame linter
1 parent 51a466f commit 56ccde5

File tree

48 files changed

+95
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+95
-105
lines changed

react/features/always-on-top/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import ReactDOM from 'react-dom';
44
import AlwaysOnTop from './AlwaysOnTop';
55

66
// Render the main/root Component.
7+
/* eslint-disable-next-line react/no-deprecated */
78
ReactDOM.render(<AlwaysOnTop />, document.getElementById('react'));
89

910
window.addEventListener(
1011
'beforeunload',
12+
/* eslint-disable-next-line react/no-deprecated */
1113
() => ReactDOM.unmountComponentAtNode(document.getElementById('react') ?? document.body));

react/features/analytics/AnalyticsEvents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export function createInviteDialogEvent(
311311
* @returns {Object}
312312
*/
313313
export function createNetworkInfoEvent({ isOnline, networkType, details }:
314-
{ details?: Object; isOnline: boolean; networkType?: string; }) {
314+
{ details?: Object; isOnline: boolean; networkType?: string; }) {
315315
const attributes: {
316316
details?: Object;
317317
isOnline: boolean;

react/features/app/actions.any.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,3 @@ export function maybeRedirectToTokenAuthUrl(
158158
return false;
159159
}
160160

161-

react/features/app/getRouteToRender.web.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,7 @@ function _getWebWelcomePageRoute(state: IReduxState) {
140140
*
141141
* @returns {Object}
142142
*/
143-
function _getEmptyRoute(): {
144-
component: React.ReactNode;
145-
href?: string;
146-
} {
143+
function _getEmptyRoute(): { component: React.ReactNode; href?: string; } {
147144
return {
148145
component: BlankPage,
149146
href: undefined

react/features/app/middleware.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ function _isMaybeSplitBrainError(getState: IStore['getState'], action: AnyAction
113113
const { error } = action;
114114
const isShardChangedError = error
115115
&& error.message === 'item-not-found'
116-
&& error.details
117-
&& error.details.shard_changed;
116+
&& error.details?.shard_changed;
118117

119118
if (isShardChangedError) {
120119
const state = getState();

react/features/base/app/components/BaseApp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class BaseApp<P> extends Component<P, IState> {
4545
/**
4646
* The deferred for the initialisation {{promise, resolve, reject}}.
4747
*/
48-
_init: PromiseWithResolvers<any>
48+
_init: PromiseWithResolvers<any>;
4949

5050
/**
5151
* Initializes a new {@code BaseApp} instance.

react/features/base/conference/middleware.any.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ function _conferenceFailed({ dispatch, getState }: IStore, next: Function, actio
248248
}
249249

250250
!error.recoverable
251-
&& conference
252-
&& conference.leave(CONFERENCE_LEAVE_REASONS.UNRECOVERABLE_ERROR).catch((reason: Error) => {
251+
&& conference?.leave(CONFERENCE_LEAVE_REASONS.UNRECOVERABLE_ERROR).catch((reason: Error) => {
253252
// Even though we don't care too much about the failure, it may be
254253
// good to know that it happen, so log it (on the info level).
255254
logger.info('JitsiConference.leave() rejected with:', reason);
@@ -551,7 +550,7 @@ function _pinParticipant({ getState }: IStore, next: Function, action: AnyAction
551550
const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
552551
const local
553552
= participantById?.local
554-
|| (!id && pinnedParticipant && pinnedParticipant.local);
553+
|| (!id && pinnedParticipant?.local);
555554
let participantIdForEvent;
556555

557556
if (local) {

react/features/base/conference/reducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ function _conferenceJoined(state: IConferenceState, { conference }: { conference
495495
* reduction of the specified action.
496496
*/
497497
function _conferenceLeftOrWillLeave(state: IConferenceState, { conference, type }:
498-
{ conference: IJitsiConference; type: string; }) {
498+
{ conference: IJitsiConference; type: string; }) {
499499
const nextState = { ...state };
500500

501501
// The redux action CONFERENCE_LEFT is the last time that we should be

react/features/base/i18n/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ MiddlewareRegistry.register(store => next => action => {
2323
? action.value
2424
: store.getState()['features/dynamic-branding'];
2525

26-
if (language && labels && labels[language]) {
26+
if (language && labels?.[language]) {
2727
changeLanguageBundle(language, labels[language])
2828
.catch(err => {
2929
logger.log('Error setting dynamic language bundle', err);

react/features/base/jwt/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function _undoOverwriteLocalParticipant(
237237
* }}
238238
*/
239239
function _user2participant({ avatar, avatarUrl, email, id, name, 'hidden-from-recorder': hiddenFromRecorder }:
240-
{ avatar?: string; avatarUrl?: string; email: string; 'hidden-from-recorder': string | boolean;
240+
{ avatar?: string; avatarUrl?: string; email: string; 'hidden-from-recorder': string | boolean;
241241
id: string; name: string; }) {
242242
const participant: {
243243
avatarURL?: string;

0 commit comments

Comments
 (0)