-
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
[Ops] Fix @kbn/imports/no_unused_imports rule #164870
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ent ESLint from breaking
delanni
added
chore
Team:Operations
Team label for Operations Team
backport:all-open
Backport to all branches that could still receive a release
labels
Aug 25, 2023
Pinging @elastic/kibana-operations (Team:Operations) |
delanni
added
the
release_note:skip
Skip the PR/issue when compiling release notes
label
Aug 25, 2023
💚 Build Succeeded
Metrics [docs]
To update your PR or re-run it, just comment with: |
jbudz
approved these changes
Aug 25, 2023
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Aug 25, 2023
## Summary @jloleysens reported that ESLint breaks (probably in IDEs only) because of this bug. When there's an unused import, linting stops for the whole file. By adding this flag, it no longer breaks on my machine, however, auto-fixing still doesn't work from the CLI. The IDE auto-fixes because it also recognizes it as a non-unsed variable. - add `meta.hasSuggestions` to `@kbn/imports/no_unused_imports` prevent ESLint from breaking (cherry picked from commit d8d355d)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Aug 25, 2023
## Summary @jloleysens reported that ESLint breaks (probably in IDEs only) because of this bug. When there's an unused import, linting stops for the whole file. By adding this flag, it no longer breaks on my machine, however, auto-fixing still doesn't work from the CLI. The IDE auto-fixes because it also recognizes it as a non-unsed variable. - add `meta.hasSuggestions` to `@kbn/imports/no_unused_imports` prevent ESLint from breaking (cherry picked from commit d8d355d)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Aug 26, 2023
# Backport This will backport the following commits from `main` to `8.10`: - [[Ops] Fix @kbn/imports/no_unused_imports rule (#164870)](#164870) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alex Szabo","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-25T23:13:57Z","message":"[Ops] Fix @kbn/imports/no_unused_imports rule (#164870)\n\n## Summary\r\n@jloleysens reported that ESLint breaks (probably in IDEs only) because\r\nof this bug. When there's an unused import, linting stops for the whole\r\nfile.\r\n\r\nBy adding this flag, it no longer breaks on my machine, however,\r\nauto-fixing still doesn't work from the CLI. The IDE auto-fixes because\r\nit also recognizes it as a non-unsed variable.\r\n\r\n- add `meta.hasSuggestions` to `@kbn/imports/no_unused_imports` prevent\r\nESLint from breaking","sha":"d8d355dd7b4184127a760261178daf0f8a94af86","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","backport:all-open","v8.11.0"],"number":164870,"url":"https://github.com/elastic/kibana/pull/164870","mergeCommit":{"message":"[Ops] Fix @kbn/imports/no_unused_imports rule (#164870)\n\n## Summary\r\n@jloleysens reported that ESLint breaks (probably in IDEs only) because\r\nof this bug. When there's an unused import, linting stops for the whole\r\nfile.\r\n\r\nBy adding this flag, it no longer breaks on my machine, however,\r\nauto-fixing still doesn't work from the CLI. The IDE auto-fixes because\r\nit also recognizes it as a non-unsed variable.\r\n\r\n- add `meta.hasSuggestions` to `@kbn/imports/no_unused_imports` prevent\r\nESLint from breaking","sha":"d8d355dd7b4184127a760261178daf0f8a94af86"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164870","number":164870,"mergeCommit":{"message":"[Ops] Fix @kbn/imports/no_unused_imports rule (#164870)\n\n## Summary\r\n@jloleysens reported that ESLint breaks (probably in IDEs only) because\r\nof this bug. When there's an unused import, linting stops for the whole\r\nfile.\r\n\r\nBy adding this flag, it no longer breaks on my machine, however,\r\nauto-fixing still doesn't work from the CLI. The IDE auto-fixes because\r\nit also recognizes it as a non-unsed variable.\r\n\r\n- add `meta.hasSuggestions` to `@kbn/imports/no_unused_imports` prevent\r\nESLint from breaking","sha":"d8d355dd7b4184127a760261178daf0f8a94af86"}}]}] BACKPORT--> Co-authored-by: Alex Szabo <[email protected]>
kibanamachine
added a commit
that referenced
this pull request
Aug 26, 2023
# Backport This will backport the following commits from `main` to `8.9`: - [[Ops] Fix @kbn/imports/no_unused_imports rule (#164870)](#164870) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alex Szabo","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-25T23:13:57Z","message":"[Ops] Fix @kbn/imports/no_unused_imports rule (#164870)\n\n## Summary\r\n@jloleysens reported that ESLint breaks (probably in IDEs only) because\r\nof this bug. When there's an unused import, linting stops for the whole\r\nfile.\r\n\r\nBy adding this flag, it no longer breaks on my machine, however,\r\nauto-fixing still doesn't work from the CLI. The IDE auto-fixes because\r\nit also recognizes it as a non-unsed variable.\r\n\r\n- add `meta.hasSuggestions` to `@kbn/imports/no_unused_imports` prevent\r\nESLint from breaking","sha":"d8d355dd7b4184127a760261178daf0f8a94af86","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","backport:all-open","v8.11.0"],"number":164870,"url":"https://github.com/elastic/kibana/pull/164870","mergeCommit":{"message":"[Ops] Fix @kbn/imports/no_unused_imports rule (#164870)\n\n## Summary\r\n@jloleysens reported that ESLint breaks (probably in IDEs only) because\r\nof this bug. When there's an unused import, linting stops for the whole\r\nfile.\r\n\r\nBy adding this flag, it no longer breaks on my machine, however,\r\nauto-fixing still doesn't work from the CLI. The IDE auto-fixes because\r\nit also recognizes it as a non-unsed variable.\r\n\r\n- add `meta.hasSuggestions` to `@kbn/imports/no_unused_imports` prevent\r\nESLint from breaking","sha":"d8d355dd7b4184127a760261178daf0f8a94af86"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164870","number":164870,"mergeCommit":{"message":"[Ops] Fix @kbn/imports/no_unused_imports rule (#164870)\n\n## Summary\r\n@jloleysens reported that ESLint breaks (probably in IDEs only) because\r\nof this bug. When there's an unused import, linting stops for the whole\r\nfile.\r\n\r\nBy adding this flag, it no longer breaks on my machine, however,\r\nauto-fixing still doesn't work from the CLI. The IDE auto-fixes because\r\nit also recognizes it as a non-unsed variable.\r\n\r\n- add `meta.hasSuggestions` to `@kbn/imports/no_unused_imports` prevent\r\nESLint from breaking","sha":"d8d355dd7b4184127a760261178daf0f8a94af86"}}]}] BACKPORT--> Co-authored-by: Alex Szabo <[email protected]>
7.17 backport is not possible, the rule didn't exist, and it's not used in there. |
This was referenced Oct 1, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport:all-open
Backport to all branches that could still receive a release
chore
release_note:skip
Skip the PR/issue when compiling release notes
Team:Operations
Team label for Operations Team
v8.9.2
v8.10.0
v8.11.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
@jloleysens reported that ESLint breaks (probably in IDEs only) because of this bug. When there's an unused import, linting stops for the whole file.
By adding this flag, it no longer breaks on my machine, however, auto-fixing still doesn't work from the CLI. The IDE auto-fixes because it also recognizes it as a non-unsed variable.
meta.hasSuggestions
to@kbn/imports/no_unused_imports
prevent ESLint from breaking