1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

linting fixes

This commit is contained in:
Jernej Pregelj 2019-01-23 14:43:41 +01:00
parent d032b24f81
commit 70fb6f078f
7 changed files with 80 additions and 105 deletions

43
package-lock.json generated
View File

@ -6670,8 +6670,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -6692,14 +6691,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -6714,20 +6711,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -6844,8 +6838,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -6857,7 +6850,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -6872,7 +6864,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -6880,14 +6871,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -6906,7 +6895,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -6987,8 +6975,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -7000,7 +6987,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -7086,8 +7072,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -7123,7 +7108,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -7143,7 +7127,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -7187,14 +7170,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
@ -20434,7 +20415,7 @@
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.37", "web3-core-helpers": "1.0.0-beta.37",
"websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
} }
}, },
"web3-shh": { "web3-shh": {

View File

@ -1,11 +1,12 @@
import React from 'react' import React from 'react'
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom' import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import Home from './pages/Home'
import About from './pages/About' import About from './pages/About'
import Publish from './pages/Publish'
import Details from './pages/Details' import Details from './pages/Details'
import Home from './pages/Home'
import List from './pages/List' import List from './pages/List'
import NotFound from './pages/NotFound' import NotFound from './pages/NotFound'
import Publish from './pages/Publish'
const Routes = () => ( const Routes = () => (
<Router> <Router>

View File

@ -3,24 +3,24 @@ import {
} from '@oceanprotocol/squid/dist/node/squid' } from '@oceanprotocol/squid/dist/node/squid'
import { import {
nodeScheme, address,
nodeHost,
nodePort,
aquariusScheme,
aquariusHost, aquariusHost,
aquariusPort, aquariusPort,
brizoScheme, aquariusScheme,
brizoHost, brizoHost,
brizoPort, brizoPort,
parityScheme, brizoScheme,
nodeHost,
nodePort,
nodeScheme,
parityHost, parityHost,
parityPort, parityPort,
secretStoreScheme, parityScheme,
password,
secretStoreHost, secretStoreHost,
secretStorePort, secretStorePort,
secretStoreScheme,
threshold, threshold,
password,
address,
verbose verbose
} from '../config/ocean' } from '../config/ocean'

View File

@ -1,13 +1,11 @@
import React, { Component } from 'react'; import React, { Component } from 'react'
class About extends Component { class About extends Component {
render() { public render() {
return ( return (
<div> <div>About</div>
About )
</div> }
);
}
} }
export default About; export default About

View File

@ -1,13 +1,11 @@
import React, { Component } from 'react'; import React, { Component } from 'react'
class Details extends Component { class Details extends Component {
render() { public render() {
return ( return (
<div> <div>Details</div>
Details )
</div> }
);
}
} }
export default Details; export default Details

View File

@ -1,13 +1,11 @@
import React, { Component } from 'react'; import React, { Component } from 'react'
class List extends Component { class List extends Component {
render() { public render() {
return ( return (
<div> <div>List</div>
List )
</div> }
);
}
} }
export default List; export default List

View File

@ -1,48 +1,47 @@
import React, { Component, FormEvent, ChangeEvent } from 'react'; import React, { ChangeEvent, Component, FormEvent } from 'react'
interface Props { interface IProps {
} }
interface State { interface IState {
value?: string value?: string
} }
class Publish extends Component<Props, State> { class Publish extends Component<IProps, IState> {
constructor(props: Props) { constructor(props: IProps) {
super(props); super(props)
this.state = {value: ''}; this.state = { value: '' }
this.inputChange = this.inputChange.bind(this); this.inputChange = this.inputChange.bind(this)
this.registerAsset = this.registerAsset.bind(this); this.registerAsset = this.registerAsset.bind(this)
} }
inputChange(event: ChangeEvent<HTMLInputElement>) { public render() {
this.setState({ return (
[event.target.name]: event.target.value <div>
}); <h1>Publish</h1>
} <form onSubmit={this.registerAsset}>
<label>
Name:
<input type="text" name="value" value={this.state.value} onChange={this.inputChange} />
</label>
<input type="submit" value="Submit" />
</form>
</div>
)
}
registerAsset(event: FormEvent<HTMLFormElement>) { private inputChange(event: ChangeEvent<HTMLInputElement>) {
event.preventDefault() this.setState({
console.log("submit", this.state.value) [event.target.name]: event.target.value
})
}
} private registerAsset(event: FormEvent<HTMLFormElement>) {
event.preventDefault()
render() { // console.log("submit", this.state.value)
return ( }
<div>
<h1>Publish</h1>
<form onSubmit={this.registerAsset}>
<label>
Name:
<input type="text" name="value" value={this.state.value} onChange={this.inputChange} />
</label>
<input type="submit" value="Submit" />
</form>
</div>
);
}
} }
export default Publish; export default Publish