I ran ESLint v6.0.1 locally, and 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.
In addition to the automatic fixesWith D2070 and D2103 applied first, this commit also makes two other changes:means there are now 0 violations of any kind in this sub directory with our current ESLint configuration.
1. Fix one ESLint warning that could not be automatically named. Namely the the `use-before-define` warning about
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). It luckily didn't cause any breakage, but also means it can be safely removed. Explanation at D1993#83328.
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.In addition to the automatic fixes, I've adjusted these to something that still satisfies the rule,this commit also two lines of commented out code that were oddly auto-formatted due to being commented out inline instead of as whole statements. but is arguably more readable.Rather than fixing the indentation, There was alsothis one case in `AttackPlan#checkTargetObstruction` where I removed the commented out codeed as it had been commented out from the first commit it was introduced (r18257), and didn't serem to have an obvious purpose.
Depends on D2070.
Depends on D2103.