diff --git a/.eslintrc b/.eslintrc index 5fff02b8..d3ed4851 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,7 +7,9 @@ "extends": [ "airbnb", "plugin:react/recommended", - "plugin:flowtype/recommended" + "plugin:flowtype/recommended", + "plugin:import/errors", + "plugin:import/warnings" ], "env": { "browser": true, @@ -51,7 +53,7 @@ "settings": { "import/resolver": { "node": { - "paths": ["app", "app/node_modules"] + "moduleDirectory": ["app", "app/node_modules", "node_modules"] }, "webpack": { "config": "webpack.config.eslint.js" diff --git a/app/lnd/lib/lightning.js b/app/lnd/lib/lightning.js index 42670f90..ea471b0b 100644 --- a/app/lnd/lib/lightning.js +++ b/app/lnd/lib/lightning.js @@ -3,10 +3,12 @@ import path from 'path' import grpc from 'grpc' import config from '../config' -module.exports = (rpcpath, host) => { +const lightning = (rpcpath, host) => { const lndCert = fs.readFileSync(config.cert) const credentials = grpc.credentials.createSsl(lndCert) const rpc = grpc.load(path.join(__dirname, 'rpc.proto')) return new rpc.lnrpc.Lightning(host, credentials) } + +export default { lightning } diff --git a/app/notifications/index.js b/app/notifications/index.js index 1483efdd..46da1ab9 100644 --- a/app/notifications/index.js +++ b/app/notifications/index.js @@ -1,8 +1,8 @@ -export default { - showNotification: (title, body, onClick) => { - new Notification(title, { - body, - onClick - }) - } +export const showNotification = (title, body, onClick) => { + new Notification(title, { + body, + onClick + }) } + +export default { showNotification } diff --git a/app/utils/index.js b/app/utils/index.js index 45dcde6d..cdf18be9 100644 --- a/app/utils/index.js +++ b/app/utils/index.js @@ -1,11 +1,4 @@ -import btc from './btc' -import usd from './usd' -import bech32 from './bech32' -import blockExplorer from './blockExplorer' - -export default { - btc, - usd, - bech32, - blockExplorer -} +export btc from './btc' +export usd from './usd' +export bech32 from './bech32' +export blockExplorer from './blockExplorer'