Modernize internal JS code and run it through eslint. NFC #15845
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change does not effect the JS that we output, only the the internal
JS tooling.
One of the interesting changes here is the use of the
globalobjectto share symbols between JS files. In the current setup each JS file
is read in using
eval. The only way to share symbol between suchfiles is via the global namespace which means either a naked variable
declaration (with no
const,letorvar), or directly using theglobal namespace. As a followup we can hopefully remove the use of
evalfor the files that are part of this PR.The long list of exclusions in
.eslintrc.ymlis because these filesare part of the JS library code which we ship and we a lot of that
cannot be run though the lint tool because it uses our speciall
pre-processing techniques.
This is a followup to #15838 and #15836 which did this for two
individual entry points.