kibana/packages/kbn-eslint-plugin-telemetry
Marco Liberati e21bec3f31
[chore] Reuse bundled lodash and lodash/fp dependency (#217467)
## Summary

After #217202 and #217034 this the another attempt with `lodash` and
`lodash/fp`.

In short:
`lodash` and `lodash/fp` have a special webpack treatment as they are
imported within the shared bundle.
Now webpack is not smart enough to understand that `import camelCase
from 'lodash/camelCase';` is still pointing to `lodash` and it thinks
that `lodash/camelCase` is a different package, de-optimizing the
bundling caching system.
So I’ve tweaked the import to make it point to the shared bundle and
save few kbs here and there
2025-04-17 14:54:25 +02:00
..
helpers [chore] Reuse bundled lodash and lodash/fp dependency (#217467) 2025-04-17 14:54:25 +02:00
rules Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
index.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
jest.config.js Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kibana.jsonc Update new codeowners for Obs team changes (#170182) 2023-11-08 14:30:17 +00:00
package.json Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
README.mdx ESLint Telemetry Rule (#153108) 2023-03-20 13:31:02 +00:00
tsconfig.json ESLint Telemetry Rule (#153108) 2023-03-20 13:31:02 +00:00

---
id: kibDevDocsOpsEslintPluginTelemetry
slug: /kibana-dev-docs/ops/kbn-eslint-plugin-telemetry
title: '@kbn/eslint-plugin-telemetry'
description: Custom ESLint rules to support telemetry in the Kibana repository
tags: ['kibana', 'dev', 'contributor', 'operations', 'eslint', 'telemetry']
---

`@kbn/eslint-plugin-telemetry` is an ESLint plugin providing custom rules for validating JSXCode in the Kibana repo to make sure it can be instrumented for the purposes of telemetry.

## `@kbn/telemetry/instrumentable_elements_should_be_instrumented`

This rule warns engineers to add `data-test-subj` to instrumentable components. It currently suggests the most widely used EUI components (`EuiButton`, `EuiFieldText`, etc), but can be expanded with often-used specific components used in the Kibana repo.