Skip to content

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

removes need for `eslint-disable-next-line react/jsx-wrap-multilines` and `eslint-diable-line no extra-parens`

Ritwik Heda1d99abc4a425
diff --git a/package-lock.json b/package-lock.json
index 548eb48fec..94d5d54d74 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6449,8 +6449,8 @@
}
},
"eslint-config-jitsi": {
- "version": "github:jitsi/eslint-config-jitsi#3d193df6476a73f827582e137a67a8612130a455",
- "from": "github:jitsi/eslint-config-jitsi#v0.1.0",
+ "version": "github:jitsi/eslint-config-jitsi#7474f6668515eb5852f1273dc5a50b940a550d3f",
+ "from": "github:jitsi/eslint-config-jitsi#7474f6668515eb5852f1273dc5a50b940a550d3f",
"dev": true
},
"eslint-import-resolver-node": {
diff --git a/package.json b/package.json
index a31a0c2f3e..774a7789a7 100644
--- a/package.json
+++ b/package.json
@@ -88,7 +88,7 @@
"clean-css": "3.4.25",
"css-loader": "0.28.7",
"eslint": "4.12.1",
- "eslint-config-jitsi": "github:jitsi/eslint-config-jitsi#v0.1.0",
+ "eslint-config-jitsi": "github:jitsi/eslint-config-jitsi#7474f6668515eb5852f1273dc5a50b940a550d3f",
"eslint-plugin-flowtype": "2.39.1",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsdoc": "3.2.0",
diff --git a/react/features/base/dialog/components/Dialog.native.js b/react/features/base/dialog/components/Dialog.native.js
index ff702c728e..dd668e7160 100644
--- a/react/features/base/dialog/components/Dialog.native.js
+++ b/react/features/base/dialog/components/Dialog.native.js
@@ -113,7 +113,7 @@ class Dialog extends AbstractDialog<Props, State> {
[_TAG_KEY]: _SUBMIT_TEXT_TAG_VALUE
};
- let el: ?React$Element<*> = ( // eslint-disable-line no-extra-parens
+ let el: ?React$Element<*> = (
<Prompt
cancelButtonTextStyle = { cancelButtonTextStyle }
cancelText = { t(cancelTitleKey) }
diff --git a/react/features/base/media/components/native/Video.js b/react/features/base/media/components/native/Video.js
index 2907df2007..42dc4e83d7 100644
--- a/react/features/base/media/components/native/Video.js
+++ b/react/features/base/media/components/native/Video.js
@@ -93,7 +93,7 @@ export default class Video extends Component<*> {
? 'contain'
: (style && style.objectFit) || 'cover';
const rtcView
- = ( // eslint-disable-line no-extra-parens
+ = (
<RTCView
mirror = { this.props.mirror }
objectFit = { objectFit }
diff --git a/react/features/base/react/components/web/InlineDialogFailure.js b/react/features/base/react/components/web/InlineDialogFailure.js
index a792a19482..ef88446982 100644
--- a/react/features/base/react/components/web/InlineDialogFailure.js
+++ b/react/features/base/react/components/web/InlineDialogFailure.js
@@ -41,7 +41,7 @@ class InlineDialogFailure extends Component<*> {
const supportString = t('inlineDialogFailure.supportMsg');
const supportLinkElem
= supportLink
- ? ( // eslint-disable-line no-extra-parens
+ ? (
<div className = 'inline-dialog-error-text'>
<span>{ supportString.padEnd(supportString.length + 1) }
</span>
diff --git a/react/features/base/react/components/web/MultiSelectAutocomplete.js b/react/features/base/react/components/web/MultiSelectAutocomplete.js
index 2370dea8d4..254f7b8fc1 100644
--- a/react/features/base/react/components/web/MultiSelectAutocomplete.js
+++ b/react/features/base/react/components/web/MultiSelectAutocomplete.js
@@ -244,7 +244,7 @@ class MultiSelectAutocomplete extends Component {
if (!this.state.error) {
return null;
}
- const content = ( // eslint-disable-line no-extra-parens
+ const content = (
<div className = 'autocomplete-error'>
<InlineDialogFailure
onRetry = { this._onRetry } />
diff --git a/react/features/base/react/components/web/SectionList.js b/react/features/base/react/components/web/SectionList.js
index cdef6220e1..c34806ce7a 100644
--- a/react/features/base/react/components/web/SectionList.js
+++ b/react/features/base/react/components/web/SectionList.js
@@ -60,7 +60,6 @@ export default class SectionList extends Component<Props> {
*/
if (sections) {
return (
- /* eslint-disable no-extra-parens */
<Container
className = 'navigate-section-list'>
{
@@ -83,7 +82,6 @@ export default class SectionList extends Component<Props> {
)
}
</Container>
- /* eslint-enable no-extra-parens */
);
}
diff --git a/react/features/base/react/components/web/Watermarks.js b/react/features/base/react/components/web/Watermarks.js
index 7467600fba..b2254e1872 100644
--- a/react/features/base/react/components/web/Watermarks.js
+++ b/react/features/base/react/components/web/Watermarks.js
@@ -105,7 +105,7 @@ class Watermarks extends Component<*, *> {
let reactElement = null;
if (this.state.showBrandWatermark) {
- reactElement = ( // eslint-disable-line no-extra-parens
+ reactElement = (
<div
className = 'watermark rightwatermark'
style = { _RIGHT_WATERMARK_STYLE } />
@@ -114,7 +114,7 @@ class Watermarks extends Component<*, *> {
const { brandWatermarkLink } = this.state;
if (brandWatermarkLink) {
- reactElement = ( // eslint-disable-line no-extra-parens
+ reactElement = (
<a
href = { brandWatermarkLink }
target = '_new'>
@@ -144,7 +144,7 @@ class Watermarks extends Component<*, *> {
const { jitsiWatermarkLink } = this.state;
if (jitsiWatermarkLink) {
- reactElement = ( // eslint-disable-line no-extra-parens
+ reactElement = (
<a
href = { jitsiWatermarkLink }
target = '_new'>
diff --git a/react/features/base/toolbox/components/ToolboxItem.native.js b/react/features/base/toolbox/components/ToolboxItem.native.js
index 63ac012e71..89efc205ac 100644
--- a/react/features/base/toolbox/components/ToolboxItem.native.js
+++ b/react/features/base/toolbox/components/ToolboxItem.native.js
@@ -67,7 +67,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
// XXX TouchableHighlight requires 1 child. If there's a need to
// show both the icon and the label, then these two need to be
// wrapped in a View.
- children = ( // eslint-disable-line no-extra-parens
+ children = (
<View style = { style }>
{ children }
<Text style = { styles && styles.labelStyle }>
diff --git a/react/features/base/toolbox/components/ToolboxItem.web.js b/react/features/base/toolbox/components/ToolboxItem.web.js
index bfd985e117..ff8bcddfe8 100644
--- a/react/features/base/toolbox/components/ToolboxItem.web.js
+++ b/react/features/base/toolbox/components/ToolboxItem.web.js
@@ -35,7 +35,6 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
};
const elementType = showLabel ? 'li' : 'div';
const useTooltip = this.tooltip && this.tooltip.length > 0;
- // eslint-disable-next-line no-extra-parens
let children = (
<Fragment>
{ this._renderIcon() }
@@ -47,7 +46,6 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
);
if (useTooltip) {
- // eslint-disable-next-line no-extra-parens
children = (
<Tooltip
content = { this.tooltip }
diff --git a/react/features/connection-stats/components/ConnectionStatsTable.js b/react/features/connection-stats/components/ConnectionStatsTable.js
index ec0b5cd1e9..26fdd0560d 100644
--- a/react/features/connection-stats/components/ConnectionStatsTable.js
+++ b/react/features/connection-stats/components/ConnectionStatsTable.js
@@ -280,7 +280,6 @@ class ConnectionStatsTable extends Component {
if (packetLoss) {
const { download, upload } = packetLoss;
- // eslint-disable-next-line no-extra-parens
packetLossTableData = (
<td>
<span className = 'connection-info__download'>
@@ -392,7 +391,6 @@ class ConnectionStatsTable extends Component {
const { t, transport } = this.props;
if (!transport || transport.length === 0) {
- // eslint-disable-next-line no-extra-parens
const NA = (
<tr key = 'address'>
<td>
diff --git a/react/features/desktop-picker/components/DesktopPickerPane.js b/react/features/desktop-picker/components/DesktopPickerPane.js
index c8546a67c7..89d3a7829c 100644
--- a/react/features/desktop-picker/components/DesktopPickerPane.js
+++ b/react/features/desktop-picker/components/DesktopPickerPane.js
@@ -61,18 +61,16 @@ class DesktopPickerPane extends Component {
const classNames
= `desktop-picker-pane default-scrollbar source-type-${type}`;
const previews
- = sources ? sources.map(
- source =>
-
- // eslint-disable-next-line react/jsx-wrap-multilines
+ = sources
+ ? sources.map(source => (
<DesktopSourcePreview
key = { source.id }
onClick = { onClick }
onDoubleClick = { onDoubleClick }
selected = { source.id === selectedSourceId }
source = { source }
- type = { type } />)
- : ( // eslint-disable-line no-extra-parens
+ type = { type } />))
+ : (
<div className = 'desktop-picker-pane-spinner'>
<Spinner
isCompleting = { false }
diff --git a/react/features/filmstrip/components/native/Filmstrip.js b/react/features/filmstrip/components/native/Filmstrip.js
index 0cc234ed88..0061a226ab 100644
--- a/react/features/filmstrip/components/native/Filmstrip.js
+++ b/react/features/filmstrip/components/native/Filmstrip.js
@@ -121,17 +121,15 @@ class Filmstrip extends Component<Props> {
&& <LocalThumbnail />
}
{
- /* eslint-disable react/jsx-wrap-multilines */
this._sort(
this.props._participants,
isNarrowAspectRatio_)
- .map(p =>
+ .map(p => (
<Thumbnail
key = { p.id }
- participant = { p } />)
+ participant = { p } />))
- /* eslint-enable react/jsx-wrap-multilines */
}
{
!this._separateLocalThumbnail
diff --git a/react/features/invite/components/AddPeopleDialog.web.js b/react/features/invite/components/AddPeopleDialog.web.js
index b778717fe8..697cfde288 100644
--- a/react/features/invite/components/AddPeopleDialog.web.js
+++ b/react/features/invite/components/AddPeopleDialog.web.js
@@ -477,7 +477,7 @@ class AddPeopleDialog extends Component<*, *> {
const supportString = t('inlineDialogFailure.supportMsg');
const supportLink = interfaceConfig.SUPPORT_URL;
const supportLinkContent
- = ( // eslint-disable-line no-extra-parens
+ = (
<span>
<span>
{ supportString.padEnd(supportString.length + 1) }
diff --git a/react/features/notifications/components/Notification.native.js b/react/features/notifications/components/Notification.native.js
index 15b34d4871..7008947e9e 100644
--- a/react/features/notifications/components/Notification.native.js
+++ b/react/features/notifications/components/Notification.native.js
@@ -76,7 +76,6 @@ class Notification extends AbstractNotification<Props> {
pointerEvents = 'box-none'
style = { styles.notificationContent }>
{
- // eslint-disable-next-line no-extra-parens
this._getDescription().map((line, index) => (
<Text
key = { index }
diff --git a/react/features/recording/components/LiveStream/BroadcastsDropdown.web.js b/react/features/recording/components/LiveStream/BroadcastsDropdown.web.js
index f7b0bc6318..07c4e7e3d5 100644
--- a/react/features/recording/components/LiveStream/BroadcastsDropdown.web.js
+++ b/react/features/recording/components/LiveStream/BroadcastsDropdown.web.js
@@ -86,19 +86,20 @@ class BroadcastsDropdown extends PureComponent {
render() {
const { broadcasts, selectedBoundStreamID, t } = this.props;
- const dropdownItems = broadcasts.map(broadcast =>
- // eslint-disable-next-line react/jsx-wrap-multilines
- <DropdownItem
- key = { broadcast.boundStreamID }
- // eslint-disable-next-line react/jsx-no-bind
- onClick = { () => this._onSelect(broadcast.boundStreamID) }>
- { broadcast.title }
- </DropdownItem>
- );
- const selected = this.props.broadcasts.find(
- broadcast => broadcast.boundStreamID === selectedBoundStreamID);
- const triggerText = (selected && selected.title)
- || t('liveStreaming.choose');
+ const dropdownItems
+ = broadcasts.map(broadcast => (
+ <DropdownItem
+ key = { broadcast.boundStreamID }
+
+ // eslint-disable-next-line react/jsx-no-bind
+ onClick = { () => this._onSelect(broadcast.boundStreamID) }>
+ { broadcast.title }
+ </DropdownItem>));
+ const selected
+ = this.props.broadcasts.find(
+ broadcast => broadcast.boundStreamID === selectedBoundStreamID);
+ const triggerText
+ = (selected && selected.title) || t('liveStreaming.choose');
return (
<div className = 'broadcast-dropdown'>
diff --git a/react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js b/react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js
index 9c3984f7b4..2807cf9a24 100644
--- a/react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js
+++ b/react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js
@@ -237,7 +237,7 @@ class StartLiveStreamDialog
switch (this.props._googleAPIState) {
case GOOGLE_API_STATES.LOADED:
- googleContent = ( // eslint-disable-line no-extra-parens
+ googleContent = (
<GoogleSignInButton
onClick = { this._onGoogleSignIn }
text = { t('liveStreaming.signIn') } />
@@ -247,7 +247,7 @@ class StartLiveStreamDialog
break;
case GOOGLE_API_STATES.SIGNED_IN:
- googleContent = ( // eslint-disable-line no-extra-parens
+ googleContent = (
<BroadcastsDropdown
broadcasts = { broadcasts }
onBroadcastSelected = { this._onYouTubeBroadcastIDSelected }
@@ -259,7 +259,7 @@ class StartLiveStreamDialog
* that also accepts the anchor. This can be done using the Trans
* component of react-i18next but I couldn't get it working...
*/
- helpText = ( // eslint-disable-line no-extra-parens
+ helpText = (
<div>
{ `${t('liveStreaming.chooseCTA',
{ email: _googleProfileEmail })} ` }
@@ -273,7 +273,7 @@ class StartLiveStreamDialog
case GOOGLE_API_STATES.NEEDS_LOADING:
default:
- googleContent = ( // eslint-disable-line no-extra-parens
+ googleContent = (
<Spinner
isCompleting = { false }
size = 'medium' />
@@ -283,7 +283,7 @@ class StartLiveStreamDialog
}
if (this.state.errorType !== undefined) {
- googleContent = ( // eslint-disable-line no-extra-parens
+ googleContent = (
<GoogleSignInButton
onClick = { this._onRequestGoogleSignIn }
text = { t('liveStreaming.signIn') } />
diff --git a/react/features/settings/components/web/MoreTab.js b/react/features/settings/components/web/MoreTab.js
index f77dd32d6f..7e136f4d50 100644
--- a/react/features/settings/components/web/MoreTab.js
+++ b/react/features/settings/components/web/MoreTab.js
@@ -143,16 +143,16 @@ class MoreTab extends AbstractDialogTab<Props, State> {
t
} = this.props;
- const languageItems = languages.map(language =>
- // eslint-disable-next-line react/jsx-wrap-multilines
- <DropdownItem
- key = { language }
- // eslint-disable-next-line react/jsx-no-bind
- onClick = {
- () => super._onChange({ currentLanguage: language }) }>
- { t(`languages:${language}`) }
- </DropdownItem>
- );
+ const languageItems
+ = languages.map(language => (
+ <DropdownItem
+ key = { language }
+
+ // eslint-disable-next-line react/jsx-no-bind
+ onClick = {
+ () => super._onChange({ currentLanguage: language }) }>
+ { t(`languages:${language}`) }
+ </DropdownItem>));
return (
<div
diff --git a/react/features/toolbox/components/web/OverflowMenuItem.js b/react/features/toolbox/components/web/OverflowMenuItem.js
index d9dc88e958..3834d0a4b5 100644
--- a/react/features/toolbox/components/web/OverflowMenuItem.js
+++ b/react/features/toolbox/components/web/OverflowMenuItem.js
@@ -101,7 +101,7 @@ class OverflowMenuItem extends Component<Props> {
* @returns {ReactElement}
*/
_renderText() {
- const textElement = ( // eslint-disable-line no-extra-parens
+ const textElement = (
<span className = 'overflow-menu-item-text'>
{ this.props.text }
</span>
diff --git a/react/features/welcome/components/WelcomePage.native.js b/react/features/welcome/components/WelcomePage.native.js
index 1312fc8cb5..7001576905 100644
--- a/react/features/welcome/components/WelcomePage.native.js
+++ b/react/features/welcome/components/WelcomePage.native.js
@@ -230,7 +230,6 @@ class WelcomePage extends AbstractWelcomePage {
const { t } = this.props;
let children;
- /* eslint-disable no-extra-parens */
if (this.state.joining) {
// TouchableHighlight is picky about what its children can be, so
@@ -251,7 +250,6 @@ class WelcomePage extends AbstractWelcomePage {
);
}
- /* eslint-enable no-extra-parens */
const buttonDisabled = this._isJoinDisabled();