removes need for `eslint-disable-next-line react/jsx-wrap-multilines` and `eslint-diable-line no extra-parens`
This commit is contained in:
parent
9aed4df6d2
commit
1d99abc4a4
|
@ -6449,8 +6449,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-config-jitsi": {
|
"eslint-config-jitsi": {
|
||||||
"version": "github:jitsi/eslint-config-jitsi#3d193df6476a73f827582e137a67a8612130a455",
|
"version": "github:jitsi/eslint-config-jitsi#7474f6668515eb5852f1273dc5a50b940a550d3f",
|
||||||
"from": "github:jitsi/eslint-config-jitsi#v0.1.0",
|
"from": "github:jitsi/eslint-config-jitsi#7474f6668515eb5852f1273dc5a50b940a550d3f",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"eslint-import-resolver-node": {
|
"eslint-import-resolver-node": {
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
"clean-css": "3.4.25",
|
"clean-css": "3.4.25",
|
||||||
"css-loader": "0.28.7",
|
"css-loader": "0.28.7",
|
||||||
"eslint": "4.12.1",
|
"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-flowtype": "2.39.1",
|
||||||
"eslint-plugin-import": "2.8.0",
|
"eslint-plugin-import": "2.8.0",
|
||||||
"eslint-plugin-jsdoc": "3.2.0",
|
"eslint-plugin-jsdoc": "3.2.0",
|
||||||
|
|
|
@ -113,7 +113,7 @@ class Dialog extends AbstractDialog<Props, State> {
|
||||||
[_TAG_KEY]: _SUBMIT_TEXT_TAG_VALUE
|
[_TAG_KEY]: _SUBMIT_TEXT_TAG_VALUE
|
||||||
};
|
};
|
||||||
|
|
||||||
let el: ?React$Element<*> = ( // eslint-disable-line no-extra-parens
|
let el: ?React$Element<*> = (
|
||||||
<Prompt
|
<Prompt
|
||||||
cancelButtonTextStyle = { cancelButtonTextStyle }
|
cancelButtonTextStyle = { cancelButtonTextStyle }
|
||||||
cancelText = { t(cancelTitleKey) }
|
cancelText = { t(cancelTitleKey) }
|
||||||
|
|
|
@ -93,7 +93,7 @@ export default class Video extends Component<*> {
|
||||||
? 'contain'
|
? 'contain'
|
||||||
: (style && style.objectFit) || 'cover';
|
: (style && style.objectFit) || 'cover';
|
||||||
const rtcView
|
const rtcView
|
||||||
= ( // eslint-disable-line no-extra-parens
|
= (
|
||||||
<RTCView
|
<RTCView
|
||||||
mirror = { this.props.mirror }
|
mirror = { this.props.mirror }
|
||||||
objectFit = { objectFit }
|
objectFit = { objectFit }
|
||||||
|
|
|
@ -41,7 +41,7 @@ class InlineDialogFailure extends Component<*> {
|
||||||
const supportString = t('inlineDialogFailure.supportMsg');
|
const supportString = t('inlineDialogFailure.supportMsg');
|
||||||
const supportLinkElem
|
const supportLinkElem
|
||||||
= supportLink
|
= supportLink
|
||||||
? ( // eslint-disable-line no-extra-parens
|
? (
|
||||||
<div className = 'inline-dialog-error-text'>
|
<div className = 'inline-dialog-error-text'>
|
||||||
<span>{ supportString.padEnd(supportString.length + 1) }
|
<span>{ supportString.padEnd(supportString.length + 1) }
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -244,7 +244,7 @@ class MultiSelectAutocomplete extends Component {
|
||||||
if (!this.state.error) {
|
if (!this.state.error) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const content = ( // eslint-disable-line no-extra-parens
|
const content = (
|
||||||
<div className = 'autocomplete-error'>
|
<div className = 'autocomplete-error'>
|
||||||
<InlineDialogFailure
|
<InlineDialogFailure
|
||||||
onRetry = { this._onRetry } />
|
onRetry = { this._onRetry } />
|
||||||
|
|
|
@ -60,7 +60,6 @@ export default class SectionList extends Component<Props> {
|
||||||
*/
|
*/
|
||||||
if (sections) {
|
if (sections) {
|
||||||
return (
|
return (
|
||||||
/* eslint-disable no-extra-parens */
|
|
||||||
<Container
|
<Container
|
||||||
className = 'navigate-section-list'>
|
className = 'navigate-section-list'>
|
||||||
{
|
{
|
||||||
|
@ -83,7 +82,6 @@ export default class SectionList extends Component<Props> {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</Container>
|
</Container>
|
||||||
/* eslint-enable no-extra-parens */
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ class Watermarks extends Component<*, *> {
|
||||||
let reactElement = null;
|
let reactElement = null;
|
||||||
|
|
||||||
if (this.state.showBrandWatermark) {
|
if (this.state.showBrandWatermark) {
|
||||||
reactElement = ( // eslint-disable-line no-extra-parens
|
reactElement = (
|
||||||
<div
|
<div
|
||||||
className = 'watermark rightwatermark'
|
className = 'watermark rightwatermark'
|
||||||
style = { _RIGHT_WATERMARK_STYLE } />
|
style = { _RIGHT_WATERMARK_STYLE } />
|
||||||
|
@ -114,7 +114,7 @@ class Watermarks extends Component<*, *> {
|
||||||
const { brandWatermarkLink } = this.state;
|
const { brandWatermarkLink } = this.state;
|
||||||
|
|
||||||
if (brandWatermarkLink) {
|
if (brandWatermarkLink) {
|
||||||
reactElement = ( // eslint-disable-line no-extra-parens
|
reactElement = (
|
||||||
<a
|
<a
|
||||||
href = { brandWatermarkLink }
|
href = { brandWatermarkLink }
|
||||||
target = '_new'>
|
target = '_new'>
|
||||||
|
@ -144,7 +144,7 @@ class Watermarks extends Component<*, *> {
|
||||||
const { jitsiWatermarkLink } = this.state;
|
const { jitsiWatermarkLink } = this.state;
|
||||||
|
|
||||||
if (jitsiWatermarkLink) {
|
if (jitsiWatermarkLink) {
|
||||||
reactElement = ( // eslint-disable-line no-extra-parens
|
reactElement = (
|
||||||
<a
|
<a
|
||||||
href = { jitsiWatermarkLink }
|
href = { jitsiWatermarkLink }
|
||||||
target = '_new'>
|
target = '_new'>
|
||||||
|
|
|
@ -67,7 +67,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
|
||||||
// XXX TouchableHighlight requires 1 child. If there's a need to
|
// XXX TouchableHighlight requires 1 child. If there's a need to
|
||||||
// show both the icon and the label, then these two need to be
|
// show both the icon and the label, then these two need to be
|
||||||
// wrapped in a View.
|
// wrapped in a View.
|
||||||
children = ( // eslint-disable-line no-extra-parens
|
children = (
|
||||||
<View style = { style }>
|
<View style = { style }>
|
||||||
{ children }
|
{ children }
|
||||||
<Text style = { styles && styles.labelStyle }>
|
<Text style = { styles && styles.labelStyle }>
|
||||||
|
|
|
@ -35,7 +35,6 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
|
||||||
};
|
};
|
||||||
const elementType = showLabel ? 'li' : 'div';
|
const elementType = showLabel ? 'li' : 'div';
|
||||||
const useTooltip = this.tooltip && this.tooltip.length > 0;
|
const useTooltip = this.tooltip && this.tooltip.length > 0;
|
||||||
// eslint-disable-next-line no-extra-parens
|
|
||||||
let children = (
|
let children = (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{ this._renderIcon() }
|
{ this._renderIcon() }
|
||||||
|
@ -47,7 +46,6 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (useTooltip) {
|
if (useTooltip) {
|
||||||
// eslint-disable-next-line no-extra-parens
|
|
||||||
children = (
|
children = (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content = { this.tooltip }
|
content = { this.tooltip }
|
||||||
|
|
|
@ -280,7 +280,6 @@ class ConnectionStatsTable extends Component {
|
||||||
if (packetLoss) {
|
if (packetLoss) {
|
||||||
const { download, upload } = packetLoss;
|
const { download, upload } = packetLoss;
|
||||||
|
|
||||||
// eslint-disable-next-line no-extra-parens
|
|
||||||
packetLossTableData = (
|
packetLossTableData = (
|
||||||
<td>
|
<td>
|
||||||
<span className = 'connection-info__download'>
|
<span className = 'connection-info__download'>
|
||||||
|
@ -392,7 +391,6 @@ class ConnectionStatsTable extends Component {
|
||||||
const { t, transport } = this.props;
|
const { t, transport } = this.props;
|
||||||
|
|
||||||
if (!transport || transport.length === 0) {
|
if (!transport || transport.length === 0) {
|
||||||
// eslint-disable-next-line no-extra-parens
|
|
||||||
const NA = (
|
const NA = (
|
||||||
<tr key = 'address'>
|
<tr key = 'address'>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -61,18 +61,16 @@ class DesktopPickerPane extends Component {
|
||||||
const classNames
|
const classNames
|
||||||
= `desktop-picker-pane default-scrollbar source-type-${type}`;
|
= `desktop-picker-pane default-scrollbar source-type-${type}`;
|
||||||
const previews
|
const previews
|
||||||
= sources ? sources.map(
|
= sources
|
||||||
source =>
|
? sources.map(source => (
|
||||||
|
|
||||||
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
||||||
<DesktopSourcePreview
|
<DesktopSourcePreview
|
||||||
key = { source.id }
|
key = { source.id }
|
||||||
onClick = { onClick }
|
onClick = { onClick }
|
||||||
onDoubleClick = { onDoubleClick }
|
onDoubleClick = { onDoubleClick }
|
||||||
selected = { source.id === selectedSourceId }
|
selected = { source.id === selectedSourceId }
|
||||||
source = { source }
|
source = { source }
|
||||||
type = { type } />)
|
type = { type } />))
|
||||||
: ( // eslint-disable-line no-extra-parens
|
: (
|
||||||
<div className = 'desktop-picker-pane-spinner'>
|
<div className = 'desktop-picker-pane-spinner'>
|
||||||
<Spinner
|
<Spinner
|
||||||
isCompleting = { false }
|
isCompleting = { false }
|
||||||
|
|
|
@ -121,17 +121,15 @@ class Filmstrip extends Component<Props> {
|
||||||
&& <LocalThumbnail />
|
&& <LocalThumbnail />
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
/* eslint-disable react/jsx-wrap-multilines */
|
|
||||||
|
|
||||||
this._sort(
|
this._sort(
|
||||||
this.props._participants,
|
this.props._participants,
|
||||||
isNarrowAspectRatio_)
|
isNarrowAspectRatio_)
|
||||||
.map(p =>
|
.map(p => (
|
||||||
<Thumbnail
|
<Thumbnail
|
||||||
key = { p.id }
|
key = { p.id }
|
||||||
participant = { p } />)
|
participant = { p } />))
|
||||||
|
|
||||||
/* eslint-enable react/jsx-wrap-multilines */
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!this._separateLocalThumbnail
|
!this._separateLocalThumbnail
|
||||||
|
|
|
@ -477,7 +477,7 @@ class AddPeopleDialog extends Component<*, *> {
|
||||||
const supportString = t('inlineDialogFailure.supportMsg');
|
const supportString = t('inlineDialogFailure.supportMsg');
|
||||||
const supportLink = interfaceConfig.SUPPORT_URL;
|
const supportLink = interfaceConfig.SUPPORT_URL;
|
||||||
const supportLinkContent
|
const supportLinkContent
|
||||||
= ( // eslint-disable-line no-extra-parens
|
= (
|
||||||
<span>
|
<span>
|
||||||
<span>
|
<span>
|
||||||
{ supportString.padEnd(supportString.length + 1) }
|
{ supportString.padEnd(supportString.length + 1) }
|
||||||
|
|
|
@ -76,7 +76,6 @@ class Notification extends AbstractNotification<Props> {
|
||||||
pointerEvents = 'box-none'
|
pointerEvents = 'box-none'
|
||||||
style = { styles.notificationContent }>
|
style = { styles.notificationContent }>
|
||||||
{
|
{
|
||||||
// eslint-disable-next-line no-extra-parens
|
|
||||||
this._getDescription().map((line, index) => (
|
this._getDescription().map((line, index) => (
|
||||||
<Text
|
<Text
|
||||||
key = { index }
|
key = { index }
|
||||||
|
|
|
@ -86,19 +86,20 @@ class BroadcastsDropdown extends PureComponent {
|
||||||
render() {
|
render() {
|
||||||
const { broadcasts, selectedBoundStreamID, t } = this.props;
|
const { broadcasts, selectedBoundStreamID, t } = this.props;
|
||||||
|
|
||||||
const dropdownItems = broadcasts.map(broadcast =>
|
const dropdownItems
|
||||||
// eslint-disable-next-line react/jsx-wrap-multilines
|
= broadcasts.map(broadcast => (
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
key = { broadcast.boundStreamID }
|
key = { broadcast.boundStreamID }
|
||||||
|
|
||||||
// eslint-disable-next-line react/jsx-no-bind
|
// eslint-disable-next-line react/jsx-no-bind
|
||||||
onClick = { () => this._onSelect(broadcast.boundStreamID) }>
|
onClick = { () => this._onSelect(broadcast.boundStreamID) }>
|
||||||
{ broadcast.title }
|
{ broadcast.title }
|
||||||
</DropdownItem>
|
</DropdownItem>));
|
||||||
);
|
const selected
|
||||||
const selected = this.props.broadcasts.find(
|
= this.props.broadcasts.find(
|
||||||
broadcast => broadcast.boundStreamID === selectedBoundStreamID);
|
broadcast => broadcast.boundStreamID === selectedBoundStreamID);
|
||||||
const triggerText = (selected && selected.title)
|
const triggerText
|
||||||
|| t('liveStreaming.choose');
|
= (selected && selected.title) || t('liveStreaming.choose');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = 'broadcast-dropdown'>
|
<div className = 'broadcast-dropdown'>
|
||||||
|
|
|
@ -237,7 +237,7 @@ class StartLiveStreamDialog
|
||||||
|
|
||||||
switch (this.props._googleAPIState) {
|
switch (this.props._googleAPIState) {
|
||||||
case GOOGLE_API_STATES.LOADED:
|
case GOOGLE_API_STATES.LOADED:
|
||||||
googleContent = ( // eslint-disable-line no-extra-parens
|
googleContent = (
|
||||||
<GoogleSignInButton
|
<GoogleSignInButton
|
||||||
onClick = { this._onGoogleSignIn }
|
onClick = { this._onGoogleSignIn }
|
||||||
text = { t('liveStreaming.signIn') } />
|
text = { t('liveStreaming.signIn') } />
|
||||||
|
@ -247,7 +247,7 @@ class StartLiveStreamDialog
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GOOGLE_API_STATES.SIGNED_IN:
|
case GOOGLE_API_STATES.SIGNED_IN:
|
||||||
googleContent = ( // eslint-disable-line no-extra-parens
|
googleContent = (
|
||||||
<BroadcastsDropdown
|
<BroadcastsDropdown
|
||||||
broadcasts = { broadcasts }
|
broadcasts = { broadcasts }
|
||||||
onBroadcastSelected = { this._onYouTubeBroadcastIDSelected }
|
onBroadcastSelected = { this._onYouTubeBroadcastIDSelected }
|
||||||
|
@ -259,7 +259,7 @@ class StartLiveStreamDialog
|
||||||
* that also accepts the anchor. This can be done using the Trans
|
* that also accepts the anchor. This can be done using the Trans
|
||||||
* component of react-i18next but I couldn't get it working...
|
* component of react-i18next but I couldn't get it working...
|
||||||
*/
|
*/
|
||||||
helpText = ( // eslint-disable-line no-extra-parens
|
helpText = (
|
||||||
<div>
|
<div>
|
||||||
{ `${t('liveStreaming.chooseCTA',
|
{ `${t('liveStreaming.chooseCTA',
|
||||||
{ email: _googleProfileEmail })} ` }
|
{ email: _googleProfileEmail })} ` }
|
||||||
|
@ -273,7 +273,7 @@ class StartLiveStreamDialog
|
||||||
|
|
||||||
case GOOGLE_API_STATES.NEEDS_LOADING:
|
case GOOGLE_API_STATES.NEEDS_LOADING:
|
||||||
default:
|
default:
|
||||||
googleContent = ( // eslint-disable-line no-extra-parens
|
googleContent = (
|
||||||
<Spinner
|
<Spinner
|
||||||
isCompleting = { false }
|
isCompleting = { false }
|
||||||
size = 'medium' />
|
size = 'medium' />
|
||||||
|
@ -283,7 +283,7 @@ class StartLiveStreamDialog
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.errorType !== undefined) {
|
if (this.state.errorType !== undefined) {
|
||||||
googleContent = ( // eslint-disable-line no-extra-parens
|
googleContent = (
|
||||||
<GoogleSignInButton
|
<GoogleSignInButton
|
||||||
onClick = { this._onRequestGoogleSignIn }
|
onClick = { this._onRequestGoogleSignIn }
|
||||||
text = { t('liveStreaming.signIn') } />
|
text = { t('liveStreaming.signIn') } />
|
||||||
|
|
|
@ -143,16 +143,16 @@ class MoreTab extends AbstractDialogTab<Props, State> {
|
||||||
t
|
t
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const languageItems = languages.map(language =>
|
const languageItems
|
||||||
// eslint-disable-next-line react/jsx-wrap-multilines
|
= languages.map(language => (
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
key = { language }
|
key = { language }
|
||||||
|
|
||||||
// eslint-disable-next-line react/jsx-no-bind
|
// eslint-disable-next-line react/jsx-no-bind
|
||||||
onClick = {
|
onClick = {
|
||||||
() => super._onChange({ currentLanguage: language }) }>
|
() => super._onChange({ currentLanguage: language }) }>
|
||||||
{ t(`languages:${language}`) }
|
{ t(`languages:${language}`) }
|
||||||
</DropdownItem>
|
</DropdownItem>));
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -101,7 +101,7 @@ class OverflowMenuItem extends Component<Props> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
_renderText() {
|
_renderText() {
|
||||||
const textElement = ( // eslint-disable-line no-extra-parens
|
const textElement = (
|
||||||
<span className = 'overflow-menu-item-text'>
|
<span className = 'overflow-menu-item-text'>
|
||||||
{ this.props.text }
|
{ this.props.text }
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -230,7 +230,6 @@ class WelcomePage extends AbstractWelcomePage {
|
||||||
const { t } = this.props;
|
const { t } = this.props;
|
||||||
let children;
|
let children;
|
||||||
|
|
||||||
/* eslint-disable no-extra-parens */
|
|
||||||
|
|
||||||
if (this.state.joining) {
|
if (this.state.joining) {
|
||||||
// TouchableHighlight is picky about what its children can be, so
|
// 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();
|
const buttonDisabled = this._isJoinDisabled();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue