Clean JS code
JS files (pages, components, classes ...) in the src
folde rare polluted by wrong practices. They need to be cleaned up.
To-do's:
-
Correct errors and warnings in console -
Remove blank lines -
Remove useless comments -
Remove useless imports -
Remove useless console.log
-
Remove useless variables (creating a variable before returning it) -
Convert wrong variables ( var
toconst
orlet
) -
Correct wrong imports ( require
instead ofimport from
) -
Create global functions in Utils.js
for re-used things (ex: url building from env variables likeloginUrl
)
Edited by BISSON REMI