I ran ESLint v5.16.0 locally on the `ai/petra/` directory, and then let `eslint --fix` automatically fix all errors it could fix.
In addition to the automatic fixes6.0.1 locally, this commit also:
* Restores formatting of some commented-out codeand ran `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.
* Remove some redundant commented-out code.In addition to the automatic fixes, this commit also makes two other changes:
* 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.