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

[eslint] prevent using constructor property params in initializers #119130

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Nov 19, 2021

In order to upgrade TS we need to stop referencing properties initialized by constructor arguments. This change is unfortunate but no longer supported by TS and this ESLint rule is designed to prevent us from adding more occurrences of this until we can get the TS upgrade complete.

Also fixes all existing violations manually by moving the initialization into the constructor.

@spalger spalger added release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.16.0 v8.0.0 v8.1.0 labels Nov 19, 2021
@spalger spalger marked this pull request as ready for review November 19, 2021 07:29
@spalger spalger requested review from a team as code owners November 19, 2021 07:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
uiActions 88 90 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
uiActionsEnhanced 127.5KB 127.5KB +20.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 270.0KB 270.0KB +18.0B
dashboard 64.5KB 64.6KB +39.0B
presentationUtil 68.5KB 68.5KB +39.0B
security 49.5KB 49.6KB +54.0B
uiActions 19.0KB 19.2KB +118.0B
uiActionsEnhanced 21.7KB 22.0KB +288.0B
total +556.0B
Unknown metric groups

API count

id before after diff
uiActions 127 129 +2

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security plugin changes LGTM, thanks!

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app services changes lgtm

@spalger spalger enabled auto-merge (squash) November 19, 2021 18:59
@spalger spalger added the auto-backport Deprecated - use backport:version if exact versions are needed label Nov 19, 2021
Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kibana QA changes look good

@spalger spalger merged commit 2c4e795 into elastic:main Nov 19, 2021
@spalger spalger deleted the implement/eslint-no-constructor-args-in-initializers branch November 19, 2021 19:11
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 19, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
8.0
7.16 Commit could not be cherrypicked due to conflicts

Successful backport PRs will be merged automatically after passing CI.

To backport manually run:
node scripts/backport --pr 119130

spalger pushed a commit to spalger/kibana that referenced this pull request Nov 19, 2021
…lastic#119130)

# Conflicts:
#	packages/kbn-cli-dev-mode/src/log.ts
#	src/plugins/presentation_util/public/components/controls/control_group/embeddable/control_group_container_factory.ts
@tylersmalley tylersmalley mentioned this pull request Nov 19, 2021
2 tasks
spalger pushed a commit that referenced this pull request Nov 19, 2021
…119130) (#119224)

# Conflicts:
#	packages/kbn-cli-dev-mode/src/log.ts
#	src/plugins/presentation_util/public/components/controls/control_group/embeddable/control_group_container_factory.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.16.0 v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.