tools: enable no-extra-semi rule in eslint
This CL adds two rules:
no-extra-semi
- Removed obvious extra semicolons
- Had to change some loops to add an empty body
semi-spacing (removed)
This one is up for discussion because the changes I had to make feel wrong to me.
For instance in try {fs.rmdirSync(tmp(folder)); } catch (ex) {}
the space isn't really improving readability. Maybe it would better if we added a space as well at the beginning of the try
block, but I can't find a rule for that.
Because of that I would prefer to explicitly disable this rule in .eslintrc
but it is the one that enforces spaces in code like for(let i = 0; i < x; i++)
so we'd lose that check.