-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add Typescript #117
Add Typescript #117
Conversation
7d09c7f
to
ca94285
Compare
@neozenith I started this PR in the dev sprint yesterday at /NEW. Are you the best person to talk to about it? I'm not sure what's the best way to finish it off - fix all the typescript errors, or leave it with typescript errors (ensuring that they're ignored so it still builds successfully) - so that'll be a good task for another collaborator to dive into? |
@adam1658 thanks for putting this together. Just on my phone at the moment. I should get onto my laptop and try the CodeSpaces to check this still builds. At the moment I’d lean towards Option 1 that you mentioned. But… I’d like to better understand what the outstanding errors are. Would the errors block it being able to be built and functionally run the website? If they wouldn’t functionally block the website being built then Option 2 is viable and we could land this to keep the scope smaller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly; thanks very much for your contribution!
A few nits in comments ❤️
Just checked this out in code spaces... Definitely want to pursue Option 1 as the type errors are breaking the build. There is no new build output emitted whilst it is broken. If you could also change
|
Hi @neozenith, To get a successful build you'll need to modify webpack.config.js to set ts-loader to transpile only. Update it as follows: - use: ["ts-loader"],
+ use: [
+ {
+ loader: "ts-loader",
+ options: {
+ transpileOnly: true,
+ },
+ },
+ ], The typescript errors can be summarised as follows:
I'm very happy to fix these - I just thought it would be a great opportunity for a newer collaborator to fix some issues that tsc helpfully points out. I'll have prettier ignore |
@adam1658 yeah ok. If you could change the tsconfig that’d be great. Also the was a second sneaky change in the |
Thanks @neozenith, I've set up ts-loader to |
Awesome I’ll review and merge this later tonight. (Or if someone else with review permissions wants to they can). We can take it out of Draft at this point too I guess. and I capture the scope of the open typescript issues in #119 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed. Looks good. Just needs to resolve conflicts with main
. So merge main
into this branch but accept your changes and ignore conflicts main
induces.
I would have done this myself but I don't have permissions to edit back to your fork/branch.
* WIP: Add Typescript * Fix webpace resolve extensions * Lexicographically sort type attributes * Prettier: ignore dist/ * Fix .prettierignore community-data.ts * Set ts-loader to traspileOnly to allow builds with TS errors * Update readme with message about typescript * Run fetchEvents
Fixes #88.
Some typescript errors remain. I see two paths forward now:
Option 1:
Option 2:
I leave the TS errors unfixed, providing low hanging fruit for other contributors. I'd open an issue for 'fixing typescript errors and adding typechecking to github actions'. I'd also need to configure webpack to allow build while typescript errors still exist.