eslint: indent switch statements

This commit is contained in:
Alex Gleason
2022-05-11 16:06:35 -05:00
parent ae01b845de
commit b64be353cc
86 changed files with 1782 additions and 1781 deletions

View File

@ -229,8 +229,8 @@ class ComposeForm extends ImmutablePureComponent {
const spoilerUpdated = this.props.spoiler !== prevProps.spoiler;
if (spoilerUpdated) {
switch (this.props.spoiler) {
case true: this.focusSpoilerInput(); break;
case false: this.focusTextarea(); break;
case true: this.focusSpoilerInput(); break;
case false: this.focusTextarea(); break;
}
}
}

View File

@ -56,31 +56,31 @@ class PrivacyDropdownMenu extends React.PureComponent {
let element = null;
switch (e.key) {
case 'Escape':
this.props.onClose();
break;
case 'Enter':
this.handleClick(e);
break;
case 'ArrowDown':
element = this.node.childNodes[index + 1] || this.node.firstChild;
break;
case 'ArrowUp':
element = this.node.childNodes[index - 1] || this.node.lastChild;
break;
case 'Tab':
if (e.shiftKey) {
element = this.node.childNodes[index - 1] || this.node.lastChild;
} else {
case 'Escape':
this.props.onClose();
break;
case 'Enter':
this.handleClick(e);
break;
case 'ArrowDown':
element = this.node.childNodes[index + 1] || this.node.firstChild;
}
break;
case 'Home':
element = this.node.firstChild;
break;
case 'End':
element = this.node.lastChild;
break;
break;
case 'ArrowUp':
element = this.node.childNodes[index - 1] || this.node.lastChild;
break;
case 'Tab':
if (e.shiftKey) {
element = this.node.childNodes[index - 1] || this.node.lastChild;
} else {
element = this.node.childNodes[index + 1] || this.node.firstChild;
}
break;
case 'Home':
element = this.node.firstChild;
break;
case 'End':
element = this.node.lastChild;
break;
}
if (element) {
@ -212,9 +212,9 @@ class PrivacyDropdown extends React.PureComponent {
handleKeyDown = e => {
switch (e.key) {
case 'Escape':
this.handleClose();
break;
case 'Escape':
this.handleClose();
break;
}
}
@ -226,10 +226,10 @@ class PrivacyDropdown extends React.PureComponent {
handleButtonKeyDown = (e) => {
switch (e.key) {
case ' ':
case 'Enter':
this.handleMouseDown();
break;
case ' ':
case 'Enter':
this.handleMouseDown();
break;
}
}