From 53366bafa562fa095bcc7812f636c9c4b22d9315 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 3 Aug 2018 13:08:55 -0400 Subject: [PATCH] make linter happ-ier --- .eslintrc.json | 3 +-- embark-ui/src/components/ContractProfile.js | 4 ++-- embark-ui/src/containers/ContractContainer.js | 17 +++++--------- .../containers/ContractProfileContainer.js | 22 +++++-------------- .../src/containers/ContractsContainer.js | 10 ++++----- 5 files changed, 20 insertions(+), 36 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4808fb1b..808f6f02 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -213,8 +213,7 @@ "nonblock-statement-body-position": "error", "object-curly-newline": "off", "object-curly-spacing": [ - "error", - "never" + "off" ], "object-property-newline": "off", "object-shorthand": "off", diff --git a/embark-ui/src/components/ContractProfile.js b/embark-ui/src/components/ContractProfile.js index 6c5a7a2e..66217e52 100644 --- a/embark-ui/src/components/ContractProfile.js +++ b/embark-ui/src/components/ContractProfile.js @@ -30,7 +30,7 @@ const ContractProfile = ({contract}) => ( {content: method.mutability}, {content: `(${method.inputs.map((x) => x.type).join(',')})`}, {content: `(${method.outputs.map((x) => x.type).join(',')})`}, - {content: method.gasEstimates}, + {content: method.gasEstimates} ]); }) } @@ -39,7 +39,7 @@ const ContractProfile = ({contract}) => ( -) +); export default ContractProfile; diff --git a/embark-ui/src/containers/ContractContainer.js b/embark-ui/src/containers/ContractContainer.js index 0ee8d1fa..9c5bc16d 100644 --- a/embark-ui/src/containers/ContractContainer.js +++ b/embark-ui/src/containers/ContractContainer.js @@ -11,16 +11,13 @@ class ContractContainer extends Component { } render() { - console.dir("||======>"); - console.dir(this.props); - console.dir("||======>"); - const { contract } = this.props; + const {contract} = this.props; if (!contract.data) { return (

Loading contract...

- ) + ); } if (contract.error) { @@ -28,11 +25,9 @@ class ContractContainer extends Component {

Error API...

- ) + ); } - console.dir(contract); - return ( ); @@ -41,13 +36,13 @@ class ContractContainer extends Component { function mapStateToProps(state) { return { contract: state.contract } -} +}: export default compose( connect( mapStateToProps, - { fetchContract } + {fetchContract} ), withRouter -)(ContractContainer) +)(ContractContainer); diff --git a/embark-ui/src/containers/ContractProfileContainer.js b/embark-ui/src/containers/ContractProfileContainer.js index 13c9495d..6641f405 100644 --- a/embark-ui/src/containers/ContractProfileContainer.js +++ b/embark-ui/src/containers/ContractProfileContainer.js @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { compose } from 'redux'; import { fetchContractProfile } from '../actions'; import ContractProfile from '../components/ContractProfile'; -import { withRouter } from 'react-router' +import { withRouter } from 'react-router'; class ContractProfileContainer extends Component { componentWillMount() { @@ -11,9 +11,6 @@ class ContractProfileContainer extends Component { } render() { - console.dir("||======>"); - console.dir(this.props); - console.dir("||======>"); //const { contract } = this.props; const contract = this.props.contractProfile; if (!contract.data) { @@ -21,7 +18,7 @@ class ContractProfileContainer extends Component {

Loading contract...

- ) + ); } if (contract.data.error) { @@ -29,24 +26,17 @@ class ContractProfileContainer extends Component {

Error API...

- ) + ); } - console.dir(contract); - return ( ); } -}; +} function mapStateToProps(state) { - console.dir("-----------"); - console.dir("-----------"); - console.dir(state); - console.dir("-----------"); - console.dir("-----------"); - return { contractProfile: state.contractProfile } + return { contractProfile: state.contractProfile }; } export default compose( @@ -55,5 +45,5 @@ export default compose( { fetchContractProfile } ), withRouter -)(ContractProfileContainer) +)(ContractProfileContainer); diff --git a/embark-ui/src/containers/ContractsContainer.js b/embark-ui/src/containers/ContractsContainer.js index d2c1f856..6b9b9a90 100644 --- a/embark-ui/src/containers/ContractsContainer.js +++ b/embark-ui/src/containers/ContractsContainer.js @@ -15,7 +15,7 @@ class ContractsContainer extends Component {

Loading contracts...

- ) + ); } if (contracts.error) { @@ -23,17 +23,17 @@ class ContractsContainer extends Component {

Error API...

- ) + ); } return ( ); } -}; +} function mapStateToProps(state) { - return { contracts: state.contracts } + return { contracts: state.contracts }; } export default connect( @@ -41,5 +41,5 @@ export default connect( { fetchContracts }, -)(ContractsContainer) +)(ContractsContainer);