Skip to content

Commit f8a1f2c

Browse files
tmknjuanpicado
authored andcommitted
feat: upgraded typescript to 3.6.3 (conventional-changelog#145)
1 parent 74576bd commit f8a1f2c

File tree

6 files changed

+201
-137
lines changed

6 files changed

+201
-137
lines changed

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"version": "detect"
2222
}
2323
},
24+
"parser": "@typescript-eslint/parser",
2425
"parserOptions": {
2526
"ecmaFeatures": {
2627
"jsx": true

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"javascriptreact",
66
"typescript",
77
"typescriptreact"
8-
]
8+
],
9+
"typescript.tsdk": "node_modules/typescript/lib"
910
}

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@types/react-dom": "16.9.0",
2828
"@types/react-router-dom": "4.3.5",
2929
"@types/validator": "10.11.3",
30+
"@typescript-eslint/parser": "2.3.2",
3031
"@verdaccio/babel-preset": "2.0.0",
3132
"@verdaccio/eslint-config": "2.0.0",
3233
"@verdaccio/types": "8.1.0",
@@ -37,14 +38,14 @@
3738
"codecov": "3.6.1",
3839
"concurrently": "4.1.2",
3940
"cross-env": "6.0.0",
40-
"detect-secrets": "1.0.4",
4141
"css-loader": "3.2.0",
4242
"date-fns": "1.30.1",
43+
"detect-secrets": "1.0.4",
4344
"emotion": "9.2.12",
4445
"enzyme": "3.10.0",
4546
"enzyme-adapter-react-16": "1.14.0",
4647
"enzyme-to-json": "3.4.0",
47-
"eslint": "5.16.0",
48+
"eslint": "6.5.1",
4849
"eslint-plugin-codeceptjs": "1.1.0",
4950
"eslint-plugin-jsx-a11y": "6.2.3",
5051
"eslint-plugin-prettier": "3.1.0",
@@ -68,8 +69,8 @@
6869
"js-base64": "2.5.1",
6970
"js-yaml": "3.13.1",
7071
"lint-staged": "8.2.1",
71-
"lockfile-lint": "2.0.1",
7272
"localstorage-memory": "1.0.3",
73+
"lockfile-lint": "2.0.1",
7374
"mini-css-extract-plugin": "0.8.0",
7475
"node-mocks-http": "1.8.0",
7576
"normalize.css": "8.0.1",
@@ -97,7 +98,7 @@
9798
"stylelint-webpack-plugin": "0.10.5",
9899
"supertest": "4.0.2",
99100
"typeface-roboto": "0.0.75",
100-
"typescript": "3.5.3",
101+
"typescript": "3.6.3",
101102
"uglifyjs-webpack-plugin": "2.2.0",
102103
"url-loader": "2.1.0",
103104
"validator": "11.1.0",

src/components/NotFound/NotFound.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import ListItem from '@material-ui/core/ListItem';
22
import Typography from '@material-ui/core/Typography';
3-
import withWidth, { isWidthUp } from '@material-ui/core/withWidth';
3+
import withWidth, { isWidthUp, WithWidthProps } from '@material-ui/core/withWidth';
44
import React, { useCallback } from 'react';
55
import { RouteComponentProps, withRouter } from 'react-router-dom';
66

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

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

15-
export type NotFoundProps = RouteComponentProps & { width: Breakpoint; history };
14+
export type NotFoundProps = RouteComponentProps & WithWidthProps;
1615

1716
const HOME_LABEL = 'Home';
1817

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

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

53-
export default withRouter(withWidth()(NotFound));
53+
export default withRouter<NotFoundProps, React.ComponentType<NotFoundProps>>(withWidth()(NotFound));

src/components/Search/Search.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ export interface State {
1717
loaded: boolean;
1818
error: boolean;
1919
}
20-
interface AbortControllerInterface {
21-
signal: () => void;
22-
abort: () => void;
23-
}
2420

2521
export type cancelAllSearchRequests = () => void;
2622
export type handlePackagesClearRequested = () => void;
@@ -169,7 +165,7 @@ export class Search extends Component<RouteComponentProps<{}>, State> {
169165
}
170166
};
171167

172-
private requestList: AbortControllerInterface[];
168+
private requestList: AbortController[];
173169

174170
public getAdorment(): JSX.Element {
175171
return (

0 commit comments

Comments
 (0)