Skip to content

Commit 6193b33

Browse files
committed
Fix linter errors from CI builds
1 parent 5126294 commit 6193b33

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

app/src/components/menu.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export class Menu extends React.Component<MenuProps, MenuState> {
199199

200200
onSelect: PropTypes.func.isRequired,
201201

202-
onExpand: PropTypes.func
202+
onExpand: PropTypes.func,
203203
onEscape: PropTypes.func,
204204

205205
defaultSelectedIndex: PropTypes.number,
@@ -303,7 +303,10 @@ export class Menu extends React.Component<MenuProps, MenuState> {
303303
if (['Enter', 'Return'].includes(event.key)) {
304304
this._onEnter();
305305
} else {
306-
if (this.props.onExpand !== undefined && (event.key === 'Tab' || event.key === 'ArrowRight')) {
306+
if (
307+
this.props.onExpand !== undefined &&
308+
(event.key === 'Tab' || event.key === 'ArrowRight')
309+
) {
307310
this._onExpand();
308311
event.preventDefault();
309312
return;
@@ -412,13 +415,6 @@ export class Menu extends React.Component<MenuProps, MenuState> {
412415
}
413416
};
414417

415-
_onExpand = () => {
416-
const item = this.props.items[this.state.selectedIndex];
417-
if (item != null) {
418-
this.props.onExpand(item);
419-
}
420-
};
421-
422418
_onEscape = () => {
423419
this.props.onEscape();
424420
};

app/src/flux/stores/database-store.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ class DatabaseStore extends MailspringStore {
214214
// If a query is made before the database has been opened, the query will be
215215
// held in a queue and run / resolved when the database is ready.
216216
_query(query: SQLString, values: SQLValue[] = [], background = false) {
217+
// eslint-disable-next-line no-async-promise-executor
217218
return new Promise<{ [key: string]: any }[]>(async (resolve, reject) => {
218219
if (!this._open) {
219220
this._waiting.push(() => this._query(query, values).then(resolve, reject));
@@ -367,6 +368,7 @@ class DatabaseStore extends MailspringStore {
367368
});
368369
}
369370

371+
// eslint-disable-next-line no-async-promise-executor
370372
return new Promise<AgentResponse>(async resolve => {
371373
if (!this._agent) {
372374
// Something bad has happened and we were immediately unable to spawn the query helper.

0 commit comments

Comments
 (0)