mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
This PR implements a linter like the TS Project linter, except for packages in the repo. It does this by extracting the reusable bits from the TS Project linter and reusing them for the project linter. The only rule that exists for packages right now is that the "name" in the package.json file matches the "id" in Kibana.jsonc. The goal is to use a rule to migrate kibana.json files on the future. Additionally, a new rule for validating the indentation of tsconfig.json files was added. Validating and fixing violations is what has triggered review by so many teams, but we plan to treat those review requests as notifications of the changes and not as blockers for merging. Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
babel_plugin_package_imports.js | ||
BUILD.bazel | ||
index.js | ||
kibana.jsonc | ||
package.json | ||
README.mdx | ||
tsconfig.json | ||
types.ts |
--- id: kibDevDocsOpsBabelPluginPackageImports slug: /kibana-dev-docs/ops/babel-plugin-package-imports title: "@kbn/babel-plugin-package-imports" description: A babel plugin that transforms our @kbn/{NAME} imports into paths date: 2022-05-19 tags: ['kibana', 'dev', 'contributor', 'operations', 'babel', 'plugin', 'packages', 'imports'] --- When developing inside the Kibana repository importing a package from any other package is just easy as importing `@kbn/{package-name}`. However not every package is a node_module yet and while that is something we are working on to accomplish we need a way to dealing with it for now. Using this babel plugin is our transitory solution. It allows us to import from module ids and then transform it automatically back into paths on the transpiled code without friction for our engineering teams.