Remove unnecessary disables of consistent-return
lint rule
This commit is contained in:
parent
f937eba94e
commit
fda21edd23
6 changed files with 1 additions and 12 deletions
|
@ -118,7 +118,6 @@ export class GroupNotification extends React.Component<Props> {
|
|||
<Intl i18n={i18n} id={leftKey} components={[otherPeopleWithCommas]} />
|
||||
);
|
||||
case 'general':
|
||||
// eslint-disable-next-line consistent-return
|
||||
return;
|
||||
default:
|
||||
throw missingCaseError(type);
|
||||
|
|
|
@ -1447,7 +1447,6 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
</div>
|
||||
{reactionPickerRoot &&
|
||||
createPortal(
|
||||
// eslint-disable-next-line consistent-return
|
||||
<Popper
|
||||
placement="top"
|
||||
modifiers={[
|
||||
|
@ -1758,7 +1757,7 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return, no-nested-ternary
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
return isTapToViewError
|
||||
? i18n('incomingError')
|
||||
: direction === 'outgoing'
|
||||
|
|
|
@ -368,7 +368,6 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
|
|||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return list.Grid;
|
||||
};
|
||||
|
||||
|
@ -381,7 +380,6 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
|
|||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return grid._scrollingContainer as HTMLDivElement;
|
||||
};
|
||||
|
||||
|
@ -894,7 +892,6 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
|
|||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return index;
|
||||
}
|
||||
|
||||
|
@ -904,7 +901,6 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
|
|||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return this.fromItemIndexToRow(oldestUnreadIndex) - 1;
|
||||
}
|
||||
|
||||
|
@ -916,7 +912,6 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
|
|||
|
||||
const last = items.length - 1;
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return this.fromItemIndexToRow(last) + 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -660,7 +660,6 @@ async function fetchManifest(
|
|||
}
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return decryptManifest(encryptedManifest);
|
||||
} catch (err) {
|
||||
await stopStorageServiceSync();
|
||||
|
|
|
@ -341,7 +341,6 @@ export default class AccountManager extends EventTarget {
|
|||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return store
|
||||
.getIdentityKeyPair(ourUuid)
|
||||
.then(
|
||||
|
|
|
@ -654,11 +654,9 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
|||
const expires = window.moment(muteExpiresAt);
|
||||
|
||||
if (today.isSame(expires, 'day')) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return expires.format('hh:mm A');
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return expires.format('M/D/YY, hh:mm A');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue