Skip to content

[backport] PR #6706 to 4.x#6724

Merged
epixa merged 1 commit into4.xfrom
jasper/backport/6706/4.x
Apr 1, 2016
Merged

[backport] PR #6706 to 4.x#6724
epixa merged 1 commit into4.xfrom
jasper/backport/6706/4.x

Conversation

@elastic-jasper
Copy link
Copy Markdown
Contributor

Backport PR #6706

Commit 1:
[internal] Replace var assignments with let in non-ui

This change was applied to all directories under src/ except for the ui/
directory. Only .js files were searched.

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] use strict in babel_options

This file is not transpiled, so in order to use es6 features such as
const/let, we need to enable strict mode.

@elastic-jasper elastic-jasper added backport This PR is a backport of another PR has conflicts labels Apr 1, 2016
@epixa epixa assigned epixa and unassigned Bargs Apr 1, 2016
---------

**Commit 1:**
[internal] Replace var assignments with let in non-ui

This change was applied to all directories under src/ except for the ui/
directory. Only .js files were searched.

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: 9eee35d
* Authored by Court Ewing <court@epixa.com> on 2016-03-30T17:53:10Z

**Commit 2:**
[internal] use strict in babel_options

This file is not transpiled, so in order to use es6 features such as
const/let, we need to enable strict mode.

* Original sha: f3ec776
* Authored by Court Ewing <court@epixa.com> on 2016-03-30T21:43:10Z
@epixa epixa force-pushed the jasper/backport/6706/4.x branch from 04e0ea2 to ed774c5 Compare April 1, 2016 00:50
@epixa epixa merged commit ae0776a into 4.x Apr 1, 2016
@epixa epixa deleted the jasper/backport/6706/4.x branch April 1, 2016 01:03
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