Skip to content

Use consistent-type-imports lint rule to autofix type-only imports#94464

Merged
jfsiii merged 5 commits intoelastic:masterfrom
jfsiii:fleet-add-import-type-lint-rule
Mar 15, 2021
Merged

Use consistent-type-imports lint rule to autofix type-only imports#94464
jfsiii merged 5 commits intoelastic:masterfrom
jfsiii:fleet-add-import-type-lint-rule

Conversation

@jfsiii
Copy link
Copy Markdown
Contributor

@jfsiii jfsiii commented Mar 11, 2021

Summary

Use the consistent-type-imports lint rule to use import type ... where possible

Code-only changes like this were recently added in #92979, but it was a more manual process. This PR adds an autofixable lint rule which will keep the changes up-to-date and Just Work ™️

@jfsiii jfsiii added chore v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 labels Mar 11, 2021
@jfsiii jfsiii self-assigned this Mar 11, 2021
@jfsiii jfsiii marked this pull request as ready for review March 11, 2021 22:19
@jfsiii jfsiii requested a review from a team as a code owner March 11, 2021 22:19
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jfsiii jfsiii added the auto-backport Deprecated - use backport:version if exact versions are needed label Mar 11, 2021
@jfsiii jfsiii enabled auto-merge (squash) March 11, 2021 22:46
@jfsiii
Copy link
Copy Markdown
Contributor Author

jfsiii commented Mar 14, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @jfsiii

Copy link
Copy Markdown
Contributor

@skh skh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not review every file. I trust the new lint rule, and CI, so 🚀

@jfsiii jfsiii merged commit a4fa4a6 into elastic:master Mar 15, 2021
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Backport failed

❌ 7.x: Commit could not be cherrypicked due to conflicts

To backport manually, check out the target branch and run:
node scripts/backport --pr 94464

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 17, 2021
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 94464 or prevent reminders by adding the backport:skip label.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 17, 2021
jfsiii pushed a commit that referenced this pull request Mar 17, 2021
…94464) (#94868)

## Summary

Use the [`consistent-type-imports` lint rule ](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/consistent-type-imports.md) to use `import type ...` where possible

Code-only changes like this were recently added in #92979, but it was a more manual process.  This PR adds an autofixable lint rule which will keep the changes up-to-date and Just Work ™️
# Conflicts:
#	x-pack/plugins/fleet/server/services/agents/crud.ts
#	x-pack/plugins/fleet/server/services/artifacts/artifacts.ts
#	x-pack/plugins/fleet/server/services/artifacts/mappings.ts
#	x-pack/plugins/fleet/server/services/artifacts/mocks.ts
#	x-pack/plugins/fleet/server/services/index.ts
@jfsiii jfsiii deleted the fleet-add-import-type-lint-rule branch April 6, 2021 17:08
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 chore release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants