Skip to content

[backport] PR #6881 to 4.5#6905

Merged
epixa merged 1 commit into4.5from
jasper/backport/6881/6904/4.5
Apr 13, 2016
Merged

[backport] PR #6881 to 4.5#6905
epixa merged 1 commit into4.5from
jasper/backport/6881/6904/4.5

Conversation

@elastic-jasper
Copy link
Copy Markdown
Contributor

Backport PR #6881

Commit 1:
[internal] Replace var with let in root of ui/public

This change was applied only to files in the root of the src/ui/public
directory.

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=

Commit 2:
[internal] Replace let with const in root of ui/public

This change was applied only to files in the root of the src/ui/public
directory.

All instances of let were replaced with const, and then any instance
that flagged the no-const-assign rule in the linter was put back.


Backported based on diff from PR #6904

---------

**Commit 1:**
[internal] Replace var with let in root of ui/public

This change was applied only to files in the root of the src/ui/public
directory.

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: 469c0bd
* Authored by Court Ewing <court@epixa.com> on 2016-04-12T21:38:58Z

**Commit 2:**
[internal] Replace let with const in root of ui/public

This change was applied only to files in the root of the src/ui/public
directory.

All instances of `let` were replaced with `const`, and then any instance
that flagged the `no-const-assign` rule in the linter was put back.

* Original sha: 3ae0909
* Authored by Court Ewing <court@epixa.com> on 2016-04-12T21:45:32Z
@elastic-jasper elastic-jasper added the backport This PR is a backport of another PR label Apr 13, 2016
@epixa epixa merged commit be7a95c into 4.5 Apr 13, 2016
@epixa epixa deleted the jasper/backport/6881/6904/4.5 branch April 13, 2016 19:31
epixa added a commit that referenced this pull request Jul 21, 2016
…04/4.5"

This reverts commit be7a95c, reversing
changes made to 6369da8.
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