Updated ESLINT and fixing linting issues

This commit is contained in:
Nicolas Gotchac 2016-11-25 19:48:06 +01:00
parent 8392090861
commit f77afd072b
23 changed files with 64 additions and 67 deletions

View File

@ -15,6 +15,7 @@
"no-debugger": "error", "no-debugger": "error",
"no-alert": "error", "no-alert": "error",
"jsx-quotes": ["error", "prefer-single"], "jsx-quotes": ["error", "prefer-single"],
"react/jsx-curly-spacing": ["error", "always"] "react/jsx-curly-spacing": ["error", "always"],
"object-property-newline": 0
} }
} }

View File

@ -110,7 +110,7 @@ export class Transaction extends BaseTransaction {
static renderHeader () { static renderHeader () {
return ( return (
<tr className={ styles.header }> <tr className={ styles.header }>
<th></th> <th />
<th> <th>
Transaction Transaction
</th> </th>
@ -129,8 +129,7 @@ export class Transaction extends BaseTransaction {
<th> <th>
# Propagated # Propagated
</th> </th>
<th> <th />
</th>
</tr> </tr>
); );
} }
@ -201,7 +200,7 @@ export class LocalTransaction extends BaseTransaction {
static renderHeader () { static renderHeader () {
return ( return (
<tr className={ styles.header }> <tr className={ styles.header }>
<th></th> <th />
<th> <th>
Transaction Transaction
</th> </th>

View File

@ -73,7 +73,7 @@ export default class Import extends Component {
Provide the ABI (Contract Interface) in the space provided below. Only non-constant functions (names &amp; types) will be imported, while constant functions and existing signatures will be ignored. Provide the ABI (Contract Interface) in the space provided below. Only non-constant functions (names &amp; types) will be imported, while constant functions and existing signatures will be ignored.
</div> </div>
<div className={ styles.info }> <div className={ styles.info }>
<textarea rows='8' className={ styles.error } onChange={ this.onAbiEdit }></textarea> <textarea rows='8' className={ styles.error } onChange={ this.onAbiEdit } />
<div className={ styles.error }> <div className={ styles.error }>
{ abiError } { abiError }
</div> </div>

View File

@ -147,7 +147,7 @@ export const loadToken = (index) => (dispatch, getState) => {
dispatch(setTokenData(index, null)); dispatch(setTokenData(index, null));
dispatch(setTokenLoading(index, false)); dispatch(setTokenLoading(index, false));
if (!e instanceof TypeError) { if (!(e instanceof TypeError)) {
console.error(`loadToken #${index} error`, e); console.error(`loadToken #${index} error`, e);
} }
}); });

View File

@ -137,7 +137,7 @@ export default class SMSVerification extends Component {
step, step,
fee, number, isNumberValid, isVerified, hasRequested, fee, number, isNumberValid, isVerified, hasRequested,
requestTx, isCodeValid, confirmationTx, requestTx, isCodeValid, confirmationTx,
setNumber, setConsentGiven, setCode setCode
} = this.props.store; } = this.props.store;
switch (phase) { switch (phase) {

View File

@ -92,7 +92,7 @@ class Accounts extends Component {
const loadings = ((accounts && Object.keys(accounts)) || []).map((_, idx) => ( const loadings = ((accounts && Object.keys(accounts)) || []).map((_, idx) => (
<div key={ idx } className={ styles.loading }> <div key={ idx } className={ styles.loading }>
<div></div> <div />
</div> </div>
)); ));

View File

@ -192,7 +192,7 @@ class TabBar extends Component {
return ( return (
<ToolbarGroup> <ToolbarGroup>
<div className={ styles.last }> <div className={ styles.last }>
<div></div> <div />
</div> </div>
</ToolbarGroup> </ToolbarGroup>
); );

View File

@ -65,8 +65,7 @@ export default class Dapp extends Component {
name={ name } name={ name }
sandbox='allow-forms allow-popups allow-same-origin allow-scripts' sandbox='allow-forms allow-popups allow-same-origin allow-scripts'
scrolling='auto' scrolling='auto'
src={ src }> src={ src } />
</iframe>
); );
} }
} }

View File

@ -51,8 +51,7 @@ export default class AddDapps extends Component {
] } ] }
visible visible
scroll> scroll>
<div className={ styles.warning }> <div className={ styles.warning } />
</div>
{ this.renderList(store.sortedLocal, 'Applications locally available', 'All applications installed locally on the machine by the user for access by the Parity client.') } { this.renderList(store.sortedLocal, 'Applications locally available', 'All applications installed locally on the machine by the user for access by the Parity client.') }
{ this.renderList(store.sortedBuiltin, 'Applications bundled with Parity', 'Experimental applications developed by the Parity team to show off dapp capabilities, integration, experimental features and to control certain network-wide client behaviour.') } { this.renderList(store.sortedBuiltin, 'Applications bundled with Parity', 'Experimental applications developed by the Parity team to show off dapp capabilities, integration, experimental features and to control certain network-wide client behaviour.') }
{ this.renderList(store.sortedNetwork, 'Applications on the global network', 'These applications are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each application before interacting.') } { this.renderList(store.sortedNetwork, 'Applications on the global network', 'These applications are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each application before interacting.') }

