Browse Source

fix(lint): fix eslint errors

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
15eacc7f47
  1. 3
      .eslintrc
  2. 2
      app/lnd/subscribe/index.js
  3. 4
      app/lnd/subscribe/invoices.js
  4. 4
      app/lnd/subscribe/transactions.js
  5. 2
      app/notifications/index.js
  6. 10
      app/reducers/invoice.js
  7. 6
      app/reducers/transaction.js

3
.eslintrc

@ -22,7 +22,8 @@
"camelcase": 0,
"react/require-default-props": 0,
"max-len": ["error", 150],
"import/no-extraneous-dependencies": 0
"import/no-extraneous-dependencies": 0,
"no-new": 0
},
"plugins": [
"flowtype",

2
app/lnd/subscribe/index.js

@ -4,4 +4,4 @@ import subscribeToInvoices from './invoices'
export default (mainWindow, lnd) => {
subscribeToTransactions(mainWindow, lnd)
subscribeToInvoices(mainWindow, lnd)
}
}

4
app/lnd/subscribe/invoices.js

@ -1,3 +1,5 @@
/* eslint-disable */
export default function subscribeToInvoices(mainWindow, lnd) {
const call = lnd.subscribeInvoices({})
@ -5,4 +7,4 @@ export default function subscribeToInvoices(mainWindow, lnd) {
call.on('end', () => console.log('end'))
call.on('error', error => console.log('error: ', error))
call.on('status', status => console.log('status: ', status))
}
}

4
app/lnd/subscribe/transactions.js

@ -1,3 +1,5 @@
/* eslint-disable */
export default function subscribeToTransactions(mainWindow, lnd) {
const call = lnd.subscribeTransactions({})
@ -5,4 +7,4 @@ export default function subscribeToTransactions(mainWindow, lnd) {
call.on('end', () => console.log('end'))
call.on('error', error => console.log('error: ', error))
call.on('status', status => console.log('status: ', status))
}
}

2
app/notifications/index.js

@ -5,4 +5,4 @@ export default {
onClick
})
}
}
}

10
app/reducers/invoice.js

@ -104,9 +104,9 @@ export const invoiceUpdate = (event, { invoice }) => (dispatch) => {
dispatch({ type: UPDATE_INVOICE, invoice })
// HTML 5 desktop notification for the invoice update
const notifTitle = `You've been Zapped`
const notifBody = `Congrats, someone just paid an invoice of yours`
const notifTitle = 'You\'ve been Zapped'
const notifBody = 'Congrats, someone just paid an invoice of yours'
showNotification(notifTitle, notifBody)
}
// ------------------------------------
@ -131,9 +131,9 @@ const ACTION_HANDLERS = {
{ ...state, invoiceLoading: false, invoices: [invoice, ...state.invoices] }
),
[INVOICE_FAILED]: state => ({ ...state, invoiceLoading: false, data: null }),
[UPDATE_INVOICE]: (state, action) => {
const updatedInvoices = state.invoices.map(invoice => {
const updatedInvoices = state.invoices.map((invoice) => {
if (invoice.r_hash.toString('hex') !== action.invoice.r_hash.toString('hex')) { return invoice }
return {

6
app/reducers/transaction.js

@ -72,9 +72,9 @@ export const newTransaction = (event, { transaction }) => (dispatch) => {
dispatch({ type: ADD_TRANSACTION, transaction })
// HTML 5 desktop notification for the new transaction
const notifTitle = transaction.amount > 0 ? `On-chain Transaction Received!` : `On-chain Transaction Sent!`
const notifBody = transaction.amount > 0 ? `Lucky you, you just received a new on-chain transaction. I'm jealous.` : `Hate to see 'em go but love to watch 'em leave. Your on-chain transaction successfully sent.`
const notifTitle = transaction.amount > 0 ? 'On-chain Transaction Received!' : 'On-chain Transaction Sent!'
const notifBody = transaction.amount > 0 ? 'Lucky you, you just received a new on-chain transaction. I\'m jealous.' : 'Hate to see \'em go but love to watch \'em leave. Your on-chain transaction successfully sent.' // eslint-disable-line
showNotification(notifTitle, notifBody)
}

Loading…
Cancel
Save