Skip to content

Commit

Permalink
Fix linter errors from CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bengotow committed Jul 29, 2023
1 parent 5126294 commit 6193b33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 5 additions & 9 deletions app/src/components/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class Menu extends React.Component<MenuProps, MenuState> {

onSelect: PropTypes.func.isRequired,

onExpand: PropTypes.func
onExpand: PropTypes.func,
onEscape: PropTypes.func,

defaultSelectedIndex: PropTypes.number,
Expand Down Expand Up @@ -303,7 +303,10 @@ export class Menu extends React.Component<MenuProps, MenuState> {
if (['Enter', 'Return'].includes(event.key)) {
this._onEnter();
} else {
if (this.props.onExpand !== undefined && (event.key === 'Tab' || event.key === 'ArrowRight')) {
if (
this.props.onExpand !== undefined &&
(event.key === 'Tab' || event.key === 'ArrowRight')
) {
this._onExpand();
event.preventDefault();
return;
Expand Down Expand Up @@ -412,13 +415,6 @@ export class Menu extends React.Component<MenuProps, MenuState> {
}
};

_onExpand = () => {
const item = this.props.items[this.state.selectedIndex];
if (item != null) {
this.props.onExpand(item);
}
};

_onEscape = () => {
this.props.onEscape();
};
Expand Down
2 changes: 2 additions & 0 deletions app/src/flux/stores/database-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ class DatabaseStore extends MailspringStore {
// If a query is made before the database has been opened, the query will be
// held in a queue and run / resolved when the database is ready.
_query(query: SQLString, values: SQLValue[] = [], background = false) {
// eslint-disable-next-line no-async-promise-executor
return new Promise<{ [key: string]: any }[]>(async (resolve, reject) => {
if (!this._open) {
this._waiting.push(() => this._query(query, values).then(resolve, reject));
Expand Down Expand Up @@ -367,6 +368,7 @@ class DatabaseStore extends MailspringStore {
});
}

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

0 comments on commit 6193b33

Please sign in to comment.