Updated ESLINT and fixing linting issues
This commit is contained in:
parent
8392090861
commit
f77afd072b
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,18 +158,18 @@ export default class Application extends Component {
|
|||||||
{ Transaction.renderHeader() }
|
{ Transaction.renderHeader() }
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{
|
{
|
||||||
transactions.map((tx, idx) => (
|
transactions.map((tx, idx) => (
|
||||||
<Transaction
|
<Transaction
|
||||||
key={ tx.transaction.hash }
|
key={ tx.transaction.hash }
|
||||||
idx={ idx + 1 }
|
idx={ idx + 1 }
|
||||||
isLocal={ tx.isLocal }
|
isLocal={ tx.isLocal }
|
||||||
transaction={ tx.transaction }
|
transaction={ tx.transaction }
|
||||||
stats={ tx.stats }
|
stats={ tx.stats }
|
||||||
blockNumber={ blockNumber }
|
blockNumber={ blockNumber }
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
);
|
);
|
||||||
|
@ -83,7 +83,7 @@ class BaseTransaction extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<span className={ styles.nowrap }>
|
<span className={ styles.nowrap }>
|
||||||
{ noOfPropagations } ({ noOfPeers } peers)
|
{ noOfPropagations } ({ noOfPeers } peers)
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -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>
|
||||||
|
@ -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 & 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 & 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>
|
||||||
|
@ -30,9 +30,9 @@ import './style.css';
|
|||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
(
|
(
|
||||||
<Provider store={ store }>
|
<Provider store={ store }>
|
||||||
<Container />
|
<Container />
|
||||||
</Provider>
|
</Provider>
|
||||||
),
|
),
|
||||||
document.querySelector('#container')
|
document.querySelector('#container')
|
||||||
);
|
);
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -79,16 +79,16 @@ export default class LoadContract extends Component {
|
|||||||
const contractsTab = Object.keys(contracts).length === 0
|
const contractsTab = Object.keys(contracts).length === 0
|
||||||
? null
|
? null
|
||||||
: (
|
: (
|
||||||
<Tab label='Local' >
|
<Tab label='Local' >
|
||||||
{ this.renderEditor() }
|
{ this.renderEditor() }
|
||||||
|
|
||||||
<SelectableList
|
<SelectableList
|
||||||
onChange={ this.onClickContract }
|
onChange={ this.onClickContract }
|
||||||
>
|
>
|
||||||
<Subheader>Saved Contracts</Subheader>
|
<Subheader>Saved Contracts</Subheader>
|
||||||
{ this.renderContracts(contracts) }
|
{ this.renderContracts(contracts) }
|
||||||
</SelectableList>
|
</SelectableList>
|
||||||
</Tab>
|
</Tab>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -174,9 +174,9 @@ export default class LoadContract extends Component {
|
|||||||
const secondaryText = description || `Saved ${moment(timestamp).fromNow()}`;
|
const secondaryText = description || `Saved ${moment(timestamp).fromNow()}`;
|
||||||
const remove = removable
|
const remove = removable
|
||||||
? (
|
? (
|
||||||
<IconButton onTouchTap={ onDelete }>
|
<IconButton onTouchTap={ onDelete }>
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
@ -98,10 +98,10 @@ export default class PasswordManager extends Component {
|
|||||||
|
|
||||||
const passwordHint = meta && meta.passwordHint
|
const passwordHint = meta && meta.passwordHint
|
||||||
? (
|
? (
|
||||||
<span className={ styles.passwordHint }>
|
<span className={ styles.passwordHint }>
|
||||||
<span className={ styles.hintLabel }>Hint </span>
|
<span className={ styles.hintLabel }>Hint </span>
|
||||||
{ meta.passwordHint }
|
{ meta.passwordHint }
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
@ -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) {
|
||||||
|
@ -38,9 +38,9 @@ export default class Title extends Component {
|
|||||||
|
|
||||||
const byLine = typeof byline === 'string'
|
const byLine = typeof byline === 'string'
|
||||||
? (
|
? (
|
||||||
<span title={ byline }>
|
<span title={ byline }>
|
||||||
{ byline }
|
{ byline }
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
: byline;
|
: byline;
|
||||||
|
|
||||||
|
@ -74,10 +74,10 @@ class Tooltip extends Component {
|
|||||||
label='Next'
|
label='Next'
|
||||||
onTouchTap={ onNextTooltip } />
|
onTouchTap={ onNextTooltip } />
|
||||||
] : (
|
] : (
|
||||||
<FlatButton
|
<FlatButton
|
||||||
icon={ <ActionDoneAll /> }
|
icon={ <ActionDoneAll /> }
|
||||||
label='Done'
|
label='Done'
|
||||||
onTouchTap={ onCloseTooltips } />
|
onTouchTap={ onCloseTooltips } />
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -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>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -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>
|
||||||
);
|
);
|
||||||
@ -206,7 +206,7 @@ class TabBar extends Component {
|
|||||||
.map((view, index) => {
|
.map((view, index) => {
|
||||||
const body = (view.id === 'accounts')
|
const body = (view.id === 'accounts')
|
||||||
? (
|
? (
|
||||||
<Tooltip className={ styles.tabbarTooltip } text='navigate between the different parts and views of the application, switching between an account view, token view and distributed application view' />
|
<Tooltip className={ styles.tabbarTooltip } text='navigate between the different parts and views of the application, switching between an account view, token view and distributed application view' />
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
@ -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>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.') }
|
||||||
|
@ -80,7 +80,7 @@ export default class TransactionPendingForm extends Component {
|
|||||||
onClick={ this.onToggleReject }
|
onClick={ this.onToggleReject }
|
||||||
className={ styles.rejectToggle }
|
className={ styles.rejectToggle }
|
||||||
>
|
>
|
||||||
{ html }
|
{ html }
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ export default class JsonEditor extends Component {
|
|||||||
className={ `${styles.editor} ${errorClass}` }
|
className={ `${styles.editor} ${errorClass}` }
|
||||||
value={ this.state.value }
|
value={ this.state.value }
|
||||||
/>
|
/>
|
||||||
{ this.renderError() }
|
{ this.renderError() }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -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'>
|
||||||
|
@ -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'>
|
||||||
|
@ -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>
|
||||||
);
|
);
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user