Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various linting fixes #2337

Merged
merged 2 commits into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions desktop/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ module.exports = function main() {
mainWindow.setMenuBarVisibility(!autoHideMenuBar);
});

ipcMain.on('wpLogin', function (event, url) {
shell.openExternal(url);
ipcMain.on('wpLogin', function (event, wpLoginUrl) {
shell.openExternal(wpLoginUrl);
});

ipcMain.on('importNotes', function (event, filePath) {
Expand Down
6 changes: 3 additions & 3 deletions lib/boot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { boot as bootLoggingOut } from './logging-out';
const config = getConfig();

const clearStorage = (): Promise<void> =>
new Promise((resolve) => {
new Promise((resolveStorage) => {
localStorage.removeItem('access_token');
localStorage.removeItem('lastSyncedTime');
localStorage.removeItem('localQueue:note');
Expand Down Expand Up @@ -57,9 +57,9 @@ const clearStorage = (): Promise<void> =>
])
.then(() => {
window.electron?.send('clearCookies');
resolve();
resolveStorage();
})
.catch(() => resolve());
.catch(() => resolveStorage());
});

const forceReload = () => history.go();
Expand Down
1 change: 0 additions & 1 deletion lib/note-editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export class NoteEditor extends Component<Props> {

// toggle Markdown enabled
if (note && cmdOrCtrl && shiftKey && 'm' === key) {
console.log('toggling markdown');
toggleMarkdown(noteId, !this.markdownEnabled());
event.stopPropagation();
event.preventDefault();
Expand Down
6 changes: 5 additions & 1 deletion lib/state/electron/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import debugFactory from 'debug';

import actions from '../actions';

import * as S from '../';

const debug = debugFactory('electron-middleware');

export const middleware: S.Middleware = ({ dispatch, getState }) => {
window.electron.receive('appCommand', (command) => {
switch (command.action) {
Expand Down Expand Up @@ -82,7 +86,7 @@ export const middleware: S.Middleware = ({ dispatch, getState }) => {
return;

default:
console.log(command);
debug(`unknown AppCommand: ${command}`);
}
});

Expand Down