Skip to content

Commit 727e417

Browse files
committed
Update to TypeScript 5.9
1 parent b70836c commit 727e417

8 files changed

Lines changed: 555 additions & 415 deletions

File tree

components/elements/AutocompleteSearch/AutocompleteSearch.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ const AutocompleteSearch: FC = () => {
7777
indexName="tools"
7878
searchFunction={handleSearch}>
7979
<div className="autocomplete-search">
80-
<Configure hitsPerPage={10} typoTolerance={true} />
80+
<Configure
81+
{...({ hitsPerPage: 10, typoTolerance: true } as any)}
82+
/>
8183
<SearchBox
8284
placeholder="Find analysis tools, formatters, linters.."
8385
onFocus={handleShowResults}

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

package-lock.json

Lines changed: 391 additions & 279 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@octokit/core": "^3.5.1",
1515
"@splidejs/react-splide": "^0.7.10",
1616
"@splidejs/splide-extension-video": "^0.8.0",
17-
"@types/react-dom": "^18.3.0",
1817
"algoliasearch": "^4.20.0",
1918
"cache-manager": "^4.1.0",
2019
"cache-manager-fs-hash": "^1.0.0",
@@ -46,7 +45,8 @@
4645
"@types/cache-manager-fs-hash": "^0.0.1",
4746
"@types/marked": "^4.0.2",
4847
"@types/node": "^17.0.16",
49-
"@types/react": "^18.3.3",
48+
"@types/react": "^18.3.24",
49+
"@types/react-dom": "^18.3.7",
5050
"@typescript-eslint/eslint-plugin": "^5.11.0",
5151
"@typescript-eslint/parser": "^5.11.0",
5252
"eslint": "^8.8.0",
@@ -56,7 +56,7 @@
5656
"pretty-quick": "^3.1.3",
5757
"ts-node": "^10.9.1",
5858
"tsconfig-paths": "^4.2.0",
59-
"typescript": "4.5.5"
59+
"typescript": "^5.9.2"
6060
},
6161
"husky": {
6262
"hooks": {

pages/faq/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { GetStaticProps } from 'next';
33
import { MainHead, Footer, Navbar, SingleFAQ } from '@components/core';
44
import { Card, Main, Panel, Wrapper } from '@components/layout';
55
import { SponsorSidebar } from '@components/sponsors';
6-
import { ArticlePreview, Faq } from 'utils/types';
6+
import type { ArticlePreview, Faq } from 'utils/types';
77
import { getArticlesPreviews } from 'utils-api/blog';
88
import { getFaq } from 'utils-api/faq';
99
import { PanelHeader } from '@components/elements';

pages/tag/[slug].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
5555

5656
// Capitalize the first letter of the tag
5757
let tagName = slug.charAt(0).toUpperCase() + slug.slice(1);
58-
if (tagData.name) {
58+
if ('name' in tagData && tagData.name) {
5959
// We can use a more descriptive name if it exists
6060
tagName = tagData.name;
6161
}

pages/tools/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import { getArticlesPreviews } from 'utils-api/blog';
2222
export const getServerSideProps: GetServerSideProps = async (ctx) => {
2323
const sponsors = await getSponsors();
2424
const articles = await getArticlesPreviews();
25-
const { data: languages } = await fetchLanguages();
26-
const { data: others } = await fetchOthers();
25+
const { data: languages = [] } = await fetchLanguages();
26+
const { data: others = [] } = await fetchOthers();
2727

2828
// Create a new QueryClient instance for each page request.
2929
// This ensures that data is not shared between users and requests.

0 commit comments

Comments
 (0)