mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Ops] Fix @kbn/imports/no_unused_imports rule (#164870)
## 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
This commit is contained in:
parent
edca162329
commit
d8d355dd7b
1 changed files with 1 additions and 0 deletions
|
@ -78,6 +78,7 @@ function isTsOrEslintIgnore(comment: Comment) {
|
|||
|
||||
export const NoUnusedImportsRule: Rule.RuleModule = {
|
||||
meta: {
|
||||
hasSuggestions: true,
|
||||
fixable: 'code',
|
||||
docs: {
|
||||
url: 'https://github.com/elastic/kibana/blob/main/packages/kbn-eslint-plugin-imports/README.mdx#kbnimportsno_unused_imports',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue