Browse Source

enhance(lints): Enable currenly disabled lints

renovate/lint-staged-8.x
Ben Woosley 7 years ago
parent
commit
4125283587
No known key found for this signature in database GPG Key ID: 6EE5F3785F78B345
  1. 1
      .eslintignore
  2. 2
      app/components/Form/PayForm.js
  3. 4
      app/lnd/methods/paymentsController.js
  4. 2
      app/lnd/subscribe/invoices.js
  5. 2
      app/lnd/subscribe/transactions.js
  6. 1
      app/main.dev.js
  7. 2
      app/menu.js
  8. 12
      app/reducers/channels.js
  9. 4
      app/reducers/lnd.js
  10. 3
      app/utils/bech32.js
  11. 2
      internals/scripts/CheckNodeEnv.js
  12. 1
      test/e2e/e2e.spec.js
  13. 1
      webpack.config.renderer.dev.js

1
.eslintignore

@ -43,6 +43,7 @@ app/renderer.prod.js
app/renderer.prod.js.map
app/style.css
app/style.css.map
app/utils/bech32.js
dist
dll
main.js

2
app/components/Form/PayForm.js

@ -55,7 +55,7 @@ class PayForm extends Component {
<input
type='number'
min='0'
ref={input => this.amountInput = input} // eslint-disable-line
ref={input => this.amountInput = input}
size=''
style={
isLn ?

4
app/lnd/methods/paymentsController.js

@ -8,11 +8,11 @@ export function sendPaymentSync(lnd, meta, { paymentRequest }) {
return new Promise((resolve, reject) => {
lnd.sendPaymentSync({ payment_request: paymentRequest }, meta, (error, data) => {
if (error) {
reject({ error }) // eslint-disable-line
reject({ error })
return
}
if (!data || !data.payment_route) { reject({ error: data.payment_error }) } // eslint-disable-line
if (!data || !data.payment_route) { reject({ error: data.payment_error }) }
resolve(data)
})

2
app/lnd/subscribe/invoices.js

@ -1,5 +1,3 @@
/* eslint-disable */
export default function subscribeToInvoices(mainWindow, lnd, meta) {
const call = lnd.subscribeInvoices({}, meta)

2
app/lnd/subscribe/transactions.js

@ -1,5 +1,3 @@
/* eslint-disable */
export default function subscribeToTransactions(mainWindow, lnd, meta) {
const call = lnd.subscribeTransactions({}, meta)
call.on('data', (transaction) => {

1
app/main.dev.js

@ -1,4 +1,3 @@
/* eslint-disable */
/* eslint global-require: 1, flowtype-errors/show-errors: 0 */
/**

2
app/menu.js

@ -1,5 +1,3 @@
/* eslint-disable */
// @flow
import { app, Menu, shell, BrowserWindow } from 'electron'

12
app/reducers/channels.js

@ -423,15 +423,15 @@ const allChannels = createSelector(
pendingForceClosedChannelsSelector,
channelSearchQuerySelector,
(activeChannels, nonActiveChannels, pendingOpenChannels, pendingClosedChannels, pendingForcedClosedChannels, searchQuery) => {
const filteredActiveChannels = activeChannels.filter(channel => channel.remote_pubkey.includes(searchQuery) || channel.channel_point.includes(searchQuery)) // eslint-disable-line
const filteredNonActiveChannels = nonActiveChannels.filter(channel => channel.remote_pubkey.includes(searchQuery) || channel.channel_point.includes(searchQuery)) // eslint-disable-line
const filteredActiveChannels = activeChannels.filter(channel => channel.remote_pubkey.includes(searchQuery) || channel.channel_point.includes(searchQuery))
const filteredNonActiveChannels = nonActiveChannels.filter(channel => channel.remote_pubkey.includes(searchQuery) || channel.channel_point.includes(searchQuery))
const filteredPendingOpenChannels = pendingOpenChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery)) // eslint-disable-line
const filteredPendingClosedChannels = pendingClosedChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery)) // eslint-disable-line
const filteredPendingForcedClosedChannels = pendingForcedClosedChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery)) // eslint-disable-line
const filteredPendingOpenChannels = pendingOpenChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery))
const filteredPendingClosedChannels = pendingClosedChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery))
const filteredPendingForcedClosedChannels = pendingForcedClosedChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery))
return [...filteredActiveChannels, ...filteredPendingOpenChannels, ...filteredPendingClosedChannels, ...filteredPendingForcedClosedChannels, ...filteredNonActiveChannels] // eslint-disable-line
return [...filteredActiveChannels, ...filteredPendingOpenChannels, ...filteredPendingClosedChannels, ...filteredPendingForcedClosedChannels, ...filteredNonActiveChannels]
}
)

4
app/reducers/lnd.js

@ -52,12 +52,12 @@ export const lndStdout = (event, line) => (dispatch) => {
if (line.includes('Caught up to height')) {
trimmed = line.slice(line.indexOf('Caught up to height') + 'Caught up to height'.length).trim()
height = trimmed.split(' ')[0].split(/(\r\n|\n|\r)/gm)[0] // eslint-disable-line
height = trimmed.split(' ')[0].split(/(\r\n|\n|\r)/gm)[0]
}
if (line.includes('Catching up block hashes to height')) {
trimmed = line.slice(line.indexOf('Catching up block hashes to height') + 'Catching up block hashes to height'.length).trim()
height = trimmed.match(/[-]{0,1}[\d.]*[\d]+/g)[0] // eslint-disable-line
height = trimmed.match(/[-]{0,1}[\d.]*[\d]+/g)[0]
}
dispatch({ type: RECEIVE_LINE, lndBlockHeight: height })

3
app/utils/bech32.js

@ -1,7 +1,5 @@
// Using bech32 here just without the 90 char length: https://github.com/bitcoinjs/bech32/blob/master/index.js
/* eslint-disable */
'use strict'
let ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'
@ -147,4 +145,3 @@ export default {
toWords,
fromWords
}

2
internals/scripts/CheckNodeEnv.js

@ -7,11 +7,9 @@ export default function CheckNodeEnv(expectedEnv: string) {
}
if (process.env.NODE_ENV !== expectedEnv) {
/* eslint-disable */
console.log(chalk.whiteBright.bgRed.bold(
`"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config`
))
/* eslint-enable */
process.exit(2)
}
}

1
test/e2e/e2e.spec.js

@ -1,4 +1,3 @@
/* eslint-disable */
import { Application } from 'spectron'
import electronPath from 'electron'
import path from 'path'

1
webpack.config.renderer.dev.js

@ -1,4 +1,3 @@
/* eslint-disable */
/* eslint global-require: 0, import/no-dynamic-require: 0 */
/**

Loading…
Cancel
Save