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

TypeScript, xo for linting, ava for testing #74

Merged
merged 43 commits into from
Feb 8, 2021
Merged

Conversation

osdiab
Copy link
Contributor

@osdiab osdiab commented Feb 5, 2021

  • move preact code to subpackage, monorepo structure using yarn workspaces
  • switch to typescript, type everything
    • follow up: validate input arguments into publicly exposed functions
  • xo for linting
  • ava for testing
    • todo: it's failing due to transpilation issues - fixed by pinning preact-cli version
  • todo: build script should copy built files in subpackage docs directory to root

Current challenge: HTMLWebpackPlugin seems to not work, maybe because I upgraded preact-cli. it looks like there are two HTML webpack plugin instances so how we override appears to be broken. Not totally sure how to debug (cc @jake-nz ), related #75 , will try to revert the preact-cli bump

once that works then can do more thorough testing

closes #11
closes #17
part of #16

@vercel
Copy link

vercel bot commented Feb 5, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/p22/every-month/i2832fdtj
✅ Preview: https://every-month-git-osdiab-migrate-typescript.p22.vercel.app

Copy link
Contributor

@jake-nz jake-nz left a comment

Choose a reason for hiding this comment

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

Awesome! So good to get these things set up :)

@osdiab osdiab changed the title WIP: TypeScript, xo for linting, ava for testing TypeScript, xo for linting, ava for testing Feb 8, 2021
@osdiab
Copy link
Contributor Author

osdiab commented Feb 8, 2021

a lot of follow ups from this now that i've thoroughly spelunked the code, to improve its stability!

@osdiab
Copy link
Contributor Author

osdiab commented Feb 8, 2021

tests still failing, ill figure it out in a later PR

@osdiab
Copy link
Contributor Author

osdiab commented Feb 8, 2021

seems it thinks the docs needs updating since the preact config now results in my local directories being included in the sourcemap paths. that's odd

@osdiab
Copy link
Contributor Author

osdiab commented Feb 8, 2021

im just gonna land this for now since it's a net benefit, and deal with the script issues after

@osdiab osdiab merged commit 89ff736 into main Feb 8, 2021
@osdiab osdiab deleted the osdiab/migrate-typescript branch February 8, 2021 09:29
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.

Linting Switch to TypeScript?
2 participants