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

[8.0] [Security Solutions] Removes tech debt of exporting all from linter rule for cases plugin in the server section (#120411) #120564

Merged
merged 2 commits into from
Dec 7, 2021

Conversation

FrankHassanabad
Copy link
Contributor

Backports the following commits to 8.0:

…ule for cases plugin in the server section (elastic#120411)

## Summary

See: elastic#110903, elastic#120234

This removes all the top level API `export *` spots from:
* `cases` plugin within the server section

This reduces the number of metrics and warning about undocumented functions.

In the file `cases/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
```

# Conflicts:
#	x-pack/plugins/cases/server/client/alerts/get.ts
#	x-pack/plugins/cases/server/client/cases/update.ts
#	x-pack/plugins/cases/server/client/metrics/get_case_metrics.ts
#	x-pack/plugins/cases/server/client/sub_cases/client.ts
#	x-pack/plugins/cases/server/routes/api/utils.test.ts
#	x-pack/plugins/cases/server/routes/api/utils.ts
@FrankHassanabad FrankHassanabad enabled auto-merge (squash) December 7, 2021 02:21
@FrankHassanabad FrankHassanabad self-assigned this Dec 7, 2021
@FrankHassanabad
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

cc @FrankHassanabad

@FrankHassanabad FrankHassanabad merged commit 27f1a43 into elastic:8.0 Dec 7, 2021
@FrankHassanabad FrankHassanabad deleted the backport/8.0/pr-120411 branch December 7, 2021 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants