-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Conversation
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.
LGTM |
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. |
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. |
@epixa if the var/let changes don't backport nicely I doubt changes will backport either, right? |
@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. |
--------- **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
--------- **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
`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))
This change was applied only to files in the root of the src/ui/public
directory.
All instances of
var
were replaced withlet
, and then all instancesof
let
that wouldn't flag theno-const-assign
rule in the linter werereplaced with
const
.