View File

@ -62,7 +62,7 @@ export default class Calls extends Component {
onClick={ this.clearHistory } onClick={ this.clearHistory }
className={ styles.removeIcon } className={ styles.removeIcon }
> >
<i className='icon-trash'></i> <i className='icon-trash' />
</a> </a>
); );
} }

View File

@ -140,7 +140,7 @@ export default class EditableValue extends Component {
title={ `Reset to ${this.props.defaultValue}` } title={ `Reset to ${this.props.defaultValue}` }
{ ...this._testInherit('reset') } { ...this._testInherit('reset') }
> >
<i className='icon-anchor'></i> <i className='icon-anchor' />
</a> </a>
); );
} }
@ -154,7 +154,7 @@ export default class EditableValue extends Component {
onClick={ this.onSubmit } onClick={ this.onSubmit }
{ ...this._testInherit('submit') } { ...this._testInherit('submit') }
> >
<i className='icon-check'></i> <i className='icon-check' />
</a>, </a>,
<a <a
key={ 'cancel' } key={ 'cancel' }
@ -162,7 +162,7 @@ export default class EditableValue extends Component {
onClick={ this.onCancel } onClick={ this.onCancel }
{ ...this._testInherit('cancel') } { ...this._testInherit('cancel') }
> >
<i className='icon-close'></i> <i className='icon-close' />
</a> </a>
]; ];
} }
@ -175,7 +175,7 @@ export default class EditableValue extends Component {
title='Edit' title='Edit'
{ ...this._testInherit('edit') } { ...this._testInherit('edit') }
> >
<i className='icon-pencil'></i> <i className='icon-pencil' />
</a> </a>
); );
} }

View File

@ -66,7 +66,7 @@ export default class RpcCalls extends Component {
</div> </div>
</div> </div>
</div> </div>
<div style={ { clear: 'both' } }></div> <div style={ { clear: 'both' } } />
<div className='dapp-container'> <div className='dapp-container'>
<div className='row'> <div className='row'>
<div className='col col-6 mobile-full'> <div className='col col-6 mobile-full'>

View File

@ -46,7 +46,7 @@ class RpcDocs extends Component {
</div> </div>
</div> </div>
</div> </div>
<div style={ { clear: 'both' } }></div> <div style={ { clear: 'both' } } />
<div className='dapp-container'> <div className='dapp-container'>
<div className='row'> <div className='row'>
<div className='col col-12'> <div className='col col-12'>

View File

@ -24,10 +24,10 @@ export default class RpcNav extends Component {
return ( return (
<div className={ styles.nav }> <div className={ styles.nav }>
<Link to={ '/rpc/calls' } activeClassName={ styles.activeNav } { ...this._test('rpc-calls-link') }> <Link to={ '/rpc/calls' } activeClassName={ styles.activeNav } { ...this._test('rpc-calls-link') }>
<i className='icon-call-out'></i> <i className='icon-call-out' />
</Link> </Link>
<Link to={ '/rpc/docs' } activeClassName={ styles.activeNav } { ...this._test('rpc-docs-link') }> <Link to={ '/rpc/docs' } activeClassName={ styles.activeNav } { ...this._test('rpc-docs-link') }>
<i className='icon-docs'></i> <i className='icon-docs' />
</Link> </Link>
</div> </div>
); );

View File

@ -118,8 +118,7 @@ class WriteContract extends Component {
<span <span
className={ styles.slider } className={ styles.slider }
onMouseDown={ this.handleStartResize } onMouseDown={ this.handleStartResize }
> />
</span>
</div> </div>
<div <div