ESLint additional rules (#4186)
* Add eslint rule for consistent block padding * Fix padding consistency issues * Eslint test for duplicate imports * Eslint closing bracket location * Fix eslint jsx closing bracket * missed a file * Formatting * Manual overrides for auto * Manual overrides for auto * More minor auto-override manual adjustments
This commit is contained in:
@@ -51,13 +51,16 @@ class AddContract extends Component {
|
||||
<FormattedMessage
|
||||
id='addContract.title.type'
|
||||
defaultMessage='choose a contract type'
|
||||
key='type' />,
|
||||
key='type'
|
||||
/>,
|
||||
<FormattedMessage
|
||||
id='addContract.title.details'
|
||||
defaultMessage='enter contract details'
|
||||
key='details' />
|
||||
key='details'
|
||||
/>
|
||||
] }
|
||||
visible>
|
||||
visible
|
||||
>
|
||||
{ this.renderStep() }
|
||||
</Modal>
|
||||
);
|
||||
@@ -98,9 +101,11 @@ class AddContract extends Component {
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='addContract.button.cancel'
|
||||
defaultMessage='Cancel' />
|
||||
defaultMessage='Cancel'
|
||||
/>
|
||||
}
|
||||
onClick={ this.onClose } />
|
||||
onClick={ this.onClose }
|
||||
/>
|
||||
);
|
||||
|
||||
if (step === 0) {
|
||||
@@ -112,9 +117,11 @@ class AddContract extends Component {
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='addContract.button.next'
|
||||
defaultMessage='Next' />
|
||||
defaultMessage='Next'
|
||||
/>
|
||||
}
|
||||
onClick={ this.onNext } />
|
||||
onClick={ this.onNext }
|
||||
/>
|
||||
];
|
||||
}
|
||||
|
||||
@@ -126,19 +133,23 @@ class AddContract extends Component {
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='addContract.button.prev'
|
||||
defaultMessage='Back' />
|
||||
defaultMessage='Back'
|
||||
/>
|
||||
}
|
||||
onClick={ this.onPrev } />,
|
||||
onClick={ this.onPrev }
|
||||
/>,
|
||||
<Button
|
||||
icon={ <AddIcon /> }
|
||||
key='add'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='addContract.button.add'
|
||||
defaultMessage='Add Contract' />
|
||||
defaultMessage='Add Contract'
|
||||
/>
|
||||
}
|
||||
disabled={ this.store.hasError }
|
||||
onClick={ this.onAdd } />
|
||||
onClick={ this.onAdd }
|
||||
/>
|
||||
];
|
||||
}
|
||||
|
||||
@@ -152,58 +163,70 @@ class AddContract extends Component {
|
||||
hint={
|
||||
<FormattedMessage
|
||||
id='addContract.address.hint'
|
||||
defaultMessage='the network address for the contract' />
|
||||
defaultMessage='the network address for the contract'
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='addContract.address.label'
|
||||
defaultMessage='network address' />
|
||||
defaultMessage='network address'
|
||||
/>
|
||||
}
|
||||
onChange={ this.onChangeAddress }
|
||||
onSubmit={ this.onEditAddress }
|
||||
value={ address } />
|
||||
value={ address }
|
||||
/>
|
||||
<Input
|
||||
error={ nameError }
|
||||
hint={
|
||||
<FormattedMessage
|
||||
id='addContract.name.hint'
|
||||
defaultMessage='a descriptive name for the contract' />
|
||||
defaultMessage='a descriptive name for the contract'
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='addContract.name.label'
|
||||
defaultMessage='contract name' />
|
||||
defaultMessage='contract name'
|
||||
/>
|
||||
}
|
||||
onSubmit={ this.onEditName }
|
||||
value={ name } />
|
||||
value={ name }
|
||||
/>
|
||||
<Input
|
||||
hint={
|
||||
<FormattedMessage
|
||||
id='addContract.description.hint'
|
||||
defaultMessage='an expanded description for the entry' />
|
||||
defaultMessage='an expanded description for the entry'
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='addContract.description.label'
|
||||
defaultMessage='(optional) contract description' />
|
||||
defaultMessage='(optional) contract description'
|
||||
/>
|
||||
}
|
||||
onSubmit={ this.onEditDescription }
|
||||
value={ description } />
|
||||
value={ description }
|
||||
/>
|
||||
<Input
|
||||
error={ abiError }
|
||||
hint={
|
||||
<FormattedMessage
|
||||
id='addContract.abi.hint'
|
||||
defaultMessage='the abi for the contract' />
|
||||
defaultMessage='the abi for the contract'
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='addContract.abi.label'
|
||||
defaultMessage='contract abi' />
|
||||
defaultMessage='contract abi'
|
||||
/>
|
||||
}
|
||||
onSubmit={ this.onEditAbi }
|
||||
readOnly={ abiType.readOnly }
|
||||
value={ abi } />
|
||||
value={ abi }
|
||||
/>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@ function render (props = {}) {
|
||||
<AddContract
|
||||
{ ...props }
|
||||
contracts={ CONTRACTS }
|
||||
onClose={ onClose } />,
|
||||
onClose={ onClose }
|
||||
/>,
|
||||
{ context: { store: reduxStore } }
|
||||
).find('AddContract').shallow({ context: { api } });
|
||||
instance = component.instance();
|
||||
|
||||
@@ -30,15 +30,18 @@ const ABI_TYPES = [
|
||||
<a href='https://github.com/ethereum/EIPs/issues/20' target='_blank'>
|
||||
<FormattedMessage
|
||||
id='addContract.abiType.token.erc20'
|
||||
defaultMessage='ERC 20' />
|
||||
defaultMessage='ERC 20'
|
||||
/>
|
||||
</a>
|
||||
)
|
||||
} } />
|
||||
} }
|
||||
/>
|
||||
),
|
||||
label: (
|
||||
<FormattedMessage
|
||||
id='addContract.abiType.token.label'
|
||||
defaultMessage='Token' />
|
||||
defaultMessage='Token'
|
||||
/>
|
||||
),
|
||||
readOnly: true,
|
||||
type: 'token',
|
||||
@@ -54,15 +57,18 @@ const ABI_TYPES = [
|
||||
<a href='https://github.com/ethereum/dapp-bin/blob/master/wallet/wallet.sol' target='_blank'>
|
||||
<FormattedMessage
|
||||
id='addContract.abiType.multisigWallet.link'
|
||||
defaultMessage='see contract code' />
|
||||
defaultMessage='see contract code'
|
||||
/>
|
||||
</a>
|
||||
)
|
||||
} } />
|
||||
} }
|
||||
/>
|
||||
),
|
||||
label: (
|
||||
<FormattedMessage
|
||||
id='addContract.abiType.multisigWallet.label'
|
||||
defaultMessage='Multisig Wallet' />
|
||||
defaultMessage='Multisig Wallet'
|
||||
/>
|
||||
),
|
||||
readOnly: true,
|
||||
type: 'multisig',
|
||||
@@ -72,12 +78,14 @@ const ABI_TYPES = [
|
||||
description: (
|
||||
<FormattedMessage
|
||||
id='addContract.abiType.custom.description'
|
||||
defaultMessage='Contract created from custom ABI' />
|
||||
defaultMessage='Contract created from custom ABI'
|
||||
/>
|
||||
),
|
||||
label: (
|
||||
<FormattedMessage
|
||||
id='addContract.abiType.custom.label'
|
||||
defaultMessage='Custom Contract' />
|
||||
defaultMessage='Custom Contract'
|
||||
/>
|
||||
),
|
||||
type: 'custom',
|
||||
value: ''
|
||||
|
||||
Reference in New Issue
Block a user