diff --git a/packages/frontend/__tests__/components/IssuesList.test.tsx b/packages/frontend/__tests__/components/IssuesList.test.tsx index bf1f074f0..9056a1693 100644 --- a/packages/frontend/__tests__/components/IssuesList.test.tsx +++ b/packages/frontend/__tests__/components/IssuesList.test.tsx @@ -20,8 +20,9 @@ describe("IssuesList component", () => { ({ - ...issue, - link: undefined, + description: issue.description, + number: issue.number, + title: issue.title, }))} project={project} /> diff --git a/packages/frontend/src/components/Issue.tsx b/packages/frontend/src/components/Issue.tsx index e439458ad..a98364e7a 100644 --- a/packages/frontend/src/components/Issue.tsx +++ b/packages/frontend/src/components/Issue.tsx @@ -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} /> ); diff --git a/packages/frontend/src/components/Project.tsx b/packages/frontend/src/components/Project.tsx index 62c6279b4..8293ce897 100644 --- a/packages/frontend/src/components/Project.tsx +++ b/packages/frontend/src/components/Project.tsx @@ -13,7 +13,7 @@ export const Project = ({ ); diff --git a/packages/frontend/src/pages/IssueDetail.tsx b/packages/frontend/src/pages/IssueDetail.tsx index 319819fec..d401ed4b0 100644 --- a/packages/frontend/src/pages/IssueDetail.tsx +++ b/packages/frontend/src/pages/IssueDetail.tsx @@ -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) { diff --git a/packages/frontend/src/utils/getAllIssues.ts b/packages/frontend/src/utils/getAllIssues.ts index 2fe0bee37..79c11280f 100644 --- a/packages/frontend/src/utils/getAllIssues.ts +++ b/packages/frontend/src/utils/getAllIssues.ts @@ -8,7 +8,7 @@ export interface ProjectIssueWithProjectInfo extends ProjectIssue { } interface Query extends Partial { - omitIssueNumber?: number; + omitIssueNumber: number | undefined; } export const getIssuesWithProjectInfo = ( diff --git a/packages/frontend/tsconfig.json b/packages/frontend/tsconfig.json index cf3f657df..f708dc335 100644 --- a/packages/frontend/tsconfig.json +++ b/packages/frontend/tsconfig.json @@ -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 } }