I ran ESLint v5.16.0 locally on the ai/petra directory`ai/petra/` directory, and then let `eslint --fix` automatically fix all errors it could fix.
In addition to the automatic fixes, and then let `eslint --fix` automatically fix all errors,this commit also:
* Restores formatting of some commented-out code.
except for `curly` which was the most common one and wasn't sure whether that's wanted or not.
Then I did some minor clean ups afterwards to either re-format or remove commented out code* Remove some redundant commented-out code.
* Fix the last remaining warning (`use-before-define` about the `PETRA` variable) which couldn't be fixed automatically. The previous structure for these files had some extra indirection with variable overrides that didn't actually work (as ESLint correctly flagged), and this turned out to be redundant anyhow, so I removed it.