-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solutions] Removes tech debt of exporting all from linter rule for metrics_entities plugin in the server section #120412
[Security Solutions] Removes tech debt of exporting all from linter rule for metrics_entities plugin in the server section #120412
Conversation
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code lgtm!
## Summary See: elastic#110903 This removes all the top level API `export *` spots from: * `metrics_entities` plugin within the server section This reduces the number of metrics and warning about undocumented functions. In the file `metrics_entites/server/index.ts` I now put the advice of: ``` // Careful of exporting anything from this file as any file(s) you export here will cause your functions to be exposed as public. // If you're using functions/types/etc... internally or within integration tests it's best to import directly from their paths // than expose the functions/types/etc... here. You should _only_ expose functions/types/etc... that need to be shared with other plugins here. // When you do have to add things here you might want to consider creating a package such to share with other plugins instead as packages // are easier to break down. // See: https://docs.elastic.dev/kibana-dev-docs/key-concepts/platform-intro#public-plugin-api ```
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
) ## Summary See: #110903 This removes all the top level API `export *` spots from: * `metrics_entities` plugin within the server section This reduces the number of metrics and warning about undocumented functions. In the file `metrics_entites/server/index.ts` I now put the advice of: ``` // Careful of exporting anything from this file as any file(s) you export here will cause your functions to be exposed as public. // If you're using functions/types/etc... internally or within integration tests it's best to import directly from their paths // than expose the functions/types/etc... here. You should _only_ expose functions/types/etc... that need to be shared with other plugins here. // When you do have to add things here you might want to consider creating a package such to share with other plugins instead as packages // are easier to break down. // See: https://docs.elastic.dev/kibana-dev-docs/key-concepts/platform-intro#public-plugin-api ``` Co-authored-by: Frank Hassanabad <[email protected]>
## Summary See: elastic#110903 This removes all the top level API `export *` spots from: * `metrics_entities` plugin within the server section This reduces the number of metrics and warning about undocumented functions. In the file `metrics_entites/server/index.ts` I now put the advice of: ``` // Careful of exporting anything from this file as any file(s) you export here will cause your functions to be exposed as public. // If you're using functions/types/etc... internally or within integration tests it's best to import directly from their paths // than expose the functions/types/etc... here. You should _only_ expose functions/types/etc... that need to be shared with other plugins here. // When you do have to add things here you might want to consider creating a package such to share with other plugins instead as packages // are easier to break down. // See: https://docs.elastic.dev/kibana-dev-docs/key-concepts/platform-intro#public-plugin-api ```
Summary
See: #110903
This removes all the top level API
export *
spots from:metrics_entities
plugin within the server sectionThis reduces the number of metrics and warning about undocumented functions.
In the file
metrics_entites/server/index.ts
I now put the advice of: