ref(flow) Remove flow (#13343)

Remove flow-related packages
Remove type annotations from JS files
pull/13349/head jitsi-meet_8661
Robert Pintilii 2 years ago committed by GitHub
parent ccebccf8e6
commit 6b28af8329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 122
      modules/API/API.js
  2. 20
      modules/API/external/functions.js
  3. 12
      modules/UI/authentication/AuthHandler.js
  4. 6
      modules/UI/authentication/LoginDialog.js
  5. 13
      modules/translation/translation.js
  6. 42
      package-lock.json
  7. 2
      package.json
  8. 11
      patches/eslint-plugin-flowtype+8.0.3.patch
  9. 6
      react/.eslintrc.js
  10. 12
      react/features/google-api/googleApi.native.js
  11. 4
      react/features/google-api/googleApi.web.js
  12. 4
      react/features/mobile/polyfills/RTCPeerConnection.js
  13. 6
      react/features/mobile/polyfills/ipv6utils.js
  14. 4
      react/features/screenshot-capture/processScreenshot.js
  15. 15
      react/index.native.js
  16. 1
      webpack.config.js

@ -1,5 +1,4 @@
// @flow
/* global APP */
import Logger from '@jitsi/logger';
import { createApiEvent } from '../../react/features/analytics/AnalyticsEvents';
@ -114,7 +113,6 @@ import { setTileView, toggleTileView } from '../../react/features/video-layout/a
import { muteAllParticipants } from '../../react/features/video-menu/actions';
import { setVideoQuality } from '../../react/features/video-quality/actions';
import { toggleWhiteboard } from '../../react/features/whiteboard/actions.any';
import { WhiteboardStatus } from '../../react/features/whiteboard/types';
import { getJitsiMeetTransport } from '../transport';
import {
@ -125,8 +123,6 @@ import {
const logger = Logger.getLogger(__filename);
declare var APP: Object;
/**
* List of the available commands.
*/
@ -1035,7 +1031,7 @@ function toggleScreenSharing(enable) {
* @param {MouseEvent} event - The mouse event to sanitize.
* @returns {Object}
*/
function sanitizeMouseEvent(event: MouseEvent) {
function sanitizeMouseEvent(event) {
const {
clientX,
clientY,
@ -1073,7 +1069,7 @@ function sanitizeMouseEvent(event: MouseEvent) {
* Jitsi Meet.
*/
class API {
_enabled: boolean;
_enabled;
/**
* Initializes the API. Setups message event listeners that will receive
@ -1108,7 +1104,7 @@ class API {
* otherwise.
* @returns {void}
*/
notifyLargeVideoVisibilityChanged(isHidden: boolean) {
notifyLargeVideoVisibilityChanged(isHidden) {
this._sendEvent({
name: 'large-video-visibility-changed',
isVisible: !isHidden
@ -1122,7 +1118,7 @@ class API {
* @param {Object} event - The message to pass onto spot.
* @returns {void}
*/
sendProxyConnectionEvent(event: Object) {
sendProxyConnectionEvent(event) {
this._sendEvent({
name: 'proxy-connection-event',
...event
@ -1135,7 +1131,7 @@ class API {
* @param {Object} event - The event to be sent.
* @returns {void}
*/
_sendEvent(event: Object = {}) {
_sendEvent(event = {}) {
if (this._enabled) {
transport.sendEvent(event);
}
@ -1148,7 +1144,7 @@ class API {
* @param {boolean} isOpen - True if the chat panel is open.
* @returns {void}
*/
notifyChatUpdated(unreadCount: number, isOpen: boolean) {
notifyChatUpdated(unreadCount, isOpen) {
this._sendEvent({
name: 'chat-updated',
unreadCount,
@ -1163,7 +1159,7 @@ class API {
* @param {boolean} privateMessage - True if the message was a private message.
* @returns {void}
*/
notifySendingChatMessage(message: string, privateMessage: boolean) {
notifySendingChatMessage(message, privateMessage) {
this._sendEvent({
name: 'outgoing-message',
message,
@ -1177,7 +1173,7 @@ class API {
* @param {MouseEvent} event - The mousemove event.
* @returns {void}
*/
notifyMouseEnter(event: MouseEvent) {
notifyMouseEnter(event) {
this._sendEvent({
name: 'mouse-enter',
event: sanitizeMouseEvent(event)
@ -1190,7 +1186,7 @@ class API {
* @param {MouseEvent} event - The mousemove event.
* @returns {void}
*/
notifyMouseLeave(event: MouseEvent) {
notifyMouseLeave(event) {
this._sendEvent({
name: 'mouse-leave',
event: sanitizeMouseEvent(event)
@ -1203,7 +1199,7 @@ class API {
* @param {MouseEvent} event - The mousemove event.
* @returns {void}
*/
notifyMouseMove(event: MouseEvent) {
notifyMouseMove(event) {
this._sendEvent({
name: 'mouse-move',
event: sanitizeMouseEvent(event)
@ -1217,7 +1213,7 @@ class API {
* @param {boolean} enabled - Whether or not the new moderation status is enabled.
* @returns {void}
*/
notifyModerationChanged(mediaType: string, enabled: boolean) {
notifyModerationChanged(mediaType, enabled) {
this._sendEvent({
name: 'moderation-status-changed',
mediaType,
@ -1232,7 +1228,7 @@ class API {
* @param {string} mediaType - Media type for which the participant was approved.
* @returns {void}
*/
notifyParticipantApproved(participantId: string, mediaType: string) {
notifyParticipantApproved(participantId, mediaType) {
this._sendEvent({
name: 'moderation-participant-approved',
id: participantId,
@ -1247,7 +1243,7 @@ class API {
* @param {string} mediaType - Media type for which the participant was rejected.
* @returns {void}
*/
notifyParticipantRejected(participantId: string, mediaType: string) {
notifyParticipantRejected(participantId, mediaType) {
this._sendEvent({
name: 'moderation-participant-rejected',
id: participantId,
@ -1263,7 +1259,7 @@ class API {
*
* @returns {void}
*/
notifyNotificationTriggered(title: string, description: string) {
notifyNotificationTriggered(title, description) {
this._sendEvent({
description,
name: 'notification-triggered',
@ -1277,7 +1273,7 @@ class API {
* @param {number} videoQuality - The video quality. The number represents the maximum height of the video streams.
* @returns {void}
*/
notifyVideoQualityChanged(videoQuality: number) {
notifyVideoQualityChanged(videoQuality) {
this._sendEvent({
name: 'video-quality-changed',
videoQuality
@ -1292,9 +1288,7 @@ class API {
* @returns {void}
*/
notifyReceivedChatMessage(
{ body, id, nick, privateMessage, ts }: {
body: *, id: string, nick: string, privateMessage: boolean, ts: *
} = {}) {
{ body, id, nick, privateMessage, ts } = {}) {
if (APP.conference.isLocalId(id)) {
return;
}
@ -1317,7 +1311,7 @@ class API {
* @param {Object} props - The display name of the user.
* @returns {void}
*/
notifyUserJoined(id: string, props: Object) {
notifyUserJoined(id, props) {
this._sendEvent({
name: 'participant-joined',
id,
@ -1332,7 +1326,7 @@ class API {
* @param {string} id - User id.
* @returns {void}
*/
notifyUserLeft(id: string) {
notifyUserLeft(id) {
this._sendEvent({
name: 'participant-left',
id
@ -1347,7 +1341,7 @@ class API {
* @param {string} role - The new user role.
* @returns {void}
*/
notifyUserRoleChanged(id: string, role: string) {
notifyUserRoleChanged(id, role) {
this._sendEvent({
name: 'participant-role-changed',
id,
@ -1363,7 +1357,7 @@ class API {
* @param {string} avatarURL - The new avatar URL of the participant.
* @returns {void}
*/
notifyAvatarChanged(id: string, avatarURL: string) {
notifyAvatarChanged(id, avatarURL) {
this._sendEvent({
name: 'avatar-changed',
avatarURL,
@ -1378,7 +1372,7 @@ class API {
* @param {Object} data - The event data.
* @returns {void}
*/
notifyEndpointTextMessageReceived(data: Object) {
notifyEndpointTextMessageReceived(data) {
this._sendEvent({
name: 'endpoint-text-message-received',
data
@ -1392,7 +1386,7 @@ class API {
* @param {string} faceExpression - Detected face expression.
* @returns {void}
*/
notifyFaceLandmarkDetected(faceBox: Object, faceExpression: string) {
notifyFaceLandmarkDetected(faceBox, faceExpression) {
this._sendEvent({
name: 'face-landmark-detected',
faceBox,
@ -1406,7 +1400,7 @@ class API {
* @param {Object} data - The event data.
* @returns {void}
*/
notifySharingParticipantsChanged(data: Object) {
notifySharingParticipantsChanged(data) {
this._sendEvent({
name: 'content-sharing-participants-changed',
data
@ -1420,7 +1414,7 @@ class API {
* @param {Object} devices - The new device list.
* @returns {void}
*/
notifyDeviceListChanged(devices: Object) {
notifyDeviceListChanged(devices) {
this._sendEvent({
name: 'device-list-changed',
devices
@ -1438,8 +1432,8 @@ class API {
* @returns {void}
*/
notifyDisplayNameChanged(
id: string,
{ displayName, formattedDisplayName }: Object) {
id,
{ displayName, formattedDisplayName }) {
this._sendEvent({
name: 'display-name-change',
displayname: displayName,
@ -1457,8 +1451,8 @@ class API {
* @returns {void}
*/
notifyEmailChanged(
id: string,
{ email }: Object) {
id,
{ email }) {
this._sendEvent({
name: 'email-change',
email,
@ -1470,10 +1464,10 @@ class API {
* Notify external application (if API is enabled) that the an error has been logged.
*
* @param {string} logLevel - The message log level.
* @param {Array} args - Array of strings composing the log message.
* @param {Array<string>} args - Array of strings composing the log message.
* @returns {void}
*/
notifyLog(logLevel: string, args: Array<string>) {
notifyLog(logLevel, args) {
this._sendEvent({
name: 'log',
logLevel,
@ -1491,7 +1485,7 @@ class API {
* user and the type of the room.
* @returns {void}
*/
notifyConferenceJoined(roomName: string, id: string, props: Object) {
notifyConferenceJoined(roomName, id, props) {
this._sendEvent({
name: 'video-conference-joined',
roomName,
@ -1506,7 +1500,7 @@ class API {
* @param {string} roomName - User id.
* @returns {void}
*/
notifyConferenceLeft(roomName: string) {
notifyConferenceLeft(roomName) {
this._sendEvent({
name: 'video-conference-left',
roomName
@ -1521,7 +1515,7 @@ class API {
*
* @returns {void}
*/
notifyDataChannelClosed(code: number, reason: string) {
notifyDataChannelClosed(code, reason) {
this._sendEvent({
name: 'data-channel-closed',
code,
@ -1564,7 +1558,7 @@ class API {
* @param {boolean} muted - The new muted status.
* @returns {void}
*/
notifyAudioMutedStatusChanged(muted: boolean) {
notifyAudioMutedStatusChanged(muted) {
this._sendEvent({
name: 'audio-mute-status-changed',
muted
@ -1578,7 +1572,7 @@ class API {
* @param {boolean} muted - The new muted status.
* @returns {void}
*/
notifyVideoMutedStatusChanged(muted: boolean) {
notifyVideoMutedStatusChanged(muted) {
this._sendEvent({
name: 'video-mute-status-changed',
muted
@ -1592,7 +1586,7 @@ class API {
* @param {boolean} available - True if available and false otherwise.
* @returns {void}
*/
notifyAudioAvailabilityChanged(available: boolean) {
notifyAudioAvailabilityChanged(available) {
audioAvailable = available;
this._sendEvent({
name: 'audio-availability-changed',
@ -1607,7 +1601,7 @@ class API {
* @param {boolean} available - True if available and false otherwise.
* @returns {void}
*/
notifyVideoAvailabilityChanged(available: boolean) {
notifyVideoAvailabilityChanged(available) {
videoAvailable = available;
this._sendEvent({
name: 'video-availability-changed',
@ -1622,7 +1616,7 @@ class API {
* @param {string} id - User id of the new on stage participant.
* @returns {void}
*/
notifyOnStageParticipantChanged(id: string) {
notifyOnStageParticipantChanged(id) {
this._sendEvent({
name: 'on-stage-participant-changed',
id
@ -1636,7 +1630,7 @@ class API {
* @param {boolean} isVisible - Whether the prejoin video is visible.
* @returns {void}
*/
notifyPrejoinVideoVisibilityChanged(isVisible: boolean) {
notifyPrejoinVideoVisibilityChanged(isVisible) {
this._sendEvent({
name: 'on-prejoin-video-changed',
isVisible
@ -1670,7 +1664,7 @@ class API {
* @param {string} message - Additional information about the error.
* @returns {void}
*/
notifyOnCameraError(type: string, message: string) {
notifyOnCameraError(type, message) {
this._sendEvent({
name: 'camera-error',
type,
@ -1686,7 +1680,7 @@ class API {
* @param {string} message - Additional information about the error.
* @returns {void}
*/
notifyOnMicError(type: string, message: string) {
notifyOnMicError(type, message) {
this._sendEvent({
name: 'mic-error',
type,
@ -1702,7 +1696,7 @@ class API {
* @param {string} error - A failure message, if any.
* @returns {void}
*/
notifyFeedbackSubmitted(error: string) {
notifyFeedbackSubmitted(error) {
this._sendEvent({
name: 'feedback-submitted',
error
@ -1727,7 +1721,7 @@ class API {
* be displayed or hidden.
* @returns {void}
*/
notifyFilmstripDisplayChanged(visible: boolean) {
notifyFilmstripDisplayChanged(visible) {
this._sendEvent({
name: 'filmstrip-display-changed',
visible
@ -1744,7 +1738,7 @@ class API {
* other participant.
* @returns {void}
*/
notifyKickedOut(kicked: Object, kicker: Object) {
notifyKickedOut(kicked, kicker) {
this._sendEvent({
name: 'participant-kicked-out',
kicked,
@ -1773,7 +1767,7 @@ class API {
* share is capturing.
* @returns {void}
*/
notifyScreenSharingStatusChanged(on: boolean, details: Object) {
notifyScreenSharingStatusChanged(on, details) {
this._sendEvent({
name: 'screen-sharing-status-changed',
on,
@ -1788,7 +1782,7 @@ class API {
* @param {string} id - Id of the dominant participant.
* @returns {void}
*/
notifyDominantSpeakerChanged(id: string) {
notifyDominantSpeakerChanged(id) {
this._sendEvent({
name: 'dominant-speaker-changed',
id
@ -1802,7 +1796,7 @@ class API {
* @param {string} subject - Conference subject.
* @returns {void}
*/
notifySubjectChanged(subject: string) {
notifySubjectChanged(subject) {
this._sendEvent({
name: 'subject-change',
subject
@ -1817,7 +1811,7 @@ class API {
* otherwise.
* @returns {void}
*/
notifyTileViewChanged(enabled: boolean) {
notifyTileViewChanged(enabled) {
this._sendEvent({
name: 'tile-view-changed',
enabled
@ -1830,7 +1824,7 @@ class API {
* @param {string} localStorageContent - The new localStorageContent.
* @returns {void}
*/
notifyLocalStorageChanged(localStorageContent: string) {
notifyLocalStorageChanged(localStorageContent) {
this._sendEvent({
name: 'local-storage-changed',
localStorageContent
@ -1844,7 +1838,7 @@ class API {
* @param {boolean} handRaised - Whether user has raised hand.
* @returns {void}
*/
notifyRaiseHandUpdated(id: string, handRaised: boolean) {
notifyRaiseHandUpdated(id, handRaised) {
this._sendEvent({
name: 'raise-hand-updated',
handRaised,
@ -1860,7 +1854,7 @@ class API {
* @param {string} error - Error type or null if success.
* @returns {void}
*/
notifyRecordingStatusChanged(on: boolean, mode: string, error?: string) {
notifyRecordingStatusChanged(on, mode, error) {
this._sendEvent({
name: 'recording-status-changed',
on,
@ -1877,7 +1871,7 @@ class API {
* @param {number} ttl - The recording download link time to live.
* @returns {void}
*/
notifyRecordingLinkAvailable(link: string, ttl: number) {
notifyRecordingLinkAvailable(link, ttl) {
this._sendEvent({
name: 'recording-link-available',
link,
@ -1891,7 +1885,7 @@ class API {
* @param {Object} participant - Participant data such as id and name.
* @returns {void}
*/
notifyKnockingParticipant(participant: Object) {
notifyKnockingParticipant(participant) {
this._sendEvent({
name: 'knocking-participant',
participant
@ -1904,7 +1898,7 @@ class API {
* @param {Object} error - The error.
* @returns {void}
*/
notifyError(error: Object) {
notifyError(error) {
this._sendEvent({
name: 'error-occurred',
error
@ -1918,7 +1912,7 @@ class API {
* @param {boolean} preventExecution - Whether execution of the button click was prevented or not.
* @returns {void}
*/
notifyToolbarButtonClicked(key: string, preventExecution: boolean) {
notifyToolbarButtonClicked(key, preventExecution) {
this._sendEvent({
name: 'toolbar-button-clicked',
key,
@ -1932,7 +1926,7 @@ class API {
* @param {boolean} supported - If browser is supported or not.
* @returns {void}
*/
notifyBrowserSupport(supported: boolean) {
notifyBrowserSupport(supported) {
this._sendEvent({
name: 'browser-support',
supported
@ -2026,7 +2020,7 @@ class API {
* @param {WhiteboardStatus} status - The new whiteboard status.
* @returns {void}
*/
notifyWhiteboardStatusChanged(status: WhiteboardStatus) {
notifyWhiteboardStatusChanged(status) {
this._sendEvent({
name: 'whiteboard-status-changed',
status

@ -1,5 +1,3 @@
// @flow
import Logger from '@jitsi/logger';
const logger = Logger.getLogger(__filename);
@ -11,7 +9,7 @@ const logger = Logger.getLogger(__filename);
* the external communication.
* @returns {Promise}
*/
export function getAvailableDevices(transport: Object) {
export function getAvailableDevices(transport) {
return transport.sendRequest({
type: 'devices',
name: 'getAvailableDevices'
@ -29,7 +27,7 @@ export function getAvailableDevices(transport: Object) {
* the external communication.
* @returns {Promise}
*/
export function getCurrentDevices(transport: Object) {
export function getCurrentDevices(transport) {
return transport.sendRequest({
type: 'devices',
name: 'getCurrentDevices'
@ -50,7 +48,7 @@ export function getCurrentDevices(transport: Object) {
* Default - 'input'.
* @returns {Promise}
*/
export function isDeviceChangeAvailable(transport: Object, deviceType: string) {
export function isDeviceChangeAvailable(transport, deviceType) {
return transport.sendRequest({
deviceType,
type: 'devices',
@ -66,7 +64,7 @@ export function isDeviceChangeAvailable(transport: Object, deviceType: string) {
* the external communication.
* @returns {Promise}
*/
export function isDeviceListAvailable(transport: Object) {
export function isDeviceListAvailable(transport) {
return transport.sendRequest({
type: 'devices',
name: 'isDeviceListAvailable'
@ -81,7 +79,7 @@ export function isDeviceListAvailable(transport: Object) {
* the external communication.
* @returns {Promise}
*/
export function isMultipleAudioInputSupported(transport: Object) {
export function isMultipleAudioInputSupported(transport) {
return transport.sendRequest({
type: 'devices',
name: 'isMultipleAudioInputSupported'
@ -97,7 +95,7 @@ export function isMultipleAudioInputSupported(transport: Object) {
* @param {string} id - The id of the new device.
* @returns {Promise}
*/
export function setAudioInputDevice(transport: Object, label: string, id: string) {
export function setAudioInputDevice(transport, label, id) {
return _setDevice(transport, {
id,
kind: 'audioinput',
@ -114,7 +112,7 @@ export function setAudioInputDevice(transport: Object, label: string, id: string
* @param {string} id - The id of the new device.
* @returns {Promise}
*/
export function setAudioOutputDevice(transport: Object, label: string, id: string) {
export function setAudioOutputDevice(transport, label, id) {
return _setDevice(transport, {
id,
kind: 'audiooutput',
@ -130,7 +128,7 @@ export function setAudioOutputDevice(transport: Object, label: string, id: strin
* @param {Object} device - The new device to be used.
* @returns {Promise}
*/
function _setDevice(transport: Object, device) {
function _setDevice(transport, device) {
return transport.sendRequest({
type: 'devices',
name: 'setDevice',
@ -147,7 +145,7 @@ function _setDevice(transport: Object, device) {
* @param {string} id - The id of the new device.
* @returns {Promise}
*/
export function setVideoInputDevice(transport: Object, label: string, id: string) {
export function setVideoInputDevice(transport, label, id) {
return _setDevice(transport, {
id,
kind: 'videoinput',

@ -1,5 +1,4 @@
// @flow
/* global APP */
import Logger from '@jitsi/logger';
import { openConnection } from '../../../connection';
@ -23,7 +22,6 @@ import ExternalLoginDialog from './LoginDialog';
let externalAuthWindow;
declare var APP: Object;
const logger = Logger.getLogger(__filename);
@ -77,7 +75,7 @@ function doExternalAuth(room, lockPassword) {
* back with "?jwt={the JWT token}" query parameter added.
* @param {string} [roomName] the name of the conference room.
*/
export function redirectToTokenAuthService(roomName: string) {
export function redirectToTokenAuthService(roomName) {
const config = APP.store.getState()['features/base/config'];
// FIXME: This method will not preserve the other URL params that were
@ -174,7 +172,7 @@ function initJWTTokenListener(room) {
* @param {JitsiConference} room
* @param {string} [lockPassword] password to use if the conference is locked
*/
function authenticate(room: Object, lockPassword: string) {
function authenticate(room, lockPassword) {
const config = APP.store.getState()['features/base/config'];
if (isTokenAuthEnabled(config) || room.isExternalAuthEnabled()) {
@ -189,7 +187,7 @@ function authenticate(room: Object, lockPassword: string) {
* @param {JitsiConference} room
* @param {string} [lockPassword] password to use if the conference is locked
*/
function requireAuth(room: Object, lockPassword: string) {
function requireAuth(room, lockPassword) {
if (isDialogOpen(APP.store, WaitForOwnerDialog) || isDialogOpen(APP.store, LoginDialog)) {
return;
}
@ -207,7 +205,7 @@ function requireAuth(room: Object, lockPassword: string) {
* @param {string} [lockPassword] password to use if the conference is locked
* @returns {Promise}
*/
function logout(room: Object) {
function logout(room) {
return new Promise(resolve => {
room.room.moderator.logout(resolve);
}).then(url => {

@ -1,6 +1,4 @@
// @flow
declare var APP: Object;
/* global APP */
export default {
@ -10,7 +8,7 @@ export default {
* @param {function} callback - callback to invoke when auth popup is closed.
* @returns auth dialog
*/
showExternalAuthDialog(url: string, callback: ?Function) {
showExternalAuthDialog(url, callback) {
const dialog = APP.UI.messageHandler.openCenteredPopup(
url, 910, 660,

@ -1,15 +1,8 @@
/* @flow */
import $ from 'jquery';
import jqueryI18next from 'jquery-i18next';
import i18next from '../../react/features/base/i18n/i18next';
type DocumentElement = {
lang: string
}
/**
* Notifies that the {@link i18next} instance has finished its initialization.
*
@ -18,7 +11,7 @@ type DocumentElement = {
*/
function _onI18nInitialized() {
const documentElement: DocumentElement
const documentElement
= document.documentElement || {};
$('[data-i18n]').localize();
@ -47,7 +40,7 @@ class Translation {
/**
*
*/
generateTranslationHTML(key: string, options: Object) {
generateTranslationHTML(key, options) {
const optAttr
= options ? ` data-i18n-options='${JSON.stringify(options)}'` : '';
@ -60,7 +53,7 @@ class Translation {
/**
*
*/
translateElement(selector: Object, options: Object) {
translateElement(selector, options) {
// XXX i18next expects undefined if options are missing.
selector.localize(options ? options : undefined);
}

42
package-lock.json generated

@ -123,7 +123,6 @@
"@babel/eslint-parser": "7.21.8",
"@babel/plugin-proposal-export-default-from": "7.16.0",
"@babel/preset-env": "7.16.0",
"@babel/preset-flow": "7.16.0",
"@babel/preset-react": "7.16.0",
"@jitsi/eslint-config": "4.1.5",
"@types/amplitude-js": "8.16.2",
@ -153,7 +152,6 @@
"clean-css-cli": "4.3.0",
"css-loader": "3.6.0",
"eslint": "8.40.0",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsdoc": "37.0.3",
"eslint-plugin-react": "7.32.2",
@ -9375,24 +9373,6 @@
"ms": "^2.1.1"
}
},
"node_modules/eslint-plugin-flowtype": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz",
"integrity": "sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ==",
"dev": true,
"dependencies": {
"lodash": "^4.17.21",
"string-natural-compare": "^3.0.1"
},
"engines": {
"node": ">=12.0.0"
},
"peerDependencies": {
"@babel/plugin-syntax-flow": "^7.14.5",
"@babel/plugin-transform-react-jsx": "^7.14.9",
"eslint": "^8.1.0"
}
},
"node_modules/eslint-plugin-import": {
"version": "2.27.5",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz",
@ -17593,12 +17573,6 @@
}
]
},
"node_modules/string-natural-compare": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz",
"integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==",
"dev": true
},
"node_modules/string-replace-to-array": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string-replace-to-array/-/string-replace-to-array-1.0.3.tgz",
@ -26915,16 +26889,6 @@
}
}
},
"eslint-plugin-flowtype": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz",
"integrity": "sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ==",
"dev": true,
"requires": {
"lodash": "^4.17.21",
"string-natural-compare": "^3.0.1"
}
},
"eslint-plugin-import": {
"version": "2.27.5",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz",
@ -32987,12 +32951,6 @@
}
}
},
"string-natural-compare": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz",
"integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==",
"dev": true
},
"string-replace-to-array": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string-replace-to-array/-/string-replace-to-array-1.0.3.tgz",

@ -128,7 +128,6 @@
"@babel/eslint-parser": "7.21.8",
"@babel/plugin-proposal-export-default-from": "7.16.0",
"@babel/preset-env": "7.16.0",
"@babel/preset-flow": "7.16.0",
"@babel/preset-react": "7.16.0",
"@jitsi/eslint-config": "4.1.5",
"@types/amplitude-js": "8.16.2",
@ -158,7 +157,6 @@
"clean-css-cli": "4.3.0",
"css-loader": "3.6.0",
"eslint": "8.40.0",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsdoc": "37.0.3",
"eslint-plugin-react": "7.32.2",

@ -1,11 +0,0 @@
diff --git a/node_modules/eslint-plugin-flowtype/dist/configs/recommended.json b/node_modules/eslint-plugin-flowtype/dist/configs/recommended.json
index 90a0d69..2ad7d68 100644
--- a/node_modules/eslint-plugin-flowtype/dist/configs/recommended.json
+++ b/node_modules/eslint-plugin-flowtype/dist/configs/recommended.json
@@ -1,5 +1,5 @@
{
- "parser": "@babel/eslint",
+ "parser": "@babel/eslint-parser",
"parserOptions": {
"babelOptions": {
"plugins": [

@ -1,7 +1,6 @@
module.exports = {
'extends': [
'../.eslintrc.js',
'@jitsi/eslint-config/flow',
'@jitsi/eslint-config/jsdoc',
'@jitsi/eslint-config/react',
'.eslintrc-react-native.js'
@ -30,15 +29,10 @@ module.exports = {
}
],
'rules': {
'flowtype/no-types-missing-file-annotation': 0,
// XXX remove this eventually.
'react/jsx-indent-props': 0
},
'settings': {
'flowtype': {
'onlyFilesWithFlowAnnotation': true
},
'react': {
'version': 'detect'
}

@ -1,5 +1,3 @@
// @flow
import { NativeModules } from 'react-native';
let GoogleSignin;
@ -29,7 +27,7 @@ class GoogleApi {
* {@code GoogleSignin.configure}.
* @returns {void}
*/
configure(config: Object) {
configure(config) {
if (GoogleSignin) {
GoogleSignin.configure(config);
}
@ -40,7 +38,7 @@ class GoogleApi {
*
* @returns {Promise}
*/
getTokens(): Promise<*> {
getTokens() {
return GoogleSignin.getTokens();
}
@ -51,7 +49,7 @@ class GoogleApi {
* @param {string} accessToken - The Google auth token.
* @returns {Promise}
*/
getYouTubeLiveStreams(accessToken: string): Promise<*> {
getYouTubeLiveStreams(accessToken) {
return new Promise((resolve, reject) => {
// Fetching the list of available broadcasts first.
@ -116,7 +114,7 @@ class GoogleApi {
* params if needed.
* @returns {Promise}
*/
_fetchGoogleEndpoint(accessToken, endpoint): Promise<*> {
_fetchGoogleEndpoint(accessToken, endpoint) {
return new Promise((resolve, reject) => {
const headers = {
Authorization: `Bearer ${accessToken}`
@ -145,7 +143,7 @@ class GoogleApi {
* to retrieve streams for.
* @returns {Promise}
*/
_getLiveStreamsForBroadcasts(accessToken, broadcasts): Promise<*> {
_getLiveStreamsForBroadcasts(accessToken, broadcasts) {
return new Promise((resolve, reject) => {
const ids = [];

@ -209,7 +209,7 @@ const googleApi = {
* @param {boolean} consent - Whether to show account selection dialog.
* @returns {Promise}
*/
showAccountSelection(consent: boolean) {
showAccountSelection(consent) {
return this.get()
.then(api => new Promise((resolve, reject) => {
try {
@ -244,7 +244,7 @@ const googleApi = {
* @param {boolean} consent - Whether to show account selection dialog.
* @returns {Promise}
*/
signInIfNotSignedIn(consent: boolean) {
signInIfNotSignedIn(consent) {
return this.get()
.then(() => this.isSignedIn())
.then(isSignedIn => {

@ -1,5 +1,3 @@
// @flow
import { RTCPeerConnection as PC } from 'react-native-webrtc';
import { synthesizeIPv6Addresses } from './ipv6utils';
@ -15,7 +13,7 @@ export default class RTCPeerConnection extends PC {
* @param {Object} description - SDP.
* @returns {Promise<undefined>} A promise which is resolved once the operation is complete.
*/
async setRemoteDescription(description: Object) {
async setRemoteDescription(description) {
return super.setRemoteDescription(await synthesizeIPv6Addresses(description));
}
}

@ -1,5 +1,3 @@
// @flow
import { NativeModules } from 'react-native';
import { RTCSessionDescription } from 'react-native-webrtc';
@ -11,7 +9,7 @@ import { RTCSessionDescription } from 'react-native-webrtc';
* @private
* @returns {Promise}
*/
export function synthesizeIPv6Addresses(sdp: RTCSessionDescription) {
export function synthesizeIPv6Addresses(sdp) {
return (
new Promise(resolve => resolve(_synthesizeIPv6Addresses0(sdp)))
.then(({ ips, lines }) =>
@ -32,7 +30,7 @@ export function synthesizeIPv6Addresses(sdp: RTCSessionDescription) {
* be treated as inability to synthesize an IPv6 address from the specified
* {@code ipv4}.
*/
const _synthesizeIPv6FromIPv4Address: string => Promise<?string> = (function() {
const _synthesizeIPv6FromIPv4Address = (function() {
// POSIX.getaddrinfo
const { POSIX } = NativeModules;

@ -1,5 +1,3 @@
// @flow
/**
* Helper method used to process screenshots captured by the {@code ScreenshotCaptureEffect}.
*
@ -7,6 +5,6 @@
* @param {Object} options - Custom options required for processing.
* @returns {void}
*/
export function processScreenshot(canvas: HTMLCanvasElement, options: Object) { // eslint-disable-line no-unused-vars
export function processScreenshot(canvas, options) { // eslint-disable-line no-unused-vars
return;
}

@ -1,5 +1,3 @@
// @flow
// https://github.com/software-mansion/react-native-gesture-handler/issues/320#issuecomment-443815828
import 'react-native-gesture-handler';
@ -15,17 +13,6 @@ import { App } from './features/app/components/App.native';
import { _initLogging } from './features/base/logging/functions';
import JitsiThemePaperProvider from './features/base/ui/components/JitsiThemeProvider';
/**
* The type of the React {@code Component} props of {@link Root}.
*/
type Props = {
/**
* The URL, if any, with which the app was launched.
*/
url: Object | string
};
/**
* React Native doesn't support specifying props to the main/root component (in
* the JS/JSX source code). So create a wrapper React Component (class) around
@ -33,7 +20,7 @@ type Props = {
*
* @augments Component
*/
class Root extends PureComponent<Props> {
class Root extends PureComponent {
/**
* Implements React's {@link Component#render()}.
*

@ -136,7 +136,6 @@ function getConfig(options = {}) {
}
],
require.resolve('@babel/preset-flow'),
require.resolve('@babel/preset-react')
]
},

Loading…
Cancel
Save