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",
{ "multiline": { "delimiter": "none" } }
]
},
"env": {
"jest": true
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,7 @@ import AssetModel from '../models/AssetModel'
type AssetType = 'dataset' | 'algorithm' | 'container' | 'workflow' | 'other'
interface IState {
interface PublishState {
name?: string
dateCreated?: Date
description?: string
@ -19,7 +19,7 @@ interface IState {
tags?: string[]
}
class Publish extends Component<{}, IState> {
class Publish extends Component<{}, PublishState> {
public state = {
name: '',
dateCreated: new Date(),
@ -281,6 +281,7 @@ class Publish extends Component<{}, IState> {
AssetModel.additionalInformation
)
}
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 { provideOcean } from '../ocean'
interface IState {
interface SearchState {
results: any[]
}
interface IProps {
interface SearchProps {
location: any
history: any
}
class Search extends Component<IProps, IState> {
class Search extends Component<SearchProps, SearchState> {
public state = { results: [] }
public async componentDidMount() {

View File

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