Fix lint rules for ternary operator placement.

This commit is contained in:
Kevin Serrano 2016-11-11 15:37:22 -08:00
parent 3828edf6a4
commit 0c23925c23
No known key found for this signature in database
GPG Key ID: 7CC862A58D2889B4
2 changed files with 19 additions and 19 deletions

View File

@ -127,7 +127,7 @@
"no-whitespace-before-property": 2, "no-whitespace-before-property": 2,
"no-with": 2, "no-with": 2,
"one-var": [2, { "initialized": "never" }], "one-var": [2, { "initialized": "never" }],
"operator-linebreak": [1, "after", { "overrides": { "?": "before", ":": "before" } }], "operator-linebreak": [1, "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
"padded-blocks": [1, "never"], "padded-blocks": [1, "never"],
"quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}], "quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
"semi": [2, "never"], "semi": [2, "never"],

View File

@ -30,22 +30,22 @@ PendingTx.prototype.render = function () {
} }
`), `),
txData.simulationFails txData.simulationFails ?
? h('.error', { h('.error', {
style: { style: {
marginLeft: 50, marginLeft: 50,
fontSize: '0.9em', fontSize: '0.9em',
}, },
}, 'Transaction Error. Exception thrown in contract code.') }, 'Transaction Error. Exception thrown in contract code.')
: null, : null,
state.insufficientBalance state.insufficientBalance ?
? h('span.error', { h('span.error', {
style: { style: {
marginLeft: 50, marginLeft: 50,
fontSize: '0.9em', fontSize: '0.9em',
}, },
}, 'Insufficient balance for transaction') }, 'Insufficient balance for transaction')
: null, : null,
// send + cancel // send + cancel
@ -57,10 +57,10 @@ PendingTx.prototype.render = function () {
}, },
}, [ }, [
state.insufficientBalance state.insufficientBalance ?
? h('button.btn-green', { h('button.btn-green', {
onClick: state.buyEth, onClick: state.buyEth,
}, 'Buy Ether') }, 'Buy Ether')
: null, : null,
h('button.confirm', { h('button.confirm', {