Skip to content

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

feat(eslint): tame the beast

Saúl Ibarra Corretgé2ae2f04f0a06
diff --git a/modules/API/API.js b/modules/API/API.js
index e1279896df..60907761e8 100644
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -112,7 +112,7 @@ function initCommands() {
const { name } = request;
switch (name) {
- case 'invite': // eslint-disable-line no-case-declarations
+ case 'invite': {
const { invitees } = request;
if (!Array.isArray(invitees) || invitees.length === 0) {
@@ -143,6 +143,7 @@ function initCommands() {
});
});
break;
+ }
case 'is-audio-muted':
callback(APP.conference.isLocalAudioMuted());
break;
diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js
index 063aa28c06..814a11540d 100644
--- a/modules/API/external/external_api.js
+++ b/modules/API/external/external_api.js
@@ -114,10 +114,10 @@ function parseArguments(args) {
switch (typeof firstArg) {
case 'string': // old arguments format
- case undefined: // eslint-disable-line no-case-declarations
- // not sure which format but we are trying to parse the old
- // format because if the new format is used everything will be undefined
- // anyway.
+ case undefined: {
+ // Not sure which format but we are trying to parse the old
+ // format because if the new format is used everything will be undefined
+ // anyway.
const [
roomName,
width,
@@ -141,6 +141,7 @@ function parseArguments(args) {
jwt,
onload
};
+ }
case 'object': // new arguments format
return args[0];
default:
diff --git a/modules/UI/etherpad/Etherpad.js b/modules/UI/etherpad/Etherpad.js
index 9dd23966da..5b6150925e 100644
--- a/modules/UI/etherpad/Etherpad.js
+++ b/modules/UI/etherpad/Etherpad.js
@@ -87,6 +87,7 @@ class Etherpad extends LargeContainer {
this.container.appendChild(iframe);
iframe.onload = function() {
+ // eslint-disable-next-line no-self-assign
document.domain = document.domain;
bubbleIframeMouseMove(iframe);
diff --git a/react/.eslintrc.js b/react/.eslintrc.js
index 1e0005944b..7373d76c3a 100644
--- a/react/.eslintrc.js
+++ b/react/.eslintrc.js
@@ -4,5 +4,8 @@ module.exports = {
'eslint-config-jitsi/jsdoc',
'eslint-config-jitsi/react',
'.eslintrc-react-native.js'
- ]
+ ],
+ 'rules': {
+ 'react/no-deprecated': 0
+ }
};
diff --git a/react/features/local-recording/session/SessionManager.js b/react/features/local-recording/session/SessionManager.js
index e43ac7a05f..fb12a6e0b4 100644
--- a/react/features/local-recording/session/SessionManager.js
+++ b/react/features/local-recording/session/SessionManager.js
@@ -219,7 +219,7 @@ class SessionManager {
for (let i = 0; i < sessionTokens.length; ++i) {
const thisSession = this._sessionsMetadata[sessionTokens[i]];
- const newSessionInfo : SessionInfo = {
+ const newSessionInfo: SessionInfo = {
start: thisSession.events[0].timestamp,
format: thisSession.format,
sessionToken: sessionTokens[i],
@@ -348,8 +348,7 @@ class SessionManager {
const output = [];
let sessionStartTime = null;
- let currentSegment : SegmentInfo = {
- };
+ let currentSegment: SegmentInfo = {};
/**
* Helper function for adding a new {@code SegmentInfo} object to the
diff --git a/react/features/welcome/roomnameGenerator.js b/react/features/welcome/roomnameGenerator.js
index 59a7fef0b4..65ea76be71 100644
--- a/react/features/welcome/roomnameGenerator.js
+++ b/react/features/welcome/roomnameGenerator.js
@@ -172,32 +172,32 @@ const PATTERNS = [
'_ADJECTIVE__PLURALNOUN__VERB__ADVERB_'
// BeautifulFungiOrSpaghetti
-// '_ADJECTIVE__PLURALNOUN__CONJUNCTION__PLURALNOUN_',
+ // '_ADJECTIVE__PLURALNOUN__CONJUNCTION__PLURALNOUN_',
// AmazinglyScaryToy
-// '_ADVERB__ADJECTIVE__NOUN_',
+ // '_ADVERB__ADJECTIVE__NOUN_',
// NeitherTrashNorRifle
-// 'Neither_NOUN_Nor_NOUN_',
-// 'Either_NOUN_Or_NOUN_',
+ // 'Neither_NOUN_Nor_NOUN_',
+ // 'Either_NOUN_Or_NOUN_',
// EitherCopulateOrInvestigate
-// 'Either_VERB_Or_VERB_',
-// 'Neither_VERB_Nor_VERB_',
+ // 'Either_VERB_Or_VERB_',
+ // 'Neither_VERB_Nor_VERB_',
-// 'The_ADJECTIVE__ADJECTIVE__NOUN_',
-// 'The_ADVERB__ADJECTIVE__NOUN_',
-// 'The_ADVERB__ADJECTIVE__NOUN_s',
-// 'The_ADVERB__ADJECTIVE__PLURALNOUN__VERB_',
+ // 'The_ADJECTIVE__ADJECTIVE__NOUN_',
+ // 'The_ADVERB__ADJECTIVE__NOUN_',
+ // 'The_ADVERB__ADJECTIVE__NOUN_s',
+ // 'The_ADVERB__ADJECTIVE__PLURALNOUN__VERB_',
// WolvesComputeBadly
-// '_PLURALNOUN__VERB__ADVERB_',
+ // '_PLURALNOUN__VERB__ADVERB_',
// UniteFacilitateAndMerge
-// '_VERB__VERB_And_VERB_',
+ // '_VERB__VERB_And_VERB_',
// NastyWitchesAtThePub
-// '_ADJECTIVE__PLURALNOUN_AtThe_PLACE_',
+ // '_ADJECTIVE__PLURALNOUN_AtThe_PLACE_',
];
/**