Skip to content

Commit

Permalink
Merge pull request #1623 from skaut/frontend-strict-tsconfig-with-ski…
Browse files Browse the repository at this point in the history
…pLibCheck

[frontend] Stricter tsconfig (with skipLibCheck)
  • Loading branch information
marekdedic authored Sep 13, 2024
2 parents febb1fe + a423e19 commit a185ef2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
5 changes: 3 additions & 2 deletions packages/frontend/__tests__/components/IssuesList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ describe("IssuesList component", () => {
<MemoryRouter>
<IssuesList
issues={project.issues.map((issue) => ({
...issue,
link: undefined,
description: issue.description,
number: issue.number,
title: issue.title,
}))}
project={project}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/Issue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Issue = ({
subtitle={issue.project.name}
subtitleDescription={issue.project["short-description"]}
subtitleLink={getProjectLink(issue.project)}
tags={!hideTags ? issue.project.tags : []}
tags={!hideTags ? (issue.project.tags ?? []) : []}
title={issue.title}
/>
);
2 changes: 1 addition & 1 deletion packages/frontend/src/components/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const Project = ({
<ArticleBox
description={project.info.description}
link={getProjectLink(project)}
tags={project.info.tags}
tags={project.info.tags ?? []}
title={project.info.name}
/>
);
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/IssueDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export const IssueDetail = ({
);
const projectIssues = getIssuesWithProjectInfo(data, {
omitIssueNumber: issue?.number,
owner: projectOwner,
repo: projectRepo,
...(projectOwner !== undefined && { owner: projectOwner }),
...(projectRepo !== undefined && { repo: projectRepo }),
});

if (!issue) {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/utils/getAllIssues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface ProjectIssueWithProjectInfo extends ProjectIssue {
}

interface Query extends Partial<Project> {
omitIssueNumber?: number;
omitIssueNumber: number | undefined;
}

export const getIssuesWithProjectInfo = (
Expand Down
18 changes: 13 additions & 5 deletions packages/frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
{
"compilerOptions": {
"module": "es2020",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"target": "es5",
"jsx": "react-jsx",
"forceConsistentCasingInFileNames": true,
"jsx": "react-jsx",
"module": "es2020",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5",

"skipLibCheck": true,

"allowUnreachableCode": false,
"allowUnusedLabels": false,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"sourceMap": true,
"strict": true
}
}

0 comments on commit a185ef2

Please sign in to comment.