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

Validate config file options (ConfigOptions) #2359

Merged
merged 3 commits into from
Oct 18, 2022

Conversation

neuronull
Copy link
Contributor

Summary

Fixes: #1924

Adds additional validations to ConfigOptions by means of the yup API.

Testing Plan

Added unit tests for configuration schema validations, and applying the default config against the schema.

Breaking Change

No

Graffiti

null

@neuronull neuronull requested a review from a team as a code owner October 16, 2022 22:07
Copy link
Contributor

@hughy hughy left a comment

Choose a reason for hiding this comment

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

Thanks for picking up this task!

I left one small suggestion

ironfish/src/fileStores/config.ts Outdated Show resolved Hide resolved
@neuronull neuronull requested a review from hughy October 18, 2022 01:07
@hughy
Copy link
Contributor

hughy commented Oct 18, 2022

Looks good, just need to fix lint issues.

You can run yarn lint:fix to fix automatically where possible.

@neuronull
Copy link
Contributor Author

Looks good, just need to fix lint issues.

You can run yarn lint:fix to fix automatically where possible.

Ah, good to know. I'm quite new to TS. I think this means I solved them?

$ yarn lint 
yarn run v1.22.19
$ tsc -b && tsc -b tsconfig.test.json && eslint --ext .ts,.tsx,.js,.jsx src/
Done in 60.07s.

Copy link
Contributor

@hughy hughy left a comment

Choose a reason for hiding this comment

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

Great! Thanks again!

@hughy hughy merged commit bc237b8 into iron-fish:staging Oct 18, 2022
@neuronull neuronull deleted the validate_config_files branch October 18, 2022 14:09
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.

None yet

2 participants