From 70fb6f078f4135341ff373adf6112ca8a815c955 Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Wed, 23 Jan 2019 14:43:41 +0100 Subject: [PATCH] linting fixes --- package-lock.json | 43 ++++++++------------------ src/Routes.tsx | 5 +-- src/ocean.ts | 18 +++++------ src/pages/About.tsx | 16 +++++----- src/pages/Details.tsx | 16 +++++----- src/pages/List.tsx | 16 +++++----- src/pages/Publish.tsx | 71 +++++++++++++++++++++---------------------- 7 files changed, 80 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index 25b1d47..0e85ada 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/src/Routes.tsx b/src/Routes.tsx index b7424df..c699449 100644 --- a/src/Routes.tsx +++ b/src/Routes.tsx @@ -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 = () => ( diff --git a/src/ocean.ts b/src/ocean.ts index 28217a8..949b1e7 100644 --- a/src/ocean.ts +++ b/src/ocean.ts @@ -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' diff --git a/src/pages/About.tsx b/src/pages/About.tsx index 56428c6..9788fa7 100644 --- a/src/pages/About.tsx +++ b/src/pages/About.tsx @@ -1,13 +1,11 @@ -import React, { Component } from 'react'; +import React, { Component } from 'react' class About extends Component { - render() { - return ( -
- About -
- ); - } + public render() { + return ( +
About
+ ) + } } -export default About; +export default About diff --git a/src/pages/Details.tsx b/src/pages/Details.tsx index de2f45e..3e72ff5 100644 --- a/src/pages/Details.tsx +++ b/src/pages/Details.tsx @@ -1,13 +1,11 @@ -import React, { Component } from 'react'; +import React, { Component } from 'react' class Details extends Component { - render() { - return ( -
- Details -
- ); - } + public render() { + return ( +
Details
+ ) + } } -export default Details; +export default Details diff --git a/src/pages/List.tsx b/src/pages/List.tsx index f3cdb32..5fd849d 100644 --- a/src/pages/List.tsx +++ b/src/pages/List.tsx @@ -1,13 +1,11 @@ -import React, { Component } from 'react'; +import React, { Component } from 'react' class List extends Component { - render() { - return ( -
- List -
- ); - } + public render() { + return ( +
List
+ ) + } } -export default List; +export default List diff --git a/src/pages/Publish.tsx b/src/pages/Publish.tsx index 500b8ab..0403f58 100644 --- a/src/pages/Publish.tsx +++ b/src/pages/Publish.tsx @@ -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 { - constructor(props: Props) { - super(props); - this.state = {value: ''}; +class Publish extends Component { + 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) { - this.setState({ - [event.target.name]: event.target.value - }); - } + public render() { + return ( +
+

Publish

+
+ + +
+
+ ) + } - registerAsset(event: FormEvent) { - event.preventDefault() - console.log("submit", this.state.value) + private inputChange(event: ChangeEvent) { + this.setState({ + [event.target.name]: event.target.value + }) + } - } - - render() { - return ( -
-

Publish

-
- - -
-
- ); - } + private registerAsset(event: FormEvent) { + event.preventDefault() + // console.log("submit", this.state.value) + } } -export default Publish; +export default Publish