Actually fix indent lint errors

This commit is contained in:
J. Ryan Stinnett 2021-04-23 18:11:54 +01:00
parent 2344ddd164
commit f34489e2df
7 changed files with 121 additions and 120 deletions

View file

@ -30,7 +30,6 @@ module.exports = {
"@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/ban-ts-comment": "off",
"quotes": "off", "quotes": "off",
"indent": "off",
"no-extra-boolean-cast": "off", "no-extra-boolean-cast": "off",
}, },
}], }],

View file

@ -943,7 +943,8 @@ export default class EventTile extends React.Component<IProps, IState> {
if (!this.props.tileShape || this.props.tileShape === 'reply' || this.props.tileShape === 'reply_preview') { if (!this.props.tileShape || this.props.tileShape === 'reply' || this.props.tileShape === 'reply_preview') {
sender = <SenderProfile onClick={this.onSenderProfileClick} sender = <SenderProfile onClick={this.onSenderProfileClick}
mxEvent={this.props.mxEvent} mxEvent={this.props.mxEvent}
enableFlair={this.props.enableFlair} />; enableFlair={this.props.enableFlair}
/>;
} else { } else {
sender = <SenderProfile mxEvent={this.props.mxEvent} enableFlair={this.props.enableFlair} />; sender = <SenderProfile mxEvent={this.props.mxEvent} enableFlair={this.props.enableFlair} />;
} }
@ -1053,7 +1054,8 @@ export default class EventTile extends React.Component<IProps, IState> {
highlights={this.props.highlights} highlights={this.props.highlights}
highlightLink={this.props.highlightLink} highlightLink={this.props.highlightLink}
showUrlPreview={this.props.showUrlPreview} showUrlPreview={this.props.showUrlPreview}
onHeightChanged={this.props.onHeightChanged} /> onHeightChanged={this.props.onHeightChanged}
/>
</div> </div>
</div> </div>
); );
@ -1068,7 +1070,8 @@ export default class EventTile extends React.Component<IProps, IState> {
highlightLink={this.props.highlightLink} highlightLink={this.props.highlightLink}
showUrlPreview={this.props.showUrlPreview} showUrlPreview={this.props.showUrlPreview}
tileShape={this.props.tileShape} tileShape={this.props.tileShape}
onHeightChanged={this.props.onHeightChanged} /> onHeightChanged={this.props.onHeightChanged}
/>
</div> </div>
<a <a
className="mx_EventTile_senderDetailsLink" className="mx_EventTile_senderDetailsLink"
@ -1111,7 +1114,8 @@ export default class EventTile extends React.Component<IProps, IState> {
highlightLink={this.props.highlightLink} highlightLink={this.props.highlightLink}
onHeightChanged={this.props.onHeightChanged} onHeightChanged={this.props.onHeightChanged}
replacingEventId={this.props.replacingEventId} replacingEventId={this.props.replacingEventId}
showUrlPreview={false} /> showUrlPreview={false}
/>
</div> </div>
</div> </div>
); );
@ -1143,7 +1147,8 @@ export default class EventTile extends React.Component<IProps, IState> {
highlightLink={this.props.highlightLink} highlightLink={this.props.highlightLink}
showUrlPreview={this.props.showUrlPreview} showUrlPreview={this.props.showUrlPreview}
permalinkCreator={this.props.permalinkCreator} permalinkCreator={this.props.permalinkCreator}
onHeightChanged={this.props.onHeightChanged} /> onHeightChanged={this.props.onHeightChanged}
/>
{ keyRequestInfo } { keyRequestInfo }
{ reactionsRow } { reactionsRow }
{ actionBar } { actionBar }

View file

@ -153,8 +153,8 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
if (EventIndexPeg.get() !== null) { if (EventIndexPeg.get() !== null) {
eventIndexingSettings = ( eventIndexingSettings = (
<div> <div>
<div className='mx_SettingsTab_subsectionText'> <div className='mx_SettingsTab_subsectionText'>{_t(
{_t("Securely cache encrypted messages locally for them " + "Securely cache encrypted messages locally for them " +
"to appear in search results, using %(size)s to store messages from %(rooms)s rooms.", "to appear in search results, using %(size)s to store messages from %(rooms)s rooms.",
{ {
size: formatBytes(this.state.eventIndexSize, 0), size: formatBytes(this.state.eventIndexSize, 0),
@ -163,8 +163,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
count: this.state.roomCount, count: this.state.roomCount,
rooms: formatCountLong(this.state.roomCount), rooms: formatCountLong(this.state.roomCount),
}, },
)} )}</div>
</div>
<div> <div>
<AccessibleButton kind="primary" onClick={this._onManage}> <AccessibleButton kind="primary" onClick={this._onManage}>
{_t("Manage")} {_t("Manage")}
@ -175,10 +174,10 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
} else if (!this.state.eventIndexingEnabled && EventIndexPeg.supportIsInstalled()) { } else if (!this.state.eventIndexingEnabled && EventIndexPeg.supportIsInstalled()) {
eventIndexingSettings = ( eventIndexingSettings = (
<div> <div>
<div className='mx_SettingsTab_subsectionText'> <div className='mx_SettingsTab_subsectionText'>{_t(
{_t( "Securely cache encrypted messages locally for them to " + "Securely cache encrypted messages locally for them to " +
"appear in search results.")} "appear in search results.",
</div> )}</div>
<div> <div>
<AccessibleButton kind="primary" disabled={this.state.enabling} <AccessibleButton kind="primary" disabled={this.state.enabling}
onClick={this._onEnable}> onClick={this._onEnable}>
@ -196,9 +195,8 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
); );
eventIndexingSettings = ( eventIndexingSettings = (
<div className='mx_SettingsTab_subsectionText'> <div className='mx_SettingsTab_subsectionText'>{_t(
{ "%(brand)s is missing some components required for securely " +
_t( "%(brand)s is missing some components required for securely " +
"caching encrypted messages locally. If you'd like to " + "caching encrypted messages locally. If you'd like to " +
"experiment with this feature, build a custom %(brand)s Desktop " + "experiment with this feature, build a custom %(brand)s Desktop " +
"with <nativeLink>search components added</nativeLink>.", "with <nativeLink>search components added</nativeLink>.",
@ -206,30 +204,27 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
brand, brand,
}, },
{ {
'nativeLink': (sub) => <a href={nativeLink} target="_blank" nativeLink: sub => <a href={nativeLink}
rel="noreferrer noopener">{sub}</a>, target="_blank" rel="noreferrer noopener"
>{sub}</a>,
}, },
) )}</div>
}
</div>
); );
} else if (!EventIndexPeg.platformHasSupport()) { } else if (!EventIndexPeg.platformHasSupport()) {
eventIndexingSettings = ( eventIndexingSettings = (
<div className='mx_SettingsTab_subsectionText'> <div className='mx_SettingsTab_subsectionText'>{_t(
{ "%(brand)s can't securely cache encrypted messages locally " +
_t( "%(brand)s can't securely cache encrypted messages locally " +
"while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> " + "while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> " +
"for encrypted messages to appear in search results.", "for encrypted messages to appear in search results.",
{ {
brand, brand,
}, },
{ {
'desktopLink': (sub) => <a href="https://element.io/get-started" desktopLink: sub => <a href="https://element.io/get-started"
target="_blank" rel="noreferrer noopener">{sub}</a>, target="_blank" rel="noreferrer noopener"
>{sub}</a>,
}, },
) )}</div>
}
</div>
); );
} else { } else {
eventIndexingSettings = ( eventIndexingSettings = (
@ -253,7 +248,6 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
</p> </p>
</details> </details>
)} )}
</div> </div>
); );
} }

