Fix JS on MusicBrainz to not have empty block statements
We use a tool called ESLint to find problems in our JavaScript code and ensure it has a consistent style. ESLint is configured to use "rules" which each check for a different problem in the code.
This task requires you to fix all problems detected by the no-empty rule.
To invoke this rule and find a list of such problems, you must first navigate to the git checkout of musicbrainz-server in the terminal, and run:
./script/check_eslint_rule 'no-empty: [error, {allowEmptyCatch: true}]' root/
The output will tell you which files it detected problems in, including line numbers, alongside a description of the actual issue on each line.
In this case, you'll need to check the empty block statements the rule finds. Empty block statements are allowed by the rule only if they have a comment (basically specifying why they are empty but still exist). Either this should be added (if it makes the code more clear than just removing them), or they should be removed. This should be decided on a case per case basis.
To complete the task, submit a pull request to our GitHub repository with a proper description mentioning the specific rule, and respond to any suggestions and requests by the MusicBrainz developers until the pull request is approved (you do not need to wait until it gets merged).