web4bio / webgen

WebGen Vertically Integrated Project
https://web4bio.github.io/webgen/main/html/
11 stars 26 forks source link

make several global variables local instead + lint #357

Closed kaczmarj closed 2 years ago

kaczmarj commented 2 years ago

Prior to this commit, many variables were being put into the global namespace by the createViolinPlot script. This can cause problems if other parts of the app read these global variables. The variable names did not indicate that they were coming from the createViolinPlots script either. This commit makes these variables local by defining them with let or const.

I ran the code through eslint to make these changes, and this formatted the file. Let me know if these changes are acceptable.

A total of five variables were removed from the global namespace:

allBins, density, input, lengths, longest
kaczmarj commented 2 years ago

@amaraim22 - i know you are working on jsdoc documentation in this script. have you started yet? if so, we can wait to merge this after your work is merged.

kaczmarj commented 2 years ago

i'm closing this because when i went through the changes the linter made, some formatting / styling seemed bad. i will revisit this in the near future.