You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently the code which loads default and user configuration has little in the way of validation.
Additionally the method of loading user or default config could be improved and values off the config can probably be accessed directly.
Describe the solution you'd like
Add config validation for both default and user config. Pick user or default config in a more elegant way.
Probably using a validation library such as zod or yup.
Then removing the getter functions and just accessing values off the object.
Describe alternatives you've considered
Could leave the code as is.
Could make the improvements above but follow a Class pattern like some of the rest of the code base giving a reason to keep the getter functions
Additional context
Currently some default config can not be overwritten from user config. #742 addresses this but matching the current pattern used to have the issue resolved swiftly.
A refactor could avoid cases where some config accidentally can't be changed by the user
The text was updated successfully, but these errors were encountered:
06kellyjac
changed the title
refactor configuration code
proposal: refactor configuration code
Oct 7, 2024
Is your feature request related to a problem? Please describe.
Currently the code which loads default and user configuration has little in the way of validation.
Additionally the method of loading user or default config could be improved and values off the config can probably be accessed directly.
Describe the solution you'd like
Add config validation for both default and user config. Pick user or default config in a more elegant way.
Probably using a validation library such as zod or yup.
Then removing the getter functions and just accessing values off the object.
Describe alternatives you've considered
Could leave the code as is.
Could make the improvements above but follow a Class pattern like some of the rest of the code base giving a reason to keep the getter functions
Additional context
Currently some default config can not be overwritten from user config.
#742 addresses this but matching the current pattern used to have the issue resolved swiftly.
A refactor could avoid cases where some config accidentally can't be changed by the user
The text was updated successfully, but these errors were encountered: