[Logs / Metrics UI] [NP followup] Cleanup /common #58002
Labels
chore
Feature:Logs UI
Logs UI feature
Feature:Metrics UI
Metrics UI feature
loe:medium
Medium Level of Effort
Team:Infra Monitoring UI - DEPRECATED
DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
In new platform world a (sensible) restriction is made that you can't just import any old code from inside of a plugins server and client folders, you may only import from the top level index (i.e. code that is in a contract to share with others).
However, this rule also applies to our own
common
folder. For now// eslint-disable-next-line @kbn/eslint/no-restricted-paths
rules have been added to all the locations where files in ourcommon
folder import fromserver
orclient
. This isn't 100% ideal as theoretically another plugin could come along and import from here now, however we should be okay as ourcommon
folder is justcommon
code for us. Moving forward we should refactor these uses - code that lives withincommon
shouldn't be importing fromclient
orserver
as it no longer makes itcommon
. We should move towards this being for strictly common code (things like HTTP API types). As an example - we currently have React components living within common, these should definitely move topublic
and so on.This ticket can also just be approached in an "as we go" manner. If you're working on some code that somehow touches things in
/common
, try and cleanup some references.The text was updated successfully, but these errors were encountered: