Skip to content
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 with const/let in the root of ui/public #6881

Merged
merged 2 commits into from
Apr 13, 2016

Conversation

epixa
Copy link
Contributor

@epixa epixa commented Apr 12, 2016

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

All instances of var were replaced with let, and then all instances
of let that wouldn't flag the no-const-assign rule in the linter were
replaced with const.

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=`
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.
@spalger
Copy link
Contributor

spalger commented Apr 13, 2016

LGTM

@spalger
Copy link
Contributor

spalger commented Apr 13, 2016

I was a bit more trigger happy over at #6882 (comment). This time I would like to know if you think it's really worth it to backport this and the other pulls you plan/have submitted.

@spalger spalger assigned epixa and unassigned spalger Apr 13, 2016
@epixa
Copy link
Contributor Author

epixa commented Apr 13, 2016

Yeah, I do want to backport them, and I'll take care of it manually. Just assign them back to me when they're ready to be merged.

Since these changes will ultimately touch thousands of lines of code across a majority of files in the project, if I don't backport them, it will be essentially impossible to automatically backport anything from this point onward.

@spalger
Copy link
Contributor

spalger commented Apr 13, 2016

@epixa if the var/let changes don't backport nicely I doubt changes will backport either, right?

@epixa
Copy link
Contributor Author

epixa commented Apr 13, 2016

@spalger Not necessarily: a lot of these var/let changes would backport cleanly, but if we don't backport this at all, even those situations will cause conflicts on backports in the future.

@epixa epixa merged commit 68d46d4 into elastic:master Apr 13, 2016
@epixa epixa deleted the uiletconst1 branch April 13, 2016 18:41
epixa added a commit that referenced this pull request Apr 13, 2016
---------

**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 added a commit that referenced this pull request Apr 13, 2016
---------

**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
epixa added a commit that referenced this pull request Apr 13, 2016
epixa added a commit that referenced this pull request Apr 13, 2016
@epixa epixa added v4.5.2 and removed v4.5.1 labels May 14, 2016
@epixa epixa added v4.5.4 and removed v4.5.2 labels Jul 21, 2016
1Copenut added a commit that referenced this pull request Jul 11, 2023
`eui@83.0.0` ⏩ `83.1.0`

---

## [`83.1.0`](https://github.com/elastic/eui/tree/v83.1.0)

- Added `placeholder` prop to `EuiInlineEdit`
([#6883](elastic/eui#6883))
- Added `sparkles` glyph to `EuiIcon`
([#6898](elastic/eui#6898))

**Bug fixes**

- Fixed Safari-only bug for single-line row `EuiDataGrid`s, where cell
actions on hover would overlap instead of pushing content to the left
([#6881](elastic/eui#6881))
- Fixed `EuiButton` not correctly merging in passed `className`s with
its base `.euiButton` class
([#6887](elastic/eui#6887))
- Fixed `EuiIcon` not correctly passing the `style` prop custom `img`
icons ([#6888](elastic/eui#6888))
- Fixed multiple components with child props (e.g. `buttonProps`,
`iconProps`, etc.) unsetting EUI's Emotion styling if custom `css` was
passed to the child props object
([#6896](elastic/eui#6896))

**CSS-in-JS conversions**

- Converted `EuiHeader` and `EuiHeaderLogo` to Emotion
([#6878](elastic/eui#6878))
- Removed Sass variables `$euiHeaderDarkBackgroundColor`,
`$euiHeaderBorderColor`, and `$euiHeaderBreadcrumbColor`
([#6878](elastic/eui#6878))
- Removed Sass mixin `@euiHeaderDarkTheme`
([#6878](elastic/eui#6878))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants