I ran ESLint v5.16.06.0.1 locally on the `ai/petra/` directoryy, and then let `eslint --fix` automatically fix all errors it could fixran `eslint --fix` on the `ai/petra/` directory to automatically fix all violations of the ESLint rules in our eslintrc.json file that could be automatically fixed.
In addition to the automatic fixes, this commit also makes two other changes:
* Restores formatting of some commented-out code.
* Remove some redundant commented-out code.
* Fix the last remaining ESLint warning (`use-before-define` about the `PETRA` variable)
which couldn't be fixed automatically1. The previous structure for these files had some
extra indirection with variable overrides that didn't actually work (as ESLint correctlyFix one ESLint warning that could not be automatically named. Namely the the `use-before-define` warning about
flagged),the `PETRA` variable being used in an unstable way. The previous structure for these files had some indirection with variable overrides that didn't actually work in practice (as ESLint correctly flagged). and this turned out to be redundant anyhowIt luckily didn't cause any breakage, so Ibut also means it can be safely removed it.
* Fix the last remaining JSHint warning (W047),2. Correct indentation for commented-out code. Due to the specific way that some statements were commented out, it led to a somewhat confusing auto-indentation outcome. I've adjusted these to something that still satisfies the rule, but is arguably more readable. There was also one case in `AttackPlan#checkTargetObstruction` where I removed the commented out code as it had been commented out from the first commit it was introduced (r18257), and didn't serve an obvious purpose.
which warns about a trailing decimal point being confusing.