Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Commit

Permalink
feat: upgraded typescript to 3.6.3 (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmkn authored and juanpicado committed Oct 2, 2019
1 parent 74576bd commit f8a1f2c
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 137 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Expand Up @@ -21,6 +21,7 @@
"version": "detect"
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Expand Up @@ -5,5 +5,6 @@
"javascriptreact",
"typescript",
"typescriptreact"
]
],
"typescript.tsdk": "node_modules/typescript/lib"
}
9 changes: 5 additions & 4 deletions package.json
Expand Up @@ -27,6 +27,7 @@
"@types/react-dom": "16.9.0",
"@types/react-router-dom": "4.3.5",
"@types/validator": "10.11.3",
"@typescript-eslint/parser": "2.3.2",
"@verdaccio/babel-preset": "2.0.0",
"@verdaccio/eslint-config": "2.0.0",
"@verdaccio/types": "8.1.0",
Expand All @@ -37,14 +38,14 @@
"codecov": "3.6.1",
"concurrently": "4.1.2",
"cross-env": "6.0.0",
"detect-secrets": "1.0.4",
"css-loader": "3.2.0",
"date-fns": "1.30.1",
"detect-secrets": "1.0.4",
"emotion": "9.2.12",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.14.0",
"enzyme-to-json": "3.4.0",
"eslint": "5.16.0",
"eslint": "6.5.1",
"eslint-plugin-codeceptjs": "1.1.0",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "3.1.0",
Expand All @@ -68,8 +69,8 @@
"js-base64": "2.5.1",
"js-yaml": "3.13.1",
"lint-staged": "8.2.1",
"lockfile-lint": "2.0.1",
"localstorage-memory": "1.0.3",
"lockfile-lint": "2.0.1",
"mini-css-extract-plugin": "0.8.0",
"node-mocks-http": "1.8.0",
"normalize.css": "8.0.1",
Expand Down Expand Up @@ -97,7 +98,7 @@
"stylelint-webpack-plugin": "0.10.5",
"supertest": "4.0.2",
"typeface-roboto": "0.0.75",
"typescript": "3.5.3",
"typescript": "3.6.3",
"uglifyjs-webpack-plugin": "2.2.0",
"url-loader": "2.1.0",
"validator": "11.1.0",
Expand Down
10 changes: 5 additions & 5 deletions src/components/NotFound/NotFound.tsx
@@ -1,18 +1,17 @@
import ListItem from '@material-ui/core/ListItem';
import Typography from '@material-ui/core/Typography';
import withWidth, { isWidthUp } from '@material-ui/core/withWidth';
import withWidth, { isWidthUp, WithWidthProps } from '@material-ui/core/withWidth';
import React, { useCallback } from 'react';
import { RouteComponentProps, withRouter } from 'react-router-dom';

import PackageImg from './img/package.svg';
import { Card, EmptyPackage, Heading, Inner, List, Wrapper } from './styles';
import { Breakpoint } from '@material-ui/core/styles/createBreakpoints';

export const NOT_FOUND_TEXT = `Sorry, we couldn't find it...`;
export const LABEL_NOT_FOUND = `The page you're looking for doesn't exist.`;
export const LABEL_FOOTER_NOT_FOUND = 'Perhaps these links will help find what you are looking for:';

export type NotFoundProps = RouteComponentProps & { width: Breakpoint; history };
export type NotFoundProps = RouteComponentProps & WithWidthProps;

const HOME_LABEL = 'Home';

Expand All @@ -36,11 +35,12 @@ const NotFound: React.FC<NotFoundProps> = ({ history, width }) => {
</List>
);

/* eslint-disable @typescript-eslint/no-non-null-assertion */
return (
<Wrapper data-testid="404">
<Inner>
<EmptyPackage alt="404 - Page not found" src={PackageImg} />
<Heading className="not-found-text" variant={isWidthUp('sm', width) ? 'h2' : 'h4'}>
<Heading className="not-found-text" variant={isWidthUp('sm', width!) ? 'h2' : 'h4'}>
{NOT_FOUND_TEXT}
</Heading>
{renderSubTitle()}
Expand All @@ -50,4 +50,4 @@ const NotFound: React.FC<NotFoundProps> = ({ history, width }) => {
);
};

export default withRouter(withWidth()(NotFound));
export default withRouter<NotFoundProps, React.ComponentType<NotFoundProps>>(withWidth()(NotFound));
6 changes: 1 addition & 5 deletions src/components/Search/Search.tsx
Expand Up @@ -17,10 +17,6 @@ export interface State {
loaded: boolean;
error: boolean;
}
interface AbortControllerInterface {
signal: () => void;
abort: () => void;
}

export type cancelAllSearchRequests = () => void;
export type handlePackagesClearRequested = () => void;
Expand Down Expand Up @@ -169,7 +165,7 @@ export class Search extends Component<RouteComponentProps<{}>, State> {
}
};

private requestList: AbortControllerInterface[];
private requestList: AbortController[];

public getAdorment(): JSX.Element {
return (
Expand Down

0 comments on commit f8a1f2c

Please sign in to comment.