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

kick out tslint

This commit is contained in:
Matthias Kretschmann 2019-02-05 17:05:28 +01:00
parent 079418d0da
commit bcede18c50
Signed by: m
GPG Key ID: 606EEEF3C479A91F
8 changed files with 30 additions and 38 deletions

View File

@ -18,5 +18,8 @@
"error", "error",
{ "multiline": { "delimiter": "none" } } { "multiline": { "delimiter": "none" } }
] ]
},
"env": {
"jest": true
} }
} }

View File

@ -8,29 +8,26 @@ import './styles/global.scss'
import { nodeHost, nodePort, nodeScheme } from './config' import { nodeHost, nodePort, nodeScheme } from './config'
interface IState { interface AppState {
isLogged: boolean isLogged: boolean
web3: any web3: any
ocean: {} ocean: {}
startLogin: () => void startLogin: () => void
} }
class App extends Component<{}, IState> { class App extends Component<{}, AppState> {
public startLogin: () => void public startLogin = (event?: any) => {
constructor(props: {}) { if (event) {
super(props) event.preventDefault()
this.startLogin = (event?) => {
if (event) {
event.preventDefault()
}
this.startLoginProcess()
}
this.state = {
isLogged: false,
web3: {},
ocean: {},
startLogin: this.startLogin
} }
this.startLoginProcess()
}
public state = {
isLogged: false,
web3: {},
ocean: {},
startLogin: this.startLogin
} }
public async componentDidMount() { public async componentDidMount() {

View File

@ -1,14 +1,14 @@
import React, { PureComponent } from 'react' import React, { PureComponent } from 'react'
import styles from './Button.module.scss' import styles from './Button.module.scss'
interface IButtonProps { interface ButtonProps {
children: string children: string
primary?: boolean primary?: boolean
link?: boolean link?: boolean
href?: string href?: string
} }
export default class Button extends PureComponent<IButtonProps, any> { export default class Button extends PureComponent<ButtonProps, any> {
public render() { public render() {
let classes let classes
const { primary, link, href, children } = this.props const { primary, link, href, children } = this.props

View File

@ -2,17 +2,17 @@ import { Logger } from '@oceanprotocol/squid'
import React, { Component } from 'react' import React, { Component } from 'react'
import { User } from '../context/User' import { User } from '../context/User'
interface IState { interface DetailsState {
ddo: any ddo: any
metadata: any metadata: any
} }
interface IProps { interface DetailsProps {
location: any location: any
match: any match: any
} }
class Details extends Component<IProps, IState> { class Details extends Component<DetailsProps, DetailsState> {
public state = { ddo: null, metadata: null } public state = { ddo: null, metadata: null }
public async componentDidMount() { public async componentDidMount() {

View File

@ -2,15 +2,15 @@ import React, { ChangeEvent, Component, FormEvent } from 'react'
import Button from '../components/atoms/Button' import Button from '../components/atoms/Button'
import styles from './Home.module.scss' import styles from './Home.module.scss'
interface IState { interface HomeState {
search?: string search?: string
} }
interface IProps { interface HomeProps {
history: any history: any
} }
class Home extends Component<IProps, IState> { class Home extends Component<HomeProps, HomeState> {
public state = { search: '' } public state = { search: '' }
public render() { public render() {

View File

@ -5,7 +5,7 @@ import AssetModel from '../models/AssetModel'
type AssetType = 'dataset' | 'algorithm' | 'container' | 'workflow' | 'other' type AssetType = 'dataset' | 'algorithm' | 'container' | 'workflow' | 'other'
interface IState { interface PublishState {
name?: string name?: string
dateCreated?: Date dateCreated?: Date
description?: string description?: string
@ -19,7 +19,7 @@ interface IState {
tags?: string[] tags?: string[]
} }
class Publish extends Component<{}, IState> { class Publish extends Component<{}, PublishState> {
public state = { public state = {
name: '', name: '',
dateCreated: new Date(), dateCreated: new Date(),
@ -281,6 +281,7 @@ class Publish extends Component<{}, IState> {
AssetModel.additionalInformation AssetModel.additionalInformation
) )
} }
const ddo = await this.context.ocean.registerAsset(newAsset, account[0]) const ddo = await this.context.ocean.registerAsset(newAsset, account[0])
} }
} }

View File

@ -3,16 +3,16 @@ import React, { Component } from 'react'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { provideOcean } from '../ocean' import { provideOcean } from '../ocean'
interface IState { interface SearchState {
results: any[] results: any[]
} }
interface IProps { interface SearchProps {
location: any location: any
history: any history: any
} }
class Search extends Component<IProps, IState> { class Search extends Component<SearchProps, SearchState> {
public state = { results: [] } public state = { results: [] }
public async componentDidMount() { public async componentDidMount() {

View File

@ -1,9 +0,0 @@
{
"defaultSeverity": "error",
"jsRules": {},
"rules": {
"object-literal-sort-keys": false,
"semicolon": [true, "never"]
},
"rulesDirectory": []
}