Skip to content

[backport] PR #6653 to 4.5#6691

Merged
epixa merged 1 commit into4.5from
jasper/backport/6653/6690/4.5
Mar 29, 2016
Merged

[backport] PR #6653 to 4.5#6691
epixa merged 1 commit into4.5from
jasper/backport/6653/6690/4.5

Conversation

@elastic-jasper
Copy link
Copy Markdown
Contributor

Backport PR #6653

Commit 1:
[internal] Replace empty var declaration with let

Any time there is a variable defined in a JS file without also storing a
value in it, we know that definition cannot be converted to a const, so
we convert it to a let.

For example:

var blah; becomes let blah;

Some of these things variables might be unused, and many others can
likely be switched to const with only minor refactoring, but the commit
is very large, so there are no changes in it other than the 1:1 switch.


Backported based on diff from PR #6690

---------

**Commit 1:**
[internal] Replace empty var declaration with let

Any time there is a variable defined in a JS file without also storing a
value in it, we know that definition cannot be converted to a const, so
we convert it to a let.

For example:

`var blah;` becomes `let blah;`

Some of these things variables might be unused, and many others can
likely be switched to const with only minor refactoring, but the commit
is very large, so there are no changes in it other than the 1:1 switch.

* Original sha: bfc59e9
* Authored by Court Ewing <court@epixa.com> on 2016-03-24T22:27:29Z
@elastic-jasper elastic-jasper added the backport This PR is a backport of another PR label Mar 29, 2016
@epixa epixa assigned epixa and unassigned spalger Mar 29, 2016
@epixa epixa merged commit 411a33d into 4.5 Mar 29, 2016
@epixa epixa deleted the jasper/backport/6653/6690/4.5 branch March 29, 2016 17:29
epixa added a commit that referenced this pull request Jul 21, 2016
…90/4.5"

This reverts commit 411a33d, reversing
changes made to 60d8a88.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants