-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: Dedicated Location For All The Constants #5088
Comments
Let's start with the custom error codes we throw, e.g. |
I think multiple files are more readable. I think we have a lot constants. Maybe we can use typescript enum's for better compiletime checks. Another option is to use literal types like: export type RepositoryStatus = 'repository-changed' | 'other-state'; |
Let's start with any X that we new like |
1. Create file data-binary-source 2. Update all reference (renovatebot#5088)
🎉 This issue has been resolved in version 19.102.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
not yet finished |
What would you like Renovate to be able to do?
Throughout the renovate codebase, a lot of constant is used, e.g. error type, error code, Http status code and etc. A better approach is to move them to a specific place. That will help code more readable and maintainable.
Describe the solution you'd like
Creating a directory named
constants
and creating files according to their category. Each file will export constants. Descriptions will be added to understand the constant if required.Additional context
Here is the category of constants
The text was updated successfully, but these errors were encountered: