Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(lint) tame linter

Saúl Ibarra Corretgé1edf88e7441e
diff --git a/react/features/always-on-top/index.tsx b/react/features/always-on-top/index.tsx
index d493c4c306..3450625e45 100644
--- a/react/features/always-on-top/index.tsx
+++ b/react/features/always-on-top/index.tsx
@@ -4,8 +4,10 @@ import ReactDOM from 'react-dom';
import AlwaysOnTop from './AlwaysOnTop';
// Render the main/root Component.
+/* eslint-disable-next-line react/no-deprecated */
ReactDOM.render(<AlwaysOnTop />, document.getElementById('react'));
window.addEventListener(
'beforeunload',
+ /* eslint-disable-next-line react/no-deprecated */
() => ReactDOM.unmountComponentAtNode(document.getElementById('react') ?? document.body));
diff --git a/react/features/analytics/AnalyticsEvents.ts b/react/features/analytics/AnalyticsEvents.ts
index 7a61771e75..ec26717ac6 100644
--- a/react/features/analytics/AnalyticsEvents.ts
+++ b/react/features/analytics/AnalyticsEvents.ts
@@ -311,7 +311,7 @@ export function createInviteDialogEvent(
* @returns {Object}
*/
export function createNetworkInfoEvent({ isOnline, networkType, details }:
- { details?: Object; isOnline: boolean; networkType?: string; }) {
+{ details?: Object; isOnline: boolean; networkType?: string; }) {
const attributes: {
details?: Object;
isOnline: boolean;
diff --git a/react/features/app/actions.any.ts b/react/features/app/actions.any.ts
index b72e08195c..79be0088de 100644
--- a/react/features/app/actions.any.ts
+++ b/react/features/app/actions.any.ts
@@ -158,4 +158,3 @@ export function maybeRedirectToTokenAuthUrl(
return false;
}
-
diff --git a/react/features/app/getRouteToRender.web.ts b/react/features/app/getRouteToRender.web.ts
index 4b354718e2..a757d2872b 100644
--- a/react/features/app/getRouteToRender.web.ts
+++ b/react/features/app/getRouteToRender.web.ts
@@ -140,10 +140,7 @@ function _getWebWelcomePageRoute(state: IReduxState) {
*
* @returns {Object}
*/
-function _getEmptyRoute(): {
- component: React.ReactNode;
- href?: string;
- } {
+function _getEmptyRoute(): { component: React.ReactNode; href?: string; } {
return {
component: BlankPage,
href: undefined
diff --git a/react/features/app/middleware.ts b/react/features/app/middleware.ts
index 4b7b0e970b..8fcbdc7c0c 100644
--- a/react/features/app/middleware.ts
+++ b/react/features/app/middleware.ts
@@ -113,8 +113,7 @@ function _isMaybeSplitBrainError(getState: IStore['getState'], action: AnyAction
const { error } = action;
const isShardChangedError = error
&& error.message === 'item-not-found'
- && error.details
- && error.details.shard_changed;
+ && error.details?.shard_changed;
if (isShardChangedError) {
const state = getState();
diff --git a/react/features/base/app/components/BaseApp.tsx b/react/features/base/app/components/BaseApp.tsx
index 6bdfe0ae81..2b6066e20a 100644
--- a/react/features/base/app/components/BaseApp.tsx
+++ b/react/features/base/app/components/BaseApp.tsx
@@ -45,7 +45,7 @@ export default class BaseApp<P> extends Component<P, IState> {
/**
* The deferred for the initialisation {{promise, resolve, reject}}.
*/
- _init: PromiseWithResolvers<any>
+ _init: PromiseWithResolvers<any>;
/**
* Initializes a new {@code BaseApp} instance.
diff --git a/react/features/base/conference/middleware.any.ts b/react/features/base/conference/middleware.any.ts
index e3c5fc3b73..191016f92d 100644
--- a/react/features/base/conference/middleware.any.ts
+++ b/react/features/base/conference/middleware.any.ts
@@ -248,8 +248,7 @@ function _conferenceFailed({ dispatch, getState }: IStore, next: Function, actio
}
!error.recoverable
- && conference
- && conference.leave(CONFERENCE_LEAVE_REASONS.UNRECOVERABLE_ERROR).catch((reason: Error) => {
+ && conference?.leave(CONFERENCE_LEAVE_REASONS.UNRECOVERABLE_ERROR).catch((reason: Error) => {
// Even though we don't care too much about the failure, it may be
// good to know that it happen, so log it (on the info level).
logger.info('JitsiConference.leave() rejected with:', reason);
@@ -551,7 +550,7 @@ function _pinParticipant({ getState }: IStore, next: Function, action: AnyAction
const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
const local
= participantById?.local
- || (!id && pinnedParticipant && pinnedParticipant.local);
+ || (!id && pinnedParticipant?.local);
let participantIdForEvent;
if (local) {
diff --git a/react/features/base/conference/reducer.ts b/react/features/base/conference/reducer.ts
index 24796d47a7..398a233c58 100644
--- a/react/features/base/conference/reducer.ts
+++ b/react/features/base/conference/reducer.ts
@@ -495,7 +495,7 @@ function _conferenceJoined(state: IConferenceState, { conference }: { conference
* reduction of the specified action.
*/
function _conferenceLeftOrWillLeave(state: IConferenceState, { conference, type }:
- { conference: IJitsiConference; type: string; }) {
+{ conference: IJitsiConference; type: string; }) {
const nextState = { ...state };
// The redux action CONFERENCE_LEFT is the last time that we should be
diff --git a/react/features/base/i18n/middleware.ts b/react/features/base/i18n/middleware.ts
index 6060c48a81..181e967751 100644
--- a/react/features/base/i18n/middleware.ts
+++ b/react/features/base/i18n/middleware.ts
@@ -23,7 +23,7 @@ MiddlewareRegistry.register(store => next => action => {
? action.value
: store.getState()['features/dynamic-branding'];
- if (language && labels && labels[language]) {
+ if (language && labels?.[language]) {
changeLanguageBundle(language, labels[language])
.catch(err => {
logger.log('Error setting dynamic language bundle', err);
diff --git a/react/features/base/jwt/middleware.ts b/react/features/base/jwt/middleware.ts
index 4e52d8dd9d..017c4ab17f 100644
--- a/react/features/base/jwt/middleware.ts
+++ b/react/features/base/jwt/middleware.ts
@@ -237,7 +237,7 @@ function _undoOverwriteLocalParticipant(
* }}
*/
function _user2participant({ avatar, avatarUrl, email, id, name, 'hidden-from-recorder': hiddenFromRecorder }:
- { avatar?: string; avatarUrl?: string; email: string; 'hidden-from-recorder': string | boolean;
+{ avatar?: string; avatarUrl?: string; email: string; 'hidden-from-recorder': string | boolean;
id: string; name: string; }) {
const participant: {
avatarURL?: string;
diff --git a/react/features/base/media/components/web/AudioTrack.tsx b/react/features/base/media/components/web/AudioTrack.tsx
index 16badf48ec..ac0c2e2ce1 100644
--- a/react/features/base/media/components/web/AudioTrack.tsx
+++ b/react/features/base/media/components/web/AudioTrack.tsx
@@ -228,7 +228,7 @@ class AudioTrack extends Component<IProps> {
* @returns {void}
*/
_detachTrack(track?: ITrack) {
- if (this._ref?.current && track && track.jitsiTrack) {
+ if (this._ref?.current && track?.jitsiTrack) {
clearTimeout(this._playTimeout);
this._playTimeout = undefined;
track.jitsiTrack.detach(this._ref.current);
diff --git a/react/features/base/media/components/web/Video.tsx b/react/features/base/media/components/web/Video.tsx
index 0a1d5442d6..38b95a313d 100644
--- a/react/features/base/media/components/web/Video.tsx
+++ b/react/features/base/media/components/web/Video.tsx
@@ -358,7 +358,7 @@ class Video extends Component<IProps> {
* @returns {void}
*/
_detachTrack(videoTrack?: Partial<ITrack>) {
- if (this._videoElement && videoTrack && videoTrack.jitsiTrack) {
+ if (this._videoElement && videoTrack?.jitsiTrack) {
videoTrack.jitsiTrack.detach(this._videoElement);
}
}
diff --git a/react/features/base/media/constants.ts b/react/features/base/media/constants.ts
index 82c1a33fb2..679cf76b60 100644
--- a/react/features/base/media/constants.ts
+++ b/react/features/base/media/constants.ts
@@ -19,11 +19,11 @@ export const MEDIA_TYPE: {
AUDIO: MediaType;
SCREENSHARE: MediaType;
VIDEO: MediaType;
- } = {
- AUDIO: 'audio',
- SCREENSHARE: 'screenshare',
- VIDEO: 'video'
- };
+} = {
+ AUDIO: 'audio',
+ SCREENSHARE: 'screenshare',
+ VIDEO: 'video'
+};
/* eslint-disable no-bitwise */
diff --git a/react/features/base/media/reducer.ts b/react/features/base/media/reducer.ts
index af8678644c..098d47c6cc 100644
--- a/react/features/base/media/reducer.ts
+++ b/react/features/base/media/reducer.ts
@@ -102,7 +102,8 @@ const DEFAULT_INITIAL_PROMISE_STATE = Promise.withResolvers<IInitialGUMPromiseRe
* @param {string} action.type - Type of action.
* @returns {ICommonState}
*/
-function _initialGUMPromise(state: PromiseWithResolvers<IInitialGUMPromiseResult> | null = DEFAULT_INITIAL_PROMISE_STATE,
+function _initialGUMPromise(
+ state: PromiseWithResolvers<IInitialGUMPromiseResult> | null = DEFAULT_INITIAL_PROMISE_STATE,
action: AnyAction) {
if (action.type === SET_INITIAL_GUM_PROMISE) {
return action.promise ?? null;
diff --git a/react/features/base/popover/components/Popover.web.tsx b/react/features/base/popover/components/Popover.web.tsx
index 03b660dcaa..c72cebfcd8 100644
--- a/react/features/base/popover/components/Popover.web.tsx
+++ b/react/features/base/popover/components/Popover.web.tsx
@@ -340,9 +340,7 @@ class Popover extends Component<IProps, IState> {
_onTouchStart(event: TouchEvent) {
if (this.props.visible
&& !this.props.overflowDrawer
- && this._contextMenuRef
- && this._contextMenuRef.contains
- && !this._contextMenuRef.contains(event.target as Node)
+ && !this._contextMenuRef?.contains?.(event.target as Node)
&& !this._containerRef?.current?.contains(event.target as Node)) {
this._onHideDialog();
}
diff --git a/react/features/base/redux/StateListenerRegistry.ts b/react/features/base/redux/StateListenerRegistry.ts
index 3dc0907320..26ea882bbb 100644
--- a/react/features/base/redux/StateListenerRegistry.ts
+++ b/react/features/base/redux/StateListenerRegistry.ts
@@ -96,8 +96,8 @@ class StateListenerRegistry {
* @returns {void}
*/
_listener({ prevSelections, store }: {
- prevSelections: Map<SelectorListener, any>;
- store: Store<any, any>;
+ prevSelections: Map<SelectorListener, any>;
+ store: Store<any, any>;
}) {
for (const selectorListener of this._selectorListeners) {
const prevSelection = prevSelections.get(selectorListener);
diff --git a/react/features/base/toolbox/components/AbstractButton.tsx b/react/features/base/toolbox/components/AbstractButton.tsx
index eb43f236e3..e340a472d8 100644
--- a/react/features/base/toolbox/components/AbstractButton.tsx
+++ b/react/features/base/toolbox/components/AbstractButton.tsx
@@ -375,7 +375,7 @@ export default class AbstractButton<P extends IProps, S = any> extends Component
// blur after click to release focus from button to allow PTT.
// @ts-ignore
- e?.currentTarget?.blur && e.currentTarget.blur();
+ e?.currentTarget?.blur?.();
}
/**
diff --git a/react/features/base/ui/components/web/ContextMenu.tsx b/react/features/base/ui/components/web/ContextMenu.tsx
index a2fc6a4fc4..5f4c4ce815 100644
--- a/react/features/base/ui/components/web/ContextMenu.tsx
+++ b/react/features/base/ui/components/web/ContextMenu.tsx
@@ -244,9 +244,9 @@ const ContextMenu = ({
list: Element | null,
currentFocus: Element | null,
traversalFunction: (
- list: Element | null,
- currentFocus: Element | null
- ) => Element | null
+ list: Element | null,
+ currentFocus: Element | null
+ ) => Element | null
) => {
let wrappedOnce = false;
let nextFocus = traversalFunction(list, currentFocus);
diff --git a/react/features/base/ui/components/web/DialogWithTabs.tsx b/react/features/base/ui/components/web/DialogWithTabs.tsx
index 5d5929e74f..3bde75d5c1 100644
--- a/react/features/base/ui/components/web/DialogWithTabs.tsx
+++ b/react/features/base/ui/components/web/DialogWithTabs.tsx
@@ -141,7 +141,7 @@ const useStyles = makeStyles()(theme => {
});
interface IObject {
- [key: string]: string | string[] | boolean | number | number[] | {} | undefined;
+ [key: string]: unknown;
}
export interface IDialogTab<P> {
diff --git a/react/features/base/ui/components/web/TextWithOverflow.tsx b/react/features/base/ui/components/web/TextWithOverflow.tsx
index ac47cdb142..84507c1299 100644
--- a/react/features/base/ui/components/web/TextWithOverflow.tsx
+++ b/react/features/base/ui/components/web/TextWithOverflow.tsx
@@ -5,9 +5,9 @@ import { makeStyles } from 'tss-react/mui';
import { TEXT_OVERFLOW_TYPES } from '../../constants.web';
interface ITextWithOverflowProps {
- children: ReactNode;
- className?: string;
- overflowType?: TEXT_OVERFLOW_TYPES;
+ children: ReactNode;
+ className?: string;
+ overflowType?: TEXT_OVERFLOW_TYPES;
}
const useStyles = makeStyles<{ translateDiff: number; }>()((_, { translateDiff }) => {
diff --git a/react/features/chat/components/web/DisplayNameForm.tsx b/react/features/chat/components/web/DisplayNameForm.tsx
index 6cee79c5ad..5152bfea4a 100644
--- a/react/features/chat/components/web/DisplayNameForm.tsx
+++ b/react/features/chat/components/web/DisplayNameForm.tsx
@@ -117,7 +117,7 @@ class DisplayNameForm extends Component<IProps, IState> {
* @returns {void}
*/
_onSubmit(event: any) {
- event?.preventDefault && event.preventDefault();
+ event?.preventDefault?.();
// Store display name in settings
this.props.dispatch(updateSettings({
diff --git a/react/features/chat/middleware.ts b/react/features/chat/middleware.ts
index 6d341598b1..eccbf0431e 100644
--- a/react/features/chat/middleware.ts
+++ b/react/features/chat/middleware.ts
@@ -349,8 +349,8 @@ function _addChatMsgListener(conference: IJitsiConference, store: IStore) {
*/
function _onConferenceMessageReceived(store: IStore,
{ displayName, isGuest, message, messageId, participantId, privateMessage, timestamp }: {
- displayName?: string; isGuest?: boolean; message: string; messageId?: string;
- participantId: string; privateMessage: boolean; timestamp: number; }
+ displayName?: string; isGuest?: boolean; message: string; messageId?: string;
+ participantId: string; privateMessage: boolean; timestamp: number; }
) {
const isGif = isGifEnabled(store.getState()) && isGifMessage(message);
@@ -479,8 +479,8 @@ function getLobbyChatDisplayName(state: IReduxState, participantId: string) {
*/
function _handleReceivedMessage({ dispatch, getState }: IStore,
{ displayName, isGuest, lobbyChat, message, messageId, participantId, privateMessage, timestamp }: {
- displayName?: string; isGuest?: boolean; lobbyChat: boolean; message: string;
- messageId?: string; participantId: string; privateMessage: boolean; timestamp: number; },
+ displayName?: string; isGuest?: boolean; lobbyChat: boolean; message: string;
+ messageId?: string; participantId: string; privateMessage: boolean; timestamp: number; },
shouldPlaySound = true,
isReaction = false
) {
diff --git a/react/features/conference/constants.ts b/react/features/conference/constants.ts
index befb829130..1187d99d43 100644
--- a/react/features/conference/constants.ts
+++ b/react/features/conference/constants.ts
@@ -8,5 +8,5 @@ export const IFRAME_DISABLED_TIMEOUT_MINUTES = 5;
/**
* A list of allowed location to embed iframe.
*/
-/* eslint-disable-next-line no-extra-parens*/
+/* eslint-disable-next-line no-extra-parens */
export const IFRAME_EMBED_ALLOWED_LOCATIONS = ([] as string[]).concat(ADDITIONAL_LOCATIONS);
diff --git a/react/features/display-name/components/native/DisplayNameLabel.tsx b/react/features/display-name/components/native/DisplayNameLabel.tsx
index e596278018..8c89a195fd 100644
--- a/react/features/display-name/components/native/DisplayNameLabel.tsx
+++ b/react/features/display-name/components/native/DisplayNameLabel.tsx
@@ -51,7 +51,7 @@ class DisplayNameLabel extends React.Component<IProps> {
return (
<View
style = { (this.props.contained ? styles.displayNamePadding : styles.displayNameBackdrop
- ) as ViewStyle }>
+ ) as ViewStyle }>
<Text
numberOfLines = { 1 }
style = { styles.displayNameText as TextStyle }>
diff --git a/react/features/filmstrip/components/web/ThumbnailWrapper.tsx b/react/features/filmstrip/components/web/ThumbnailWrapper.tsx
index 45e10ebbd6..0fbc2c5316 100644
--- a/react/features/filmstrip/components/web/ThumbnailWrapper.tsx
+++ b/react/features/filmstrip/components/web/ThumbnailWrapper.tsx
@@ -150,7 +150,7 @@ class ThumbnailWrapper extends Component<IProps> {
* @returns {IProps}
*/
function _mapStateToProps(state: IReduxState, ownProps: { columnIndex: number;
- data: { filmstripType: string; }; index?: number; rowIndex: number; }) {
+ data: { filmstripType: string; }; index?: number; rowIndex: number; }) {
const _currentLayout = getCurrentLayout(state);
const { remoteParticipants: remote } = state['features/filmstrip'];
const activeParticipants = getActiveParticipantsIds(state);
diff --git a/react/features/filmstrip/functions.native.ts b/react/features/filmstrip/functions.native.ts
index 2e43876c6e..d97950a52a 100644
--- a/react/features/filmstrip/functions.native.ts
+++ b/react/features/filmstrip/functions.native.ts
@@ -287,4 +287,3 @@ export function getScreenshareFilmstripParticipantId(_state: any) {
return undefined;
}
-
diff --git a/react/features/invite/components/dial-in-info-page/DialInInfoApp.web.tsx b/react/features/invite/components/dial-in-info-page/DialInInfoApp.web.tsx
index 413a4a956c..e2149ab29a 100644
--- a/react/features/invite/components/dial-in-info-page/DialInInfoApp.web.tsx
+++ b/react/features/invite/components/dial-in-info-page/DialInInfoApp.web.tsx
@@ -20,6 +20,7 @@ document.addEventListener('DOMContentLoaded', () => {
const ix = href.indexOf(DIAL_IN_INFO_PAGE_PATH_NAME);
const url = (ix > 0 ? href.substring(0, ix) : href) + room;
+ /* eslint-disable-next-line react/no-deprecated */
ReactDOM.render(
<I18nextProvider i18n = { i18next }>
{ room
@@ -34,6 +35,7 @@ document.addEventListener('DOMContentLoaded', () => {
);
});
-window.addEventListener('beforeunload', () => { // @ts-ignore
- ReactDOM.unmountComponentAtNode(document.getElementById('react'));
+window.addEventListener('beforeunload', () => {
+ /* eslint-disable-next-line react/no-deprecated */
+ ReactDOM.unmountComponentAtNode(document.getElementById('react')!);
});
diff --git a/react/features/invite/functions.ts b/react/features/invite/functions.ts
index ce43974370..36612c98f6 100644
--- a/react/features/invite/functions.ts
+++ b/react/features/invite/functions.ts
@@ -494,7 +494,7 @@ export function isDialOutEnabled(state: IReduxState): boolean {
const isModerator = isLocalParticipantModerator(state);
return isJwtFeatureEnabled(state, 'outbound-call', isModerator, false)
- && conference && conference.isSIPCallingSupported();
+ && conference?.isSIPCallingSupported();
}
/**
diff --git a/react/features/keyboard-shortcuts/types.ts b/react/features/keyboard-shortcuts/types.ts
index d48e7792b1..9807328fa9 100644
--- a/react/features/keyboard-shortcuts/types.ts
+++ b/react/features/keyboard-shortcuts/types.ts
@@ -1,23 +1,23 @@
export interface IKeyboardShortcut {
- // whether or not the alt key must be pressed
- alt?: boolean;
+ // whether or not the alt key must be pressed
+ alt?: boolean;
- // the character to be pressed that triggers the action
- character: string;
+ // the character to be pressed that triggers the action
+ character: string;
- // the function to be executed when the shortcut is pressed
- handler: Function;
+ // the function to be executed when the shortcut is pressed
+ handler: Function;
- // character to be displayed in the help dialog shortcuts list
- helpCharacter?: string;
+ // character to be displayed in the help dialog shortcuts list
+ helpCharacter?: string;
- // help description of the shortcut, to be displayed in the help dialog
- helpDescription?: string;
+ // help description of the shortcut, to be displayed in the help dialog
+ helpDescription?: string;
}
export interface IKeyboardShortcutsState {
- enabled: boolean;
- shortcuts: Map<string, IKeyboardShortcut>;
- shortcutsHelp: Map<string, string>;
+ enabled: boolean;
+ shortcuts: Map<string, IKeyboardShortcut>;
+ shortcutsHelp: Map<string, string>;
}
diff --git a/react/features/large-video/actions.web.ts b/react/features/large-video/actions.web.ts
index 8a36cc568c..bffd720396 100644
--- a/react/features/large-video/actions.web.ts
+++ b/react/features/large-video/actions.web.ts
@@ -37,8 +37,8 @@ export function captureLargeVideoScreenshot() {
}
// Get the video element for the large video, cast HTMLElement to HTMLVideoElement to make flow happy.
- /* eslint-disable-next-line no-extra-parens*/
- const videoElement = (document.getElementById('largeVideo') as any);
+ /* eslint-disable-next-line no-extra-parens */
+ const videoElement = document.getElementById('largeVideo') as any;
if (!videoElement) {
return promise;
diff --git a/react/features/large-video/components/LargeVideoBackground.web.tsx b/react/features/large-video/components/LargeVideoBackground.web.tsx
index e8102fe1e4..86cca796cc 100644
--- a/react/features/large-video/components/LargeVideoBackground.web.tsx
+++ b/react/features/large-video/components/LargeVideoBackground.web.tsx
@@ -214,8 +214,7 @@ export class LargeVideoBackground extends Component<IProps> {
// because we don't have a good way to do it.
// All other cases when the canvas is not visible are handled through the component props
// (hidden, _shouldDisplayTileView).
- if (!this._canvasEl || this._canvasEl.offsetParent === null
- || window.innerHeight === 0 || window.innerWidth === 0) {
+ if (!this._canvasEl?.offsetParent || window.innerHeight === 0 || window.innerWidth === 0) {
return;
}
diff --git a/react/features/mobile/call-integration/middleware.ts b/react/features/mobile/call-integration/middleware.ts
index f275c2b477..6da05f4f6b 100644
--- a/react/features/mobile/call-integration/middleware.ts
+++ b/react/features/mobile/call-integration/middleware.ts
@@ -486,7 +486,7 @@ function _syncTrackState({ getState }: IStore, next: Function, action: AnyAction
const state = getState();
const conference = getCurrentConference(state);
- if (jitsiTrack.isLocal() && conference && conference.callUUID) {
+ if (jitsiTrack.isLocal() && conference?.callUUID) {
switch (jitsiTrack.getType()) {
case 'audio': {
_updateCallIntegrationMuted(conference, state);
diff --git a/react/features/participants-pane/components/breakout-rooms/components/web/RoomList.tsx b/react/features/participants-pane/components/breakout-rooms/components/web/RoomList.tsx
index a96a4ff7fc..158b602439 100644
--- a/react/features/participants-pane/components/breakout-rooms/components/web/RoomList.tsx
+++ b/react/features/participants-pane/components/breakout-rooms/components/web/RoomList.tsx
@@ -54,10 +54,10 @@ export const RoomList = ({ searchString }: IProps) => {
const [ lowerMenu, raiseMenu, toggleMenu, menuEnter, menuLeave, raiseContext ] = useContextMenu<IRoom>();
const [ lowerParticipantMenu, raiseParticipantMenu, toggleParticipantMenu,
participantMenuEnter, participantMenuLeave, raiseParticipantContext ] = useContextMenu<{
- jid: string;
- participantName: string;
- room: IRoom;
- }>();
+ jid: string;
+ participantName: string;
+ room: IRoom;
+ }>();
const onRaiseMenu = useCallback(room => (target: HTMLElement) => raiseMenu(room, target), [ raiseMenu ]);
// close the menu when the room vanishes
diff --git a/react/features/recording/components/AbstractRecordingLabel.ts b/react/features/recording/components/AbstractRecordingLabel.ts
index 42a8b22458..8e0b952ea1 100644
--- a/react/features/recording/components/AbstractRecordingLabel.ts
+++ b/react/features/recording/components/AbstractRecordingLabel.ts
@@ -22,12 +22,12 @@ export interface IProps extends WithTranslation {
/**
* Whether this meeting is being transcribed.
*/
- _isTranscribing: boolean;
+ _isTranscribing: boolean;
- /**
+ /**
* Whether the recording/livestreaming/transcriber is currently running.
*/
- _isVisible: boolean;
+ _isVisible: boolean;
/**
* The status of the higher priority session.
diff --git a/react/features/room-lock/actions.ts b/react/features/room-lock/actions.ts
index 4bf62910e5..1998afa3aa 100644
--- a/react/features/room-lock/actions.ts
+++ b/react/features/room-lock/actions.ts
@@ -110,4 +110,3 @@ export function unlockRoom() {
};
}
-
diff --git a/react/features/subtitles/reducer.ts b/react/features/subtitles/reducer.ts
index 762393f2a7..b2e55621ba 100644
--- a/react/features/subtitles/reducer.ts
+++ b/react/features/subtitles/reducer.ts
@@ -124,7 +124,7 @@ function _removeCachedTranscriptMessage(state: ISubtitlesState,
* reduction of the specified action.
*/
function _updateTranscriptMessage(state: ISubtitlesState, { transcriptMessageID, newTranscriptMessage }:
- { newTranscriptMessage: ITranscriptMessage; transcriptMessageID: string; }) {
+{ newTranscriptMessage: ITranscriptMessage; transcriptMessageID: string; }) {
const newTranscriptMessages = new Map(state._transcriptMessages);
const _cachedTranscriptMessages = new Map(state._cachedTranscriptMessages);
diff --git a/react/features/toolbox/components/AbstractAudioMuteButton.tsx b/react/features/toolbox/components/AbstractAudioMuteButton.tsx
index 529f914dc2..b66eabf38d 100644
--- a/react/features/toolbox/components/AbstractAudioMuteButton.tsx
+++ b/react/features/toolbox/components/AbstractAudioMuteButton.tsx
@@ -18,12 +18,12 @@ export interface IProps extends AbstractButtonProps {
/**
* Whether audio is currently muted or not.
*/
- _audioMuted: boolean;
+ _audioMuted: boolean;
- /**
+ /**
* Whether the button is disabled.
*/
- _disabled: boolean;
+ _disabled: boolean;
}
/**
diff --git a/react/features/toolbox/components/native/OverflowMenu.tsx b/react/features/toolbox/components/native/OverflowMenu.tsx
index 0ddef72487..8ef428f351 100644
--- a/react/features/toolbox/components/native/OverflowMenu.tsx
+++ b/react/features/toolbox/components/native/OverflowMenu.tsx
@@ -69,12 +69,12 @@ interface IProps {
/**
* Whether the recoding button should be enabled or not.
*/
- _recordingEnabled: boolean;
+ _recordingEnabled: boolean;
- /**
+ /**
* Whether or not any reactions buttons should be displayed.
*/
- _shouldDisplayReactionsButtons: boolean;
+ _shouldDisplayReactionsButtons: boolean;
/**
* The width of the screen.
diff --git a/react/features/toolbox/components/web/AudioMuteButton.tsx b/react/features/toolbox/components/web/AudioMuteButton.tsx
index cc5e66e756..dd13f93393 100644
--- a/react/features/toolbox/components/web/AudioMuteButton.tsx
+++ b/react/features/toolbox/components/web/AudioMuteButton.tsx
@@ -31,15 +31,15 @@ const styles = () => {
*/
interface IProps extends AbstractAudioMuteButtonProps {
- /**
+ /**
* The gumPending state from redux.
*/
- _gumPending: IGUMPendingState;
+ _gumPending: IGUMPendingState;
- /**
+ /**
* An object containing the CSS classes.
*/
- classes?: Partial<Record<keyof ReturnType<typeof styles>, string>>;
+ classes?: Partial<Record<keyof ReturnType<typeof styles>, string>>;
}
diff --git a/react/features/video-menu/components/native/RemoteVideoMenu.tsx b/react/features/video-menu/components/native/RemoteVideoMenu.tsx
index 677efe2b77..8b99f8a6ba 100644
--- a/react/features/video-menu/components/native/RemoteVideoMenu.tsx
+++ b/react/features/video-menu/components/native/RemoteVideoMenu.tsx
@@ -1,4 +1,4 @@
-/* eslint-disable lines-around-comment*/
+/* eslint-disable lines-around-comment */
import React, { PureComponent } from 'react';
import { Text, TextStyle, View, ViewStyle } from 'react-native';
diff --git a/react/features/video-menu/components/native/VolumeSlider.tsx b/react/features/video-menu/components/native/VolumeSlider.tsx
index 84a3ac01f4..3940a5c0b6 100644
--- a/react/features/video-menu/components/native/VolumeSlider.tsx
+++ b/react/features/video-menu/components/native/VolumeSlider.tsx
@@ -1,4 +1,4 @@
-/* eslint-disable lines-around-comment*/
+/* eslint-disable lines-around-comment */
import Slider from '@react-native-community/slider';
import { throttle } from 'lodash-es';
diff --git a/react/features/video-menu/components/web/CustomOptionButton.tsx b/react/features/video-menu/components/web/CustomOptionButton.tsx
index 39a935a232..d3fb046313 100644
--- a/react/features/video-menu/components/web/CustomOptionButton.tsx
+++ b/react/features/video-menu/components/web/CustomOptionButton.tsx
@@ -8,7 +8,7 @@ const CustomOptionButton = (
icon: string;
onClick: (e?: React.MouseEvent<Element, MouseEvent> | undefined) => void;
text: string;
- }
+ }
) => {
const icon = useCallback(props => (<img
diff --git a/react/features/web-hid/webhid-manager.ts b/react/features/web-hid/webhid-manager.ts
index 4dc1471330..34746283e9 100644
--- a/react/features/web-hid/webhid-manager.ts
+++ b/react/features/web-hid/webhid-manager.ts
@@ -110,7 +110,7 @@ export default class WebHidManager extends EventTarget {
return null;
}
- if (this.deviceInfo?.device && this.deviceInfo.device.opened) {
+ if (this.deviceInfo?.device?.opened) {
await this.close();
}
@@ -506,7 +506,7 @@ export default class WebHidManager extends EventTarget {
* @returns {void} -.
*/
resetDeviceState() {
- if (!this.deviceInfo?.device || !this.deviceInfo?.device?.opened) {
+ if (!this.deviceInfo?.device?.opened) {
return;
}
@@ -695,8 +695,7 @@ export default class WebHidManager extends EventTarget {
* @returns {void} -.
*/
async sendDeviceReport(data: { command: string; }) {
- if (!data?.command || !this.deviceInfo
- || !this.deviceInfo.device || !this.deviceInfo.device.opened || !this.isParseDescriptorsSuccess) {
+ if (!data?.command || !this.deviceInfo?.device?.opened || !this.isParseDescriptorsSuccess) {
logger.warn('There are currently non-compliant conditions');
return;
@@ -939,7 +938,7 @@ export default class WebHidManager extends EventTarget {
const reportId = this.retriveInputReportId(inputReportId);
- if (!this.deviceInfo?.device || !this.deviceInfo?.device?.opened) {
+ if (!this.deviceInfo?.device?.opened) {
logger.warn('[sendReplyReport] device is not opened or does not exist');
return;
diff --git a/react/features/welcome/components/WelcomePage.web.tsx b/react/features/welcome/components/WelcomePage.web.tsx
index 4aab5dad49..2f68552904 100644
--- a/react/features/welcome/components/WelcomePage.web.tsx
+++ b/react/features/welcome/components/WelcomePage.web.tsx
@@ -508,9 +508,8 @@ class WelcomePage extends AbstractWelcomePage<IProps> {
*/
_shouldShowAdditionalCard() {
return interfaceConfig.DISPLAY_WELCOME_PAGE_ADDITIONAL_CARD
- && this._additionalCardTemplate
- && this._additionalCardTemplate.content
- && this._additionalCardTemplate.innerHTML.trim();
+ && this._additionalCardTemplate?.content
+ && this._additionalCardTemplate?.innerHTML?.trim();
}
/**
@@ -522,9 +521,8 @@ class WelcomePage extends AbstractWelcomePage<IProps> {
*/
_shouldShowAdditionalContent() {
return interfaceConfig.DISPLAY_WELCOME_PAGE_CONTENT
- && this._additionalContentTemplate
- && this._additionalContentTemplate.content
- && this._additionalContentTemplate.innerHTML.trim();
+ && this._additionalContentTemplate?.content
+ && this._additionalContentTemplate?.innerHTML?.trim();
}
/**
@@ -536,9 +534,8 @@ class WelcomePage extends AbstractWelcomePage<IProps> {
*/
_shouldShowAdditionalToolbarContent() {
return interfaceConfig.DISPLAY_WELCOME_PAGE_TOOLBAR_ADDITIONAL_CONTENT
- && this._additionalToolbarContentTemplate
- && this._additionalToolbarContentTemplate.content
- && this._additionalToolbarContentTemplate.innerHTML.trim();
+ && this._additionalToolbarContentTemplate?.content
+ && this._additionalToolbarContentTemplate?.innerHTML.trim();
}
}
diff --git a/react/index.web.js b/react/index.web.js
index 45b5817280..361e7ef985 100644
--- a/react/index.web.js
+++ b/react/index.web.js
@@ -73,6 +73,7 @@ globalNS.renderEntryPoint = ({
props = {},
elementId = 'react'
}) => {
+ /* eslint-disable-next-line react/no-deprecated */
ReactDOM.render(
<Component { ...props } />,
document.getElementById(elementId)
diff --git a/tests/pageobjects/BreakoutRooms.ts b/tests/pageobjects/BreakoutRooms.ts
index a106af9dbb..4d31c3da33 100644
--- a/tests/pageobjects/BreakoutRooms.ts
+++ b/tests/pageobjects/BreakoutRooms.ts
@@ -227,4 +227,3 @@ export default class BreakoutRooms extends BasePageObject {
// }
}
-
diff --git a/tests/specs/2way/fakeDialInAudio.spec.ts b/tests/specs/2way/fakeDialInAudio.spec.ts
index 28865a767f..f87d829e54 100644
--- a/tests/specs/2way/fakeDialInAudio.spec.ts
+++ b/tests/specs/2way/fakeDialInAudio.spec.ts
@@ -18,7 +18,7 @@ describe('Fake Dial-In - ', () => {
// check dial-in is enabled, so skip
if (await ctx.p1.driver.execute(() => Boolean(
- config.dialInConfCodeUrl && config.dialInNumbersUrl && config.hosts && config.hosts.muc))) {
+ config.dialInConfCodeUrl && config.dialInNumbersUrl && config.hosts?.muc))) {
ctx.skipSuiteTests = true;
}
});
diff --git a/tests/specs/alone/dialInAudio.spec.ts b/tests/specs/alone/dialInAudio.spec.ts
index 0c9e255314..27115f7432 100644
--- a/tests/specs/alone/dialInAudio.spec.ts
+++ b/tests/specs/alone/dialInAudio.spec.ts
@@ -17,7 +17,7 @@ describe('Dial-In - ', () => {
// check dial-in is enabled
if (!await ctx.p1.driver.execute(() => Boolean(
- config.dialInConfCodeUrl && config.dialInNumbersUrl && config.hosts && config.hosts.muc))) {
+ config.dialInConfCodeUrl && config.dialInNumbersUrl && config.hosts?.muc))) {
ctx.skipSuiteTests = true;
}
});