View file

@ -87,8 +87,10 @@ export class BannedUser extends React.Component<IBannedUserProps> {
if (this.props.canUnban) { if (this.props.canUnban) {
unbanButton = ( unbanButton = (
<AccessibleButton kind='danger_sm' onClick={this._onUnbanClick} <AccessibleButton className='mx_RolesRoomSettingsTab_unbanBtn'
className='mx_RolesRoomSettingsTab_unbanBtn'> kind='danger_sm'
onClick={this._onUnbanClick}
>
{ _t('Unban') } { _t('Unban') }
</AccessibleButton> </AccessibleButton>
); );
@ -346,7 +348,8 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
return ( return (
<BannedUser key={member.userId} canUnban={canBanUsers} <BannedUser key={member.userId} canUnban={canBanUsers}
member={member} reason={banEvent.reason} member={member} reason={banEvent.reason}
by={bannedBy} /> by={bannedBy}
/>
); );
})} })}
</ul> </ul>

View file

@ -113,10 +113,9 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
"may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>", "may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>",
{}, {},
{ {
'a': (sub) => { a: sub => <a href="https://element.io/help#encryption"
return <a rel='noreferrer noopener' target='_blank' rel="noreferrer noopener" target="_blank"
href='https://element.io/help#encryption'>{sub}</a>; >{sub}</a>,
},
}, },
), ),
onFinished: (confirm) => { onFinished: (confirm) => {
@ -385,7 +384,8 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
<span>{_t("Once enabled, encryption cannot be disabled.")}</span> <span>{_t("Once enabled, encryption cannot be disabled.")}</span>
</div> </div>
<LabelledToggleSwitch value={isEncrypted} onChange={this._onEncryptionChange} <LabelledToggleSwitch value={isEncrypted} onChange={this._onEncryptionChange}
label={_t("Encrypted")} disabled={!canEnableEncryption} /> label={_t("Encrypted")} disabled={!canEnableEncryption}
/>
</div> </div>
{encryptionSettings} {encryptionSettings}
</div> </div>

View file

@ -215,28 +215,27 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
<div className="mx_SettingsTab_section"> <div className="mx_SettingsTab_section">
<span className='mx_SettingsTab_subheading'>{_t('Bug reporting')}</span> <span className='mx_SettingsTab_subheading'>{_t('Bug reporting')}</span>
<div className='mx_SettingsTab_subsectionText'> <div className='mx_SettingsTab_subsectionText'>
{ {_t(
_t( "If you've submitted a bug via GitHub, debug logs can help " + "If you've submitted a bug via GitHub, debug logs can help " +
"us track down the problem. Debug logs contain application " + "us track down the problem. Debug logs contain application " +
"usage data including your username, the IDs or aliases of " + "usage data including your username, the IDs or aliases of " +
"the rooms or groups you have visited and the usernames of " + "the rooms or groups you have visited and the usernames of " +
"other users. They do not contain messages.", "other users. They do not contain messages.",
) )}
}
<div className='mx_HelpUserSettingsTab_debugButton'> <div className='mx_HelpUserSettingsTab_debugButton'>
<AccessibleButton onClick={this._onBugReport} kind='primary'> <AccessibleButton onClick={this._onBugReport} kind='primary'>
{_t("Submit debug logs")} {_t("Submit debug logs")}
</AccessibleButton> </AccessibleButton>
</div> </div>
{ {_t(
_t( "To report a Matrix-related security issue, please read the Matrix.org " + "To report a Matrix-related security issue, please read the Matrix.org " +
"<a>Security Disclosure Policy</a>.", {}, "<a>Security Disclosure Policy</a>.", {},
{ {
'a': (sub) => a: sub => <a href="https://matrix.org/security-disclosure-policy/"
<a href="https://matrix.org/security-disclosure-policy/" rel="noreferrer noopener" target="_blank"
rel="noreferrer noopener" target="_blank">{sub}</a>, >{sub}</a>,
}) },
} )}
</div> </div>
</div> </div>
); );
@ -272,7 +271,8 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
{_t("Identity Server is")} <code>{MatrixClientPeg.get().getIdentityServerUrl()}</code><br /> {_t("Identity Server is")} <code>{MatrixClientPeg.get().getIdentityServerUrl()}</code><br />
{_t("Access Token:") + ' '} {_t("Access Token:") + ' '}
<AccessibleButton element="span" onClick={this._showSpoiler} <AccessibleButton element="span" onClick={this._showSpoiler}
data-spoiler={MatrixClientPeg.get().getAccessToken()}> data-spoiler={MatrixClientPeg.get().getAccessToken()}
>
&lt;{ _t("click to reveal") }&gt; &lt;{ _t("click to reveal") }&gt;
</AccessibleButton> </AccessibleButton>
<div className='mx_HelpUserSettingsTab_debugButton'> <div className='mx_HelpUserSettingsTab_debugButton'>