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
Remove unnecessary files, clean up code, extract functions into helper function files when appropriate, adjust filesystem structure to best practices, etc
The text was updated successfully, but these errors were encountered:
I started spring cleaning, along the following lines:
Separated out the functions I was mostly responsible for into into as many descriptive helper functions as I could.
Put these helper functions in new files appsHelpers.js, clusterHelpers.js, and clusterMetricsHelpers.js respectively.
Imported the helper functions into apps.js and cluster.js, respectively.
Put the functions I want to export from apps.js and cluster.js outside of the module.exports block, only including their names in the module.exports block. This is how I've seen it done most often, and it makes it a bit more readable. You can quickly see which functions are being exported, then scroll up to see the functions themselves.
I think our goal should be to only have apps.js and cluster.js only contain the specific actual functions we are exporting from those files, and to have those exported functions be as lean as possible, with helper functions in a separate file.
Remove unnecessary files, clean up code, extract functions into helper function files when appropriate, adjust filesystem structure to best practices, etc
The text was updated successfully, but these errors were encountered: