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

View File

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

View File

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

View File

@ -1,13 +1,11 @@
import React, { Component } from 'react';
import React, { Component } from 'react'
class About extends Component {
render() {
return (
<div>
About
</div>
);
}
public render() {
return (
<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 {
render() {
return (
<div>
Details
</div>
);
}
public render() {
return (
<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 {
render() {
return (
<div>
List
</div>
);
}
public render() {
return (
<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 {
value?: string
interface IState {
value?: string
}
class Publish extends Component<Props, State> {
constructor(props: Props) {
super(props);
this.state = {value: ''};
class Publish extends Component<IProps, IState> {
constructor(props: IProps) {
super(props)
this.state = { value: '' }
this.inputChange = this.inputChange.bind(this);
this.registerAsset = this.registerAsset.bind(this);
}
this.inputChange = this.inputChange.bind(this)
this.registerAsset = this.registerAsset.bind(this)
}
inputChange(event: ChangeEvent<HTMLInputElement>) {
this.setState({
[event.target.name]: event.target.value
});
}
public render() {
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>
)
}
registerAsset(event: FormEvent<HTMLFormElement>) {
event.preventDefault()
console.log("submit", this.state.value)
private inputChange(event: ChangeEvent<HTMLInputElement>) {
this.setState({
[event.target.name]: event.target.value
})
}
}
render() {
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>
);
}
private registerAsset(event: FormEvent<HTMLFormElement>) {
event.preventDefault()
// console.log("submit", this.state.value)
}
}
export default Publish;
export default Publish