Skip to content

[backport] PR #6951 to 4.5#6968

Merged
epixa merged 1 commit into4.5from
jasper/backport/6951/6967/4.5
Apr 18, 2016
Merged

[backport] PR #6951 to 4.5#6968
epixa merged 1 commit into4.5from
jasper/backport/6951/6967/4.5

Conversation

@elastic-jasper
Copy link
Copy Markdown
Contributor

Backport PR #6951

Commit 1:
[internal] Replace var with let in ui/public/utils (no rison)

This change was applied to any .js files under the src/ui/public/utils
directory except for the rison.js file. The rison code has block level
hoisting issues, but it seems safer to just not touch the file rather
than fix them.

This was an automatic replacement from var to let for any variable
declaration that doubles as the initial assignment. Ultimately we want
most of these to be converted to const, but this commit is so large that
it warrants breaking each step of automation up into its own commit.

For example:

var foo = 'bar'; becomes let foo = 'var';

This was accomplished by replacing:
find: var ([a-zA-Z_$][0-9a-zA-Z_$]*)(\s+)=
replace: let $1$2=


Backported based on diff from PR #6967

---------

**Commit 1:**
[internal] Replace var with let in ui/public/utils (no rison)

This change was applied to any .js files under the src/ui/public/utils
directory except for the `rison.js` file. The rison code has block level
hoisting issues, but it seems safer to just not touch the file rather
than fix them.

This was an automatic replacement from var to let for any variable
declaration that doubles as the initial assignment. Ultimately we want
most of these to be converted to const, but this commit is so large that
it warrants breaking each step of automation up into its own commit.

For example:

`var foo = 'bar';` becomes `let foo = 'var';`

This was accomplished by replacing:
find: `var ([a-zA-Z_$][0-9a-zA-Z_$]*)(\s+)=`
replace: `let $1$2=`

* Original sha: ec0707f
* Authored by Court Ewing <court@epixa.com> on 2016-04-15T21:20:57Z
@elastic-jasper elastic-jasper added the backport This PR is a backport of another PR label Apr 18, 2016
@epixa epixa merged commit 6f3f560 into 4.5 Apr 18, 2016
@epixa epixa deleted the jasper/backport/6951/6967/4.5 branch April 18, 2016 17:43
epixa added a commit that referenced this pull request Jul 21, 2016
…67/4.5"

This reverts commit 6f3f560, reversing
changes made to 4c346d5.
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.

2 participants