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 fixes, this commit also:
* 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 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.
* Fix the last remaining JSHint warning (W047),
* 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 which warns about a trailing decimal point being confusing.