bump to react-scripts v3.3

* allows to bump all eslint packages too
* fix new lint errors
This commit is contained in:
Matthias Kretschmann 2019-12-13 12:06:40 +01:00
parent b9f83021c7
commit 9cbedb8f87
Signed by: m
GPG Key ID: 606EEEF3C479A91F
16 changed files with 5663 additions and 3957 deletions

7617
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,9 +24,10 @@
"ethereum-blockies": "github:MyEtherWallet/blockies",
"filesize": "^6.0.1",
"history": "^4.10.1",
"ipfs-http-client": "^39.0.2",
"ipfs-http-client": "^40.1.0",
"is-url-superb": "^3.0.0",
"moment": "^2.24.0",
"node-sass": "^4.13.0",
"query-string": "^6.9.0",
"react": "^16.12.0",
"react-collapsed": "^2.2.3",
@ -38,9 +39,9 @@
"react-helmet": "^5.2.1",
"react-markdown": "^4.2.2",
"react-modal": "^3.11.1",
"react-moment": "^0.9.6",
"react-moment": "^0.9.7",
"react-paginate": "^6.3.2",
"react-popper": "^1.3.6",
"react-popper": "^1.3.7",
"react-router-dom": "^5.1.2",
"react-transition-group": "^4.3.0",
"shortid": "^2.2.15",
@ -49,25 +50,21 @@
"devDependencies": {
"@react-mock/state": "^0.1.8",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/react": "^9.3.3",
"@types/classnames": "^2.2.9",
"@types/is-url": "^1.2.28",
"@types/jest": "^24.0.23",
"@types/react": "^16.9.15",
"@types/react": "^16.9.16",
"@types/react-datepicker": "^2.9.5",
"@types/react-dom": "^16.9.4",
"@types/react-helmet": "^5.0.14",
"@types/react-modal": "^3.10.0",
"@types/react-modal": "^3.10.1",
"@types/react-paginate": "^6.2.1",
"@types/react-router-dom": "^5.1.3",
"@types/react-transition-group": "^4.2.3",
"@types/shortid": "^0.0.29",
"@typescript-eslint/eslint-plugin": "^1.6.0",
"@typescript-eslint/parser": "^1.6.0",
"eslint": "^5.16.0",
"jest-mock-axios": "^3.1.2",
"node-sass": "^4.13.0",
"react-scripts": "3.0.1",
"jest-mock-axios": "^3.2.0",
"react-scripts": "^3.3.0",
"source-map-explorer": "^2.1.2",
"typescript": "^3.7.3"
},

View File

