Merge pull request #2422 from matrix-org/dbkr/eslint_async_space
Add spaces back to async arrow functions
This commit is contained in:
commit
c45ffb6733
10 changed files with 13 additions and 14 deletions
|
@ -18,7 +18,6 @@ src/components/structures/ScrollPanel.js
|
||||||
src/components/structures/SearchBox.js
|
src/components/structures/SearchBox.js
|
||||||
src/components/structures/TimelinePanel.js
|
src/components/structures/TimelinePanel.js
|
||||||
src/components/structures/UploadBar.js
|
src/components/structures/UploadBar.js
|
||||||
src/components/structures/UserSettings.js
|
|
||||||
src/components/views/avatars/BaseAvatar.js
|
src/components/views/avatars/BaseAvatar.js
|
||||||
src/components/views/avatars/MemberAvatar.js
|
src/components/views/avatars/MemberAvatar.js
|
||||||
src/components/views/create_room/RoomAlias.js
|
src/components/views/create_room/RoomAlias.js
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
"start:init": "babel src -d lib --source-maps --copy-files",
|
"start:init": "babel src -d lib --source-maps --copy-files",
|
||||||
"lint": "eslint src/",
|
"lint": "eslint src/",
|
||||||
"lintall": "eslint src/ test/",
|
"lintall": "eslint src/ test/",
|
||||||
"lintwithexclusions": "eslint --max-warnings 16 --ignore-path .eslintignore.errorfiles src test",
|
"lintwithexclusions": "eslint --max-warnings 19 --ignore-path .eslintignore.errorfiles src test",
|
||||||
"clean": "rimraf lib",
|
"clean": "rimraf lib",
|
||||||
"prepublish": "npm run clean && npm run build && git rev-parse HEAD > git-revision.txt",
|
"prepublish": "npm run clean && npm run build && git rev-parse HEAD > git-revision.txt",
|
||||||
"test": "karma start --single-run=true --browsers ChromeHeadless",
|
"test": "karma start --single-run=true --browsers ChromeHeadless",
|
||||||
|
@ -118,7 +118,7 @@
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
"chokidar": "^1.6.1",
|
"chokidar": "^1.6.1",
|
||||||
"concurrently": "^4.0.1",
|
"concurrently": "^4.0.1",
|
||||||
"eslint": "^5.8.0",
|
"eslint": "^5.12.0",
|
||||||
"eslint-config-google": "^0.7.1",
|
"eslint-config-google": "^0.7.1",
|
||||||
"eslint-plugin-babel": "^5.2.1",
|
"eslint-plugin-babel": "^5.2.1",
|
||||||
"eslint-plugin-flowtype": "^2.30.0",
|
"eslint-plugin-flowtype": "^2.30.0",
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default class NewRecoveryMethodDialog extends React.PureComponent {
|
||||||
dis.dispatch({ action: 'view_user_settings' });
|
dis.dispatch({ action: 'view_user_settings' });
|
||||||
}
|
}
|
||||||
|
|
||||||
onSetupClick = async() => {
|
onSetupClick = async () => {
|
||||||
// TODO: Should change to a restore key backup flow that checks the
|
// TODO: Should change to a restore key backup flow that checks the
|
||||||
// recovery passphrase while at the same time also cross-signing the
|
// recovery passphrase while at the same time also cross-signing the
|
||||||
// device as well in a single flow. Since we don't have that yet, we'll
|
// device as well in a single flow. Since we don't have that yet, we'll
|
||||||
|
|
|
@ -61,7 +61,7 @@ export default class CommunityProvider extends AutocompleteProvider {
|
||||||
if (command) {
|
if (command) {
|
||||||
const joinedGroups = cli.getGroups().filter(({myMembership}) => myMembership === 'join');
|
const joinedGroups = cli.getGroups().filter(({myMembership}) => myMembership === 'join');
|
||||||
|
|
||||||
const groups = (await Promise.all(joinedGroups.map(async({groupId}) => {
|
const groups = (await Promise.all(joinedGroups.map(async ({groupId}) => {
|
||||||
try {
|
try {
|
||||||
return FlairStore.getGroupProfileCached(cli, groupId);
|
return FlairStore.getGroupProfileCached(cli, groupId);
|
||||||
} catch (e) { // if FlairStore failed, fall back to just groupId
|
} catch (e) { // if FlairStore failed, fall back to just groupId
|
||||||
|
|
|
@ -781,7 +781,7 @@ export default React.createClass({
|
||||||
),
|
),
|
||||||
button: _t("Leave"),
|
button: _t("Leave"),
|
||||||
danger: this.state.isUserPrivileged,
|
danger: this.state.isUserPrivileged,
|
||||||
onFinished: async(confirmed) => {
|
onFinished: async (confirmed) => {
|
||||||
if (!confirmed) return;
|
if (!confirmed) return;
|
||||||
|
|
||||||
this.setState({membershipBusy: true});
|
this.setState({membershipBusy: true});
|
||||||
|
|
|
@ -835,7 +835,7 @@ module.exports = React.createClass({
|
||||||
SettingsStore.getLabsFeatures().forEach((featureId) => {
|
SettingsStore.getLabsFeatures().forEach((featureId) => {
|
||||||
// TODO: this ought to be a separate component so that we don't need
|
// TODO: this ought to be a separate component so that we don't need
|
||||||
// to rebind the onChange each time we render
|
// to rebind the onChange each time we render
|
||||||
const onChange = async(e) => {
|
const onChange = async (e) => {
|
||||||
const checked = e.target.checked;
|
const checked = e.target.checked;
|
||||||
if (featureId === "feature_lazyloading") {
|
if (featureId === "feature_lazyloading") {
|
||||||
const confirmed = await this._onLazyLoadChanging(checked);
|
const confirmed = await this._onLazyLoadChanging(checked);
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default class GroupInviteTileContextMenu extends React.Component {
|
||||||
Modal.createTrackedDialog('Reject community invite', '', QuestionDialog, {
|
Modal.createTrackedDialog('Reject community invite', '', QuestionDialog, {
|
||||||
title: _t('Reject invitation'),
|
title: _t('Reject invitation'),
|
||||||
description: _t('Are you sure you want to reject the invitation?'),
|
description: _t('Are you sure you want to reject the invitation?'),
|
||||||
onFinished: async(shouldLeave) => {
|
onFinished: async (shouldLeave) => {
|
||||||
if (!shouldLeave) return;
|
if (!shouldLeave) return;
|
||||||
|
|
||||||
// FIXME: controller shouldn't be loading a view :(
|
// FIXME: controller shouldn't be loading a view :(
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default class StatusMessageContextMenu extends React.Component {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
_onClearClick = async(e) => {
|
_onClearClick = async (e) => {
|
||||||
await MatrixClientPeg.get()._unstable_setStatusMessage("");
|
await MatrixClientPeg.get()._unstable_setStatusMessage("");
|
||||||
this.setState({message: ""});
|
this.setState({message: ""});
|
||||||
};
|
};
|
||||||
|
|
|
@ -714,7 +714,7 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
|
|
||||||
if (!member || !member.membership || member.membership === 'leave') {
|
if (!member || !member.membership || member.membership === 'leave') {
|
||||||
const roomId = member && member.roomId ? member.roomId : this.props.roomId;
|
const roomId = member && member.roomId ? member.roomId : this.props.roomId;
|
||||||
const onInviteUserButton = async() => {
|
const onInviteUserButton = async () => {
|
||||||
try {
|
try {
|
||||||
// We use a MultiInviter to re-use the invite logic, even though
|
// We use a MultiInviter to re-use the invite logic, even though
|
||||||
// we're only inviting one user.
|
// we're only inviting one user.
|
||||||
|
|
|
@ -1274,7 +1274,7 @@ export default class MessageComposerInput extends React.Component {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
selectHistory = async(up) => {
|
selectHistory = async (up) => {
|
||||||
const delta = up ? -1 : 1;
|
const delta = up ? -1 : 1;
|
||||||
|
|
||||||
// True if we are not currently selecting history, but composing a message
|
// True if we are not currently selecting history, but composing a message
|
||||||
|
@ -1322,7 +1322,7 @@ export default class MessageComposerInput extends React.Component {
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
onTab = async(e) => {
|
onTab = async (e) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
someCompletions: null,
|
someCompletions: null,
|
||||||
});
|
});
|
||||||
|
@ -1344,7 +1344,7 @@ export default class MessageComposerInput extends React.Component {
|
||||||
up ? this.autocomplete.onUpArrow() : this.autocomplete.onDownArrow();
|
up ? this.autocomplete.onUpArrow() : this.autocomplete.onDownArrow();
|
||||||
};
|
};
|
||||||
|
|
||||||
onEscape = async(e) => {
|
onEscape = async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (this.autocomplete) {
|
if (this.autocomplete) {
|
||||||
this.autocomplete.onEscape(e);
|
this.autocomplete.onEscape(e);
|
||||||
|
@ -1363,7 +1363,7 @@ export default class MessageComposerInput extends React.Component {
|
||||||
/* If passed null, restores the original editor content from state.originalEditorState.
|
/* If passed null, restores the original editor content from state.originalEditorState.
|
||||||
* If passed a non-null displayedCompletion, modifies state.originalEditorState to compute new state.editorState.
|
* If passed a non-null displayedCompletion, modifies state.originalEditorState to compute new state.editorState.
|
||||||
*/
|
*/
|
||||||
setDisplayedCompletion = async(displayedCompletion: ?Completion): boolean => {
|
setDisplayedCompletion = async (displayedCompletion: ?Completion): boolean => {
|
||||||
const activeEditorState = this.state.originalEditorState || this.state.editorState;
|
const activeEditorState = this.state.originalEditorState || this.state.editorState;
|
||||||
|
|
||||||
if (displayedCompletion == null) {
|
if (displayedCompletion == null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue