Skip to content

Improve strictness + add CI through GitHub Actions #51

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

voxpelli
Copy link

This PR contains a couple of changes to make the TS setup more strict + some other minor things:

  • Turned up the strictness settings of TypeScript a notch + updated to a slightly newer TypeScript:
  • Moves the type checks into the lint script + adds a type check for the tests.
    • Uses npm-run-all2 to break the lint scripts into individual parts + to run them in parallel
    • Also uses npm-run-all2 to break apart the build script and make it clearer
  • Adds in type-coverage to the lint checks, sets a target for 95% strictness. All any and as are considered to not be strictly typed. Hence replaced most any with unknown to signify that we in fact do not know the type (unknown) rather than opting out of the typing (any).
  • Removes the .vscode/settings.json (sorry for this additional change!) as I for a long time was confused why no dist/ appeared in my VSCode. Those files are better kept locally and ignored through .gitignore (though I didn't add such an ignore now)
  • Adds in a GitHub Actions workflow with two jobs: test and lint
    • The test runs npm test on Node.js 14, 16, 18 and 19
    • The lint runs npm run lint on the latest Node.js LTS (no need to run linting across multiple different versions)
  • Updates the package-lock.json to lockfileVersion: 2 as this happens automatically when one uses the latest npm and there is no need to use anything but the latest npm nowadays

That's it, I hope I didn't touch on too many things for your liking and/or that I missed explaining any of my changes.

@Rendez Rendez mentioned this pull request Apr 20, 2023
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.

1 participant