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

Refactor: Convert Variables to let and const, Improve configuration handling in app.loadConfig() #319

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

Conversation

Dalia-Alawneh
Copy link

No description provided.

In this commit, I refactored the app.loadConfig() function to improve the handling of configurations. The changes include:

1. Extracted loadNewConfig(), setDefaultValues(), checkConfigChanges(), and checkPortChanges() functions for better code organization and reusability.
2. Set default values for siteName, enableChangelogs, and boardSize if not specified in the configuration.
3. Ensured colors are stored as uppercase unique values in app.colours.
4. Improved the conditional checks for changes in the configuration, database, board size, OAuth settings, and port number.
5. Restructured the code to handle different scenarios more efficiently.

These refactorings enhance the readability, maintainability, and overall quality of the codebase. The core functionality of app.loadConfig() remains intact, but the code is now more organized and easier to understand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant