Skip to content

[backport] PR #6921 to 4.5#6937

Merged
epixa merged 1 commit into4.5from
jasper/backport/6921/6934/4.5
Apr 14, 2016
Merged

[backport] PR #6921 to 4.5#6937
epixa merged 1 commit into4.5from
jasper/backport/6921/6934/4.5

Conversation

@elastic-jasper
Copy link
Contributor

Backport PR #6921

Commit 1:
[internal] Replace var with let in ui/public U-W (no utils/vislib)

This change was applied to any .js files under directories beginning
with u through w (other than utils and vislib) in src/ui/public.
There are no y or z directories. The utils directory isn't included
because the generic change breaks something in it. The vislib directory
isn't included because it had too many changes on its own.

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 #6934

---------

**Commit 1:**
[internal] Replace var with let in ui/public U-W (no utils/vislib)

This change was applied to any .js files under directories beginning
with `u` through `w` (other than utils and vislib) in src/ui/public.
There are no `y` or `z` directories. The utils directory isn't included
because the generic change breaks something in it. The vislib directory
isn't included because it had too many changes on its own.

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: 80a733f
* Authored by Court Ewing <court@epixa.com> on 2016-04-14T14:13:22Z
@elastic-jasper elastic-jasper added the backport This PR is a backport of another PR label Apr 14, 2016
@epixa epixa merged commit cae1ef3 into 4.5 Apr 14, 2016
@epixa epixa deleted the jasper/backport/6921/6934/4.5 branch April 14, 2016 20:22
epixa added a commit that referenced this pull request Jul 21, 2016
…34/4.5"

This reverts commit cae1ef3, reversing
changes made to f84d3af.
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

Comments