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

fix: some types to accept both Snake and Camel case objects #173

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

awwit
Copy link
Contributor

@awwit awwit commented Apr 19, 2024

This Pull Request does not contain functional changes.

Fixed many type definitions to accept object keys in Snake and Camel notations. The types were reviewed and updated in accordance with the data models. Also, some important missing fields have been added such as purchase_option for order items.

[DRY] Converting Snake object keys to Camel notation has been moved to a separate utility type.

Additionally, eslint was configured for linting *.d.ts files. Also, a pre-commit git hook was configured to perform linting code and tests before creating a commit. This will help us avoid critical type errors in the future.

Bugs detected by eslint, such as unused variables and arguments, have been fixed. This was necessary for the linter to report new problems when executing git hooks.

Added skipped tests to validate card input.

refactor: create utility type for CamelCase properties of any object
feat: configure eslint for typescript declaration files
feat: setting up a pre-commit hook for linting
fix: errors detected by eslint
fix: add important missing types and fields
test validateNumber, validateExpiry, validateCVC
@awwit awwit merged commit 3cf4e8e into master Apr 19, 2024
1 check passed
@awwit awwit deleted the fix/types-declaration branch April 19, 2024 15:57
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.

3 participants