Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix & elide typescript errors; error fail CI build #162

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

scally
Copy link
Collaborator

@scally scally commented Feb 24, 2025

For simple typescript errors I fixed them inline.

For more complicated ones I added a @ts-expect-error for us to go fix in a future PR so that we can get back to good as quickly as possible.

@@ -28,7 +28,7 @@
"./CHANGELOG.md"
],
"scripts": {
"build": "npm run build:clean && npm run generate && vite build",
"build": "npm run build:clean && npm run generate && npm run tsc && vite build",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This felt like the best place to insert the typecheck. Broken types won't break your local dev build while you're working but will break both CI and publish here. There's some room for efficiency to run tsc and vite in parallel here but didn't feel worth right now.

@@ -1,6 +1,7 @@
import { useTranslation } from 'react-i18next'

export function Head() {
// @ts-expect-error HACK missing translations
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@serikjensen Do you know if we can use Employee.DocumentSigner here or do we need to develop two sets of i18n files?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea what happened here if it was a rename that didn't get updated, but for some reason it points to a file that doesn't exist. it should be

const { t } = useTranslation('Company.DocumentList')

I have a fix for it included in this PR #159 (comment)

i'm good with you just adding the comment here and then rebasing that signature form PR and fixing it there

@@ -12,7 +12,7 @@
"module": "ESNext",
"moduleDetection": "force",
"allowJs": true,
"noEmit": false,
"noEmit": true,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't actually compile with tsc, just typecheck. vite runs our compilation step via esbuild, so we can save some time/duplication by just telling tsc not to emit files.

Copy link
Member

@serikjensen serikjensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! left comment about translation type error, it's already fixed in my signature form PR so i can just rebase that once this is merged

@@ -1,6 +1,7 @@
import { useTranslation } from 'react-i18next'

export function Head() {
// @ts-expect-error HACK missing translations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea what happened here if it was a rename that didn't get updated, but for some reason it points to a file that doesn't exist. it should be

const { t } = useTranslation('Company.DocumentList')

I have a fix for it included in this PR #159 (comment)

i'm good with you just adding the comment here and then rebasing that signature form PR and fixing it there

@scally scally merged commit 1e283b1 into main Feb 24, 2025
1 check passed
@scally scally deleted the scally/no-tsc-errors branch February 24, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants