Skip to content

Commit

Permalink
Update eslint and Airbnb rules
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkueng committed May 27, 2018
1 parent 13efc8d commit cec7735
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 87 deletions.
3 changes: 2 additions & 1 deletion bin/cli.js
@@ -1,5 +1,6 @@
#!/usr/bin/env node
const spawn = require('child_process').spawn;

const { spawn } = require('child_process');
const electron = require('electron');
const path = require('path');

Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -58,9 +58,9 @@
},
"devDependencies": {
"electron-packager": "^8.7.2",
"eslint": "^4.4.1",
"eslint-config-airbnb-base": "^11.3.1",
"eslint-plugin-import": "^2.7.0",
"eslint": "4.19.1",
"eslint-config-airbnb-base": "12.1.0",
"eslint-plugin-import": "2.12.0",
"promise-retryer": "^0.0.1",
"request": "^2.81.0"
}
Expand Down
20 changes: 12 additions & 8 deletions renderer/main.js
@@ -1,13 +1,15 @@
/* global vmd:true */

const remote = require('electron').remote;
const { remote } = require('electron');

const url = remote.require('url');
const path = remote.require('path');
const fs = remote.require('fs');
const shell = remote.shell;
const clipboard = remote.clipboard;
const nativeImage = remote.nativeImage;
const {
shell,
clipboard,
nativeImage,
} = remote;
const conf = remote.getGlobal('conf');
const currentWindow = remote.getCurrentWindow();
const searchInPage = require('electron-in-page-search').default;
Expand Down Expand Up @@ -147,9 +149,11 @@ function getLinkType(el) {

const filePath = document.body.getAttribute('data-filepath');
const parsedHref = url.parse(href);
const hash = parsedHref.hash;
const protocol = parsedHref.protocol;
const pathname = parsedHref.pathname;
const {
hash,
protocol,
pathname,
} = parsedHref;

if (protocol && protocol !== 'file:') {
return {
Expand Down Expand Up @@ -285,7 +289,7 @@ vmd.onHistoryForwardAction(() => {
});

vmd.onContent((ev, data) => {
const body = document.body;
const { body } = document;
const pageContent = document.querySelector('.page-content');
const base = document.querySelector('base');

Expand Down
2 changes: 1 addition & 1 deletion script/release.js
Expand Up @@ -10,7 +10,7 @@ const request = require('request');
const promiseRetryer = require('promise-retryer')(Promise);

const token = process.env.GITHUB_ACCESS_TOKEN;
const version = require('../package').version;
const { version } = require('../package');

const repo = 'yoshuawuyts/vmd';

Expand Down
6 changes: 4 additions & 2 deletions shared/shared-state.js
@@ -1,5 +1,7 @@
const createStore = require('redux').createStore;
const combineReducers = require('redux').combineReducers;
const {
createStore,
combineReducers,
} = require('redux');
const { BrowserWindow } = require('electron');

function focusedWindowAction(action) {
Expand Down

0 comments on commit cec7735

Please sign in to comment.