@ -56,7 +56,7 @@ export default class Input extends PureComponent<InputProps, InputState> {
}
}
public toggleFocus = () => {
public handleFocus = () => {
this.setState({ isFocused: !this.state.isFocused })
}
@ -94,8 +94,8 @@ export default class Input extends PureComponent<InputProps, InputState> {
className={styles.select}
name={name}
required={required}
onFocus={this.toggleFocus}
onBlur={this.toggleFocus}
onFocus={this.handleFocus}
onBlur={this.handleFocus}
onChange={onChange}
value={value}
>
@ -117,8 +117,8 @@ export default class Input extends PureComponent<InputProps, InputState> {
<textarea
id={name}
className={styles.input}
onFocus={this.toggleFocus}
onBlur={this.toggleFocus}
onFocus={this.handleFocus}
onBlur={this.handleFocus}
{...this.props}
/>
</div>
@ -154,8 +154,8 @@ export default class Input extends PureComponent<InputProps, InputState> {
selected={this.state.dateCreated}
onChange={this.handleDateChange}
className={styles.input}
onFocus={this.toggleFocus}
onBlur={this.toggleFocus}
onFocus={this.handleFocus}
onBlur={this.handleFocus}
id={name}
name={name}
/>
@ -170,8 +170,8 @@ export default class Input extends PureComponent<InputProps, InputState> {
id={name}
type={type || 'text'}
className={styles.input}
onFocus={this.toggleFocus}
onBlur={this.toggleFocus}
onFocus={this.handleFocus}
onBlur={this.handleFocus}
{...this.props}
/>
{group}
@ -181,8 +181,8 @@ export default class Input extends PureComponent<InputProps, InputState> {
id={name}
type={type || 'text'}
className={styles.input}
onFocus={this.toggleFocus}
onBlur={this.toggleFocus}
onFocus={this.handleFocus}
onBlur={this.handleFocus}
{...this.props}
/>
)}

View File

@ -8,7 +8,7 @@ const Modal = ({
title,
description,
isOpen,
toggleModal,
onToggleModal,
children,
onAfterOpen,
onRequestClose,
@ -17,7 +17,7 @@ const Modal = ({
title: string
description?: string
isOpen: boolean
toggleModal: () => void
onToggleModal: () => void
children: any
onAfterOpen?: () => void
onRequestClose?: () => void
@ -34,7 +34,7 @@ const Modal = ({
>
<button
className={styles.close}
onClick={toggleModal}
onClick={onToggleModal}
data-testid="closeModal"
>
&times;

View File

@ -18,36 +18,32 @@ export default class Popover extends PureComponent<{
ref={this.props.forwardedRef}
style={this.props.style}
>
{
<>
<div className={styles.popoverInfoline}>
<Account />
</div>
{account && balance && (
<div className={styles.popoverInfoline}>
<span
className={styles.balance}
title={(balance.eth / 1e18).toFixed(10)}
>
<strong>
{(balance.eth / 1e18).toFixed(3).slice(0, -1)}
</strong>{' '}
ETH
</span>
<span className={styles.balance}>
<strong>{balance.ocn}</strong> OCEAN
</span>
</div>
)}
<Market.Consumer>
{market => (
<div className={styles.popoverInfoline}>
<Account />
</div>
{account && balance && (
<div className={styles.popoverInfoline}>
<span
className={styles.balance}
title={(balance.eth / 1e18).toFixed(10)}
>
<strong>
{(balance.eth / 1e18)
.toFixed(3)
.slice(0, -1)}
</strong>{' '}
ETH
</span>
<span className={styles.balance}>
<strong>{balance.ocn}</strong> OCEAN
</span>
</div>
)}
<Market.Consumer>
{market => (
<div className={styles.popoverInfoline}>
{network && !market.networkMatch
? `Please connect to Custom RPC
{network && !market.networkMatch
? `Please connect to Custom RPC
${
market.network === 'Pacific'
? 'https://pacific.oceanprotocol.com'
@ -57,13 +53,10 @@ export default class Popover extends PureComponent<{
? 'https://duero.dev-ocean.com'
: 'http://localhost:8545'
}`
: network &&
`Connected to ${network} network`}
</div>
)}
</Market.Consumer>
</>
}
: network && `Connected to ${network} network`}
</div>
)}
</Market.Consumer>
</div>
)
}

View File

@ -90,7 +90,7 @@ export default class WalletSelector extends PureComponent<
title={content.title}
description={content.description}
isOpen={this.state.isModalOpen}
toggleModal={this.handleToggleModal}
onToggleModal={this.handleToggleModal}
>
<div className={styles.info}>
{content.buttons.map(({ title, description, icon }) => (

View File

@ -36,13 +36,13 @@ export default class Report extends PureComponent<
this.signal.cancel()
}
private inputChange = (event: ChangeEvent<HTMLInputElement>) => {
private handleInputChange = (event: ChangeEvent<HTMLInputElement>) => {
this.setState({
comment: event.target.value
})
}
private toggleModal = () => {
private handleToggleModal = () => {
this.setState({ isModalOpen: !this.state.isModalOpen })
this.state.isModalOpen && this.reset()
}
@ -100,7 +100,7 @@ export default class Report extends PureComponent<
<Button
link
className={styles.openLink}
onClick={this.toggleModal}
onClick={this.handleToggleModal}
>
Report Data Set
</Button>
@ -108,7 +108,7 @@ export default class Report extends PureComponent<
title="Report Data Set"
description="Found some faulty metadata, wrongly attributed data, or anything else wrong with this data set? Tell us about it and we will take a look."
isOpen={this.state.isModalOpen}
toggleModal={this.toggleModal}
onToggleModal={this.handleToggleModal}
>
<div className={styles.info}>
<h3>{this.props.title}</h3>
@ -135,7 +135,7 @@ export default class Report extends PureComponent<
help="Briefly describe what is wrong with this asset. If you want to get contacted by us, add your email at the end."
required
value={this.state.comment}
onChange={this.inputChange}
onChange={this.handleInputChange}
rows={1}
/>
<Button

View File

@ -73,13 +73,16 @@ export default class Channel extends PureComponent<ChannelProps, ChannelState> {
}
}
private handlePageClick = async (data: { selected: number }) => {
private onPageClick = async (data: { selected: number }) => {
// react-pagination starts counting at 0, we start at 1
const toPage = data.selected + 1
this.props.history.push({ search: `?page=${toPage}` })
await this.setState({ currentPage: toPage, isLoading: true })
this.setState({
currentPage: toPage,
isLoading: true
})
await this.getChannelAssets()
}
@ -105,7 +108,7 @@ export default class Channel extends PureComponent<ChannelProps, ChannelState> {
<Pagination
totalPages={totalPages}
currentPage={currentPage}
handlePageClick={this.handlePageClick}
handlePageClick={this.onPageClick}
/>
</Content>
</Route>

View File

@ -16,7 +16,7 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
search: ''
}
private inputChange = (event: ChangeEvent<HTMLInputElement>) => {
private handleInputChange = (event: ChangeEvent<HTMLInputElement>) => {
this.setState({
search: event.target.value
})
@ -38,7 +38,7 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
label="Search for data sets"
placeholder="e.g. shapes of plants"
value={search}
onChange={this.inputChange}
onChange={this.handleInputChange}
group={
<Button primary disabled={!search}>
Search

View File

@ -45,7 +45,7 @@ export default class ItemForm extends PureComponent<
this.props.addFile(url)
}
private onChangeUrl = (e: React.FormEvent<HTMLInputElement>) => {
private handleChangeUrl = (e: React.FormEvent<HTMLInputElement>) => {
this.setState({ url: e.currentTarget.value })
this.clearErrors()
}
@ -67,7 +67,7 @@ export default class ItemForm extends PureComponent<
type="url"
placeholder={this.props.placeholder}
value={url}
onChange={this.onChangeUrl}
onChange={this.handleChangeUrl}
help="Supported protocols are http(s):// and ipfs://"
/>

View File

@ -256,7 +256,7 @@ class Publish extends Component<{}, PublishState> {
}
}
private registerAsset = async (event: FormEvent<HTMLFormElement>) => {
private handleRegisterAsset = async (event: FormEvent<HTMLFormElement>) => {
event.preventDefault()
ReactGA.event({ category: 'Publish', action: 'registerAsset-start' })
@ -348,7 +348,7 @@ class Publish extends Component<{}, PublishState> {
currentStep={this.state.currentStep}
/>
<Form onSubmit={this.registerAsset}>
<Form onSubmit={this.handleRegisterAsset}>
{steps.map((step: any, index: number) => (
<Step
key={index}

View File

@ -97,7 +97,7 @@ class Search extends PureComponent<SearchProps, SearchState> {
}
}
private handlePageClick = async (data: { selected: number }) => {
private onPageClick = async (data: { selected: number }) => {
// react-pagination starts counting at 0, we start at 1
const toPage = data.selected + 1
@ -106,7 +106,7 @@ class Search extends PureComponent<SearchProps, SearchState> {
search: `?text=${this.state.searchTerm}&page=${toPage}`
})
await this.setState({ currentPage: toPage, isLoading: true })
this.setState({ currentPage: toPage, isLoading: true })
await this.searchAssets()
}
@ -140,7 +140,7 @@ class Search extends PureComponent<SearchProps, SearchState> {
<Pagination
totalPages={totalPages}
currentPage={currentPage}
handlePageClick={this.handlePageClick}
handlePageClick={this.onPageClick}
/>
</Content>
</Route>

1820
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -25,15 +25,15 @@
"dependencies": {},
"devDependencies": {
"@release-it/bumper": "^1.0.5",
"@typescript-eslint/eslint-plugin": "^1.6.0",
"@typescript-eslint/parser": "^1.6.0",
"@typescript-eslint/eslint-plugin": "^2.11.0",
"@typescript-eslint/parser": "^2.11.0",
"auto-changelog": "^1.16.2",
"concurrently": "^5.0.0",
"cypress": "^3.7.0",
"concurrently": "^5.0.1",
"cypress": "^3.8.0",
"cypress-log-to-output": "^1.0.7",
"eslint": "^5.16.0",
"eslint-config-oceanprotocol": "^1.4.0",
"eslint-config-prettier": "^6.5.0",
"eslint": "^6.7.2",
"eslint-config-oceanprotocol": "^1.5.0",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-cypress": "^2.7.0",
"eslint-plugin-prettier": "^3.1.1",
"prettier": "^1.19.1",

View File

@ -538,9 +538,9 @@
}
},
"@types/node": {
"version": "12.12.14",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz",
"integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA=="
"version": "12.12.17",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz",
"integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA=="
},
"@types/range-parser": {
"version": "1.2.3",
@ -4271,9 +4271,9 @@
}
},
"nodemon": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.1.tgz",
"integrity": "sha512-UC6FVhNLXjbbV4UzaXA3wUdbEkUZzLGgMGzmxvWAex5nzib/jhcSHVFlQODdbuUHq8SnnZ4/EABBAbC3RplvPg==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.2.tgz",
"integrity": "sha512-GWhYPMfde2+M0FsHnggIHXTqPDHXia32HRhh6H0d75Mt9FKUoCBvumNHr7LdrpPBTKxsWmIEOjoN+P4IU6Hcaw==",
"dev": true,
"requires": {
"chokidar": "^3.2.2",

View File

@ -30,11 +30,11 @@
"@types/express": "^4.17.2",
"@types/jest": "^24.0.23",
"@types/morgan": "^1.7.37",
"@types/node": "^12.12.14",
"@types/node": "^12.12.17",
"@types/request": "^2.48.3",
"@types/supertest": "^2.0.8",
"jest": "^24.9.0",
"nodemon": "^2.0.1",
"nodemon": "^2.0.2",
"supertest": "^4.0.2",
"ts-jest": "^24.2.0",
"ts-node": "^8.5.4",