Skip to content

Conversation

@timagixe
Copy link
Contributor

@timagixe timagixe commented Sep 4, 2022

Changes

Checklist

  • Read the contribution guide and accept the
    code of conduct
  • Readme - not needed
  • Tests - not needed

@vercel
Copy link

vercel bot commented Sep 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
website ✅ Ready (Inspect) Visit Preview Sep 5, 2022 at 10:17AM (UTC)

@github-actions
Copy link

github-actions bot commented Sep 4, 2022

Cat Gif

Copy link
Member

@webbertakken webbertakken left a comment

Choose a reason for hiding this comment

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

This will check all files instead of only staged files.

Ideally precommit checks are blazing fast.

How long does the typecheck take for all files? This change is in the right direction, however, if it takes longer than a second or two we should probably create a follow-up to make it process staged files only.

@timagixe
Copy link
Contributor Author

timagixe commented Sep 5, 2022

@webbertakken

It takes 7.56s for me to complete full project typecheck.

% yarn typecheck                
yarn run v1.22.19
$ tsc
✨  Done in 7.49s.

We can consider using this small wrapper (tsc-files) around tsc that helps run tsc on staged files without ignoring tsconfig.json. Let me know what do you think of it.

@webbertakken
Copy link
Member

@timagixe I think that would be the most elegant solution indeed, short of removing the whole hook entirely.

If you're able to get that to work with lefthook that would be amazing.

If lefthook is causing trouble somehow, know that I'm also planning to move our repos back to lint-staged and husky since their cross platform support now properly works again.

@timagixe
Copy link
Contributor Author

timagixe commented Sep 5, 2022

@webbertakken I have set up tsc-files, please take a look when you have a chance.

@webbertakken webbertakken merged commit 7b32af2 into game-ci:main Sep 5, 2022
@webbertakken
Copy link
Member

Thank you very much @timagixe

@timagixe
Copy link
Contributor Author

timagixe commented Sep 5, 2022

My pleasure @webbertakken 🙌

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.

Fix getting-started.tsx type check

2 participants