twitter-lite icon indicating copy to clipboard operation
twitter-lite copied to clipboard

refactor(types): add tests and linting

Open fdebijl opened this issue 4 years ago • 2 comments

This PR adds some much needed quality control to the types by adding tests, a linter and automatic checks on each PR.

Full changelog:

  • Move index.d.ts to 'types' directory
  • Move tsconfig.json to 'types' directory
  • Add dtslint as a devdependency
  • Add test.ts This file contains code that is not meant to be ran, but is used by dtslint to check for any errors in the types
  • Add tslint.json to 'types' directory
  • Add checks.yml to github actions directory This runs the tests, lint and dtslint on any pull request
  • Fix redundant jsdoc comments in index.d.ts
  • Fix extra whitespace in index.d.ts
  • Fix redundant public statements in index.d.ts
  • Add export statements in index.d.ts. There were implicit before but are now explicitly added for clarity.

fdebijl avatar Feb 10 '21 18:02 fdebijl

:100: this is great! once these tests pass I'll merge this in :)

peterpme avatar Feb 10 '21 18:02 peterpme

@peterpme I should note that some of the problems in the typings are already adressed by other PR's, such as https://github.com/draftbit/twitter-lite/pull/113 and https://github.com/draftbit/twitter-lite/pull/139. If those are tested and merged first there should be no more errors with the types.

Edit: I can confirm https://github.com/draftbit/twitter-lite/pull/105 also fixes the issue mentioned in that PR

fdebijl avatar Feb 10 '21 18:02 fdebijl

Closing this for now to keep my PR overview clean, feel free to re-open once this package is being worked on again 👌

fdebijl avatar Nov 14 '22 16:11 fdebijl