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

Convert styleguide to mdx and add section on export * #99527

Merged
merged 1 commit into from
May 8, 2021

Conversation

stacey-gammon
Copy link
Contributor

@stacey-gammon stacey-gammon commented May 6, 2021

A simple md -> mdx, and one extra section:

Avoid export * in top level index.ts files

The exports in common/index.ts, public/index.ts and server/index.ts dictate a plugin's public API. The public API should be carefully controlled, and using export * makes it very easy for a developer working on internal changes to export a new public API unintentionally.

// good
export { foo } from 'foo';
export { child } from './child';
// bad
export * from 'foo/child';
export * from '../foo/child';

I will hopefully get this into the docs system, but having trouble with it picking up the file (see https://github.com/elastic/elastic-docs/pull/323)

@stacey-gammon stacey-gammon added release_note:skip Skip the PR/issue when compiling release notes v7.14.0 v8.0.0 labels May 6, 2021
@stacey-gammon stacey-gammon requested a review from spalger May 6, 2021 18:55
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

@stacey-gammon stacey-gammon added the auto-backport Deprecated - use backport:version if exact versions are needed label May 8, 2021
@stacey-gammon stacey-gammon merged commit f669add into elastic:master May 8, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 8, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request May 8, 2021
Co-authored-by: Stacey Gammon <gammon@elastic.co>
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 v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants