-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[internal] Replace var assignments with let in non-ui #6706
Conversation
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=`
I killed that test because there were more important ones waiting in the queue. I'll re-run tests on this later. |
jenkins, test it |
This file is not transpiled, so in order to use es6 features such as const/let, we need to enable strict mode.
Blegh, so there are actually two commits in this pull request. The first is an automated change, as the PR describes, and it includes essentially everything in this PR. The second commit is a single change to a single file that is needed because that file is not transpiled with babel. It might be easier to review them separately. The bulk of this change and what the PR title/description is actually describing: 9eee35d Normally I'd just squash them, but the main commit is large and was created completely automatically. I figured the separate commits make it easier to review. |
LGTM 🎉 |
LGTM |
--------- **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
--------- **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
--------- **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
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';
becomeslet foo = 'var';
This was accomplished by replacing:
find:
var ([a-zA-Z_$][0-9a-zA-Z_$]*)(\s+)=
replace:
let $1$2=