Browse Source

fix(eslint-import): Fix that eslint-plugin-import was not active

For the node import resolver, "paths" is meant to be absolute paths
for global modules.
https://github.com/benmosher/eslint-plugin-import/tree/master/resolvers/node
renovate/lint-staged-8.x
Ben Woosley 7 years ago
parent
commit
8e06ad5105
No known key found for this signature in database GPG Key ID: 6EE5F3785F78B345
  1. 6
      .eslintrc
  2. 4
      app/lnd/lib/lightning.js
  3. 14
      app/notifications/index.js
  4. 15
      app/utils/index.js

6
.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"

4
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 }

14
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 }

15
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'

Loading…
Cancel
Save