Skip to content

[IGNORE FOR NOW] Enforce type export/import when possible#207088

Closed
gsoldevila wants to merge 19 commits intoelastic:mainfrom
gsoldevila:consistent-type-imports-everywhere
Closed

[IGNORE FOR NOW] Enforce type export/import when possible#207088
gsoldevila wants to merge 19 commits intoelastic:mainfrom
gsoldevila:consistent-type-imports-everywhere

Conversation

@gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Jan 17, 2025

Summary

The PR adds an ESLINT rule that will enforce export type and import type whenever the referenced member is a type.

The goal is to find out if this can bring substantial improvements in:

  • browser-side bundle sizes
  • jest execution times (reducing total amount of code loaded, thus saving parsing time)

If that's the case, we'll likely have to break this down into smaller PRs, easier to pass through.

I did not make it a DRAFT PR to allow --fix from CI. You can safely ignore this PR for now 🙏🏼

@gsoldevila gsoldevila added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Jan 17, 2025
@gsoldevila gsoldevila requested a review from a team as a code owner January 17, 2025 14:59
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@gsoldevila gsoldevila changed the title Enforce type export/import when possible [FridayAfternoonCrazyIdeas] Enforce type export/import when possible Jan 17, 2025
@gsoldevila gsoldevila marked this pull request as draft January 17, 2025 15:09
@gsoldevila gsoldevila force-pushed the consistent-type-imports-everywhere branch from e5913a8 to edbe7e8 Compare January 21, 2025 14:55
@gsoldevila gsoldevila changed the title [FridayAfternoonCrazyIdeas] Enforce type export/import when possible [IGNORE FOR NOW] Enforce type export/import when possible Jan 21, 2025
@gsoldevila gsoldevila marked this pull request as ready for review January 21, 2025 15:27
@gsoldevila gsoldevila requested review from a team and dgieselaar as code owners January 22, 2025 08:33
@gsoldevila gsoldevila requested review from a team January 22, 2025 08:33
@gsoldevila gsoldevila requested review from a team as code owners January 22, 2025 08:33
@botelastic botelastic bot added the Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. label Jan 22, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@gsoldevila
Copy link
Contributor Author

/ci

@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 23, 2025

💔 Build Failed

Failed CI Steps

History

@mattkime
Copy link
Contributor

mattkime commented Feb 1, 2025

IMO this would be a much smoother transition if it was done a few modules at a time instead of in a monster PR. Generally speaking, we should work in smaller PRs when possible. Its difficult for me to simply see the changes relevant to my team.

@dgieselaar
Copy link
Contributor

IMO this would be a much smoother transition if it was done a few modules at a time instead of in a monster PR. Generally speaking, we should work in smaller PRs when possible. Its difficult for me to simply see the changes relevant to my team.

The hint is in the title!

@gsoldevila
Copy link
Contributor Author

gsoldevila commented Feb 28, 2025

A more recent attempt has been performed with #212221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants