1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Enable indent linting via ESLint (#6936)

* Enable indent linting via ESLint

* yarn run lint:fix
This commit is contained in:
Whymarrh Whitby 2019-07-31 17:47:11 -02:30 committed by Frankie
parent e9c7df28ed
commit 4d88e1cf86
118 changed files with 1660 additions and 1660 deletions

View File

@ -59,7 +59,7 @@
"eqeqeq": [2, "allow-null"],
"generator-star-spacing": [2, { "before": true, "after": true }],
"handle-callback-err": [2, "^(err|error)$" ],
"indent": "off",
"indent": [2, 2,{ "SwitchCase": 1 }],
"jsx-quotes": [2, "prefer-double"],
"key-spacing": 2,
"keyword-spacing": [2, { "before": true, "after": true }],

View File

@ -68,7 +68,7 @@ class PreferencesController {
return this.setFeatureFlag(key, value)
}
}
// PUBLIC METHODS
// PUBLIC METHODS
/**
* Sets the {@code forgottenPassword} state property

View File

@ -129,7 +129,7 @@ class TransactionController extends EventEmitter {
}
}
/**
/**
Adds a tx to the txlist
@emits ${txMeta.id}:unapproved
*/
@ -220,7 +220,7 @@ class TransactionController extends EventEmitter {
return txMeta
}
/**
/**
adds the tx gas defaults: gas && gasPrice
@param txMeta {Object} - the txMeta object
@returns {Promise<object>} resolves with txMeta
@ -495,9 +495,9 @@ class TransactionController extends EventEmitter {
this.txStateManager.updateTx(txMeta, 'transactions#setTxHash')
}
//
// PRIVATE METHODS
//
//
// PRIVATE METHODS
//
/** maps methods for convenience*/
_mapMethods () {
/** @returns the state in transaction controller */

View File

@ -26,7 +26,7 @@ const normalizers = {
gasPrice: gasPrice => addHexPrefix(gasPrice),
}
/**
/**
normalizes txParams
@param txParams {object}
@returns {object} normalized txParams
@ -40,7 +40,7 @@ function normalizeTxParams (txParams, LowerCase) {
return normalizedTxParams
}
/**
/**
validates txParams
@param txParams {object}
*/
@ -59,7 +59,7 @@ function validateTxParams (txParams) {
}
}
/**
/**
validates the from field in txParams
@param txParams {object}
*/
@ -68,7 +68,7 @@ function validateFrom (txParams) {
if (!isValidAddress(txParams.from)) throw new Error('Invalid from address')
}
/**
/**
validates the to field in txParams
@param txParams {object}
*/
@ -85,7 +85,7 @@ function validateRecipient (txParams) {
return txParams
}
/**
/**
@returns an {array} of states that can be considered final
*/
function getFinalStates () {

View File

@ -245,7 +245,7 @@ class TransactionStateManager extends EventEmitter {
})
}
/**
/**
@param opts {object} - an object of fields to search for eg:<br>
let <code>thingsToLookFor = {<br>
to: '0x0..',<br>
@ -403,9 +403,9 @@ class TransactionStateManager extends EventEmitter {
// Update state
this._saveTxList(otherAccountTxs)
}
//
// PRIVATE METHODS
//
//
// PRIVATE METHODS
//
// STATUS METHODS
// statuses:

View File

@ -362,9 +362,9 @@ module.exports = class MetamaskController extends EventEmitter {
return publicConfigStore
}
//=============================================================================
// EXPOSED TO THE UI SUBSYSTEM
//=============================================================================
//=============================================================================
// EXPOSED TO THE UI SUBSYSTEM
//=============================================================================
/**
* The metamask-state of the various controllers, made available to the UI
@ -503,9 +503,9 @@ module.exports = class MetamaskController extends EventEmitter {
}
//=============================================================================
// VAULT / KEYRING RELATED METHODS
//=============================================================================
//=============================================================================
// VAULT / KEYRING RELATED METHODS
//=============================================================================
/**
* Creates a new Vault and create a new keychain.
@ -1185,9 +1185,9 @@ module.exports = class MetamaskController extends EventEmitter {
})
}
//=============================================================================
// END (VAULT / KEYRING RELATED METHODS)
//=============================================================================
//=============================================================================
// END (VAULT / KEYRING RELATED METHODS)
//=============================================================================
/**
* Allows a user to try to speed up a transaction by retrying it
@ -1236,9 +1236,9 @@ module.exports = class MetamaskController extends EventEmitter {
})
}
//=============================================================================
// PASSWORD MANAGEMENT
//=============================================================================
//=============================================================================
// PASSWORD MANAGEMENT
//=============================================================================
/**
* Allows a user to begin the seed phrase recovery process.
@ -1260,9 +1260,9 @@ module.exports = class MetamaskController extends EventEmitter {
cb()
}
//=============================================================================
// SETUP
//=============================================================================
//=============================================================================
// SETUP
//=============================================================================
/**
* Used to create a multiplexed stream for connecting to an untrusted context
@ -1557,9 +1557,9 @@ module.exports = class MetamaskController extends EventEmitter {
return pendingNonce
}
//=============================================================================
// CONFIG
//=============================================================================
//=============================================================================
// CONFIG
//=============================================================================
// Log blocks

View File

@ -2,7 +2,7 @@
const version = 31
const clone = require('clone')
/*
/*
* The purpose of this migration is to properly set the completedOnboarding flag baesd on the state
* of the KeyringController.
*/
@ -19,7 +19,7 @@ module.exports = {
},
}
function transformState (state) {
function transformState (state) {
const { KeyringController, PreferencesController } = state
if (KeyringController && PreferencesController) {

View File

@ -205,7 +205,7 @@ function generateContainerTest (sPath, {
mapDispatchToPropsMethodNames,
proxyquireObject,
}) {
return `import assert from 'assert'
return `import assert from 'assert'
import proxyquire from 'proxyquire'
import sinon from 'sinon'

View File

@ -362,4 +362,4 @@ describe('Using MetaMask with an existing account', function () {
})
})
})

View File

@ -1,7 +1,7 @@
const assert = require('assert')
const migration31 = require('../../../app/scripts/migrations/031')
describe('migration #31', () => {
describe('migration #31', () => {
it('should set completedOnboarding to true if vault exists', done => {
const oldStorage = {
'meta': {},

View File

@ -30,5 +30,5 @@ web3.currentProvider.enable().then(() => {
})
})
})
})

View File

@ -33,7 +33,7 @@ export default class AdvancedTab extends PureComponent {
renderMobileSync () {
const { t } = this.context
const { history } = this.props
//
//
return (
<div className="settings-page__content-row">
<div className="settings-page__content-item">

View File

@ -274,12 +274,12 @@ var actions = {
showSubLoadingIndication: showSubLoadingIndication,
HIDE_SUB_LOADING_INDICATION: 'HIDE_SUB_LOADING_INDICATION',
hideSubLoadingIndication: hideSubLoadingIndication,
// QR STUFF:
// QR STUFF:
SHOW_QR: 'SHOW_QR',
showQrView: showQrView,
reshowQrCode: reshowQrCode,
SHOW_QR_VIEW: 'SHOW_QR_VIEW',
// FORGOT PASSWORD:
// FORGOT PASSWORD:
BACK_TO_INIT_MENU: 'BACK_TO_INIT_MENU',
goBackToInitView: goBackToInitView,
RECOVERY_IN_PROGRESS: 'RECOVERY_IN_PROGRESS',