1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

run type checking as part of linting

This commit is contained in:
Matthias Kretschmann 2020-09-24 13:33:33 +02:00
parent 80aadeffea
commit ef00160f65
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 4 additions and 29 deletions

View File

@ -11,7 +11,7 @@
"jest": "NODE_ENV=test jest -c tests/unit/jest.config.js",
"test": "npm run lint && npm run jest",
"test:watch": "npm run lint && npm run jest -- --watch",
"lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx .",
"lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx . && npm run type-check",
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json}' --write",
"type-check": "tsc --noEmit",
"analyze": "npm run build && source-map-explorer 'public/*.js'",

View File

@ -1,25 +0,0 @@
import React, { ReactElement } from 'react'
import Eye from '../../../images/eye.svg'
import Button from '../Button'
import Tooltip from '../Tooltip'
import { ComputeItem } from '@oceanprotocol/react'
export declare type ActionsCellProps = {
handleOnClickViewJobDetails?: (computeItem: ComputeItem) => void
}
export default function ActionsCell({
handleOnClickViewJobDetails
}: ActionsCellProps): ReactElement {
return (
<>
{handleOnClickViewJobDetails && (
<Tooltip content="View job details">
<Button onClick={handleOnClickViewJobDetails}>
<Eye />
</Button>
</Tooltip>
)}
</>
)
}

View File

@ -13,9 +13,9 @@ const reactMock = {
return {
ocean: libMock.ocean,
config: {},
web3: null,
web3Modal: null,
web3Provider: null,
web3: null as any,
web3Modal: null as any,
web3Provider: null as any,
accountId: '0x0000000011111111aaaaaaaabbbbbbbb22222222',
balance: '0.12'
}