Skip to content

Commit

Permalink
chore(NA): moving @kbn/eslint-import-resolver-kibana into bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic committed Apr 29, 2021
1 parent 18213b6 commit 4af08a5
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ yarn kbn watch-bazel
- @kbn/babel-preset
- @kbn/config-schema
- @kbn/dev-utils
- @kbn/eslint-import-resolver-kibana
- @kbn/expect
- @kbn/logging
- @kbn/std
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
"@kbn/docs-utils": "link:packages/kbn-docs-utils",
"@kbn/es": "link:packages/kbn-es",
"@kbn/es-archiver": "link:packages/kbn-es-archiver",
"@kbn/eslint-import-resolver-kibana": "link:packages/kbn-eslint-import-resolver-kibana",
"@kbn/eslint-import-resolver-kibana": "link:bazel-bin/packages/kbn-eslint-import-resolver-kibana/npm_module",
"@kbn/eslint-plugin-eslint": "link:packages/kbn-eslint-plugin-eslint",
"@kbn/expect": "link:bazel-bin/packages/kbn-expect/npm_module",
"@kbn/optimizer": "link:packages/kbn-optimizer",
Expand Down
1 change: 1 addition & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ filegroup(
"//packages/kbn-babel-preset:build",
"//packages/kbn-config-schema:build",
"//packages/kbn-dev-utils:build",
"//packages/kbn-eslint-import-resolver-kibana:build",
"//packages/kbn-expect:build",
"//packages/kbn-logging:build",
"//packages/kbn-std:build",
Expand Down
54 changes: 54 additions & 0 deletions packages/kbn-eslint-import-resolver-kibana/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")

PKG_BASE_NAME = "kbn-eslint-import-resolver-kibana"
PKG_REQUIRE_NAME = "@kbn/eslint-import-resolver-kibana"

SOURCE_FILES = glob([
"lib/**/*.js",
"import_resolver_kibana.js",
])

SRCS = SOURCE_FILES

filegroup(
name = "srcs",
srcs = SRCS,
)

NPM_MODULE_EXTRA_FILES = [
"package.json",
"README.md",
]

DEPS = [
"@npm//debug",
"@npm//eslint-import-resolver-node",
"@npm//eslint-import-resolver-webpack",
"@npm//eslint-plugin-import",
"@npm//lru-cache",
]

js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES + [
":srcs",
],
deps = DEPS,
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)

pkg_npm(
name = "npm_module",
deps = [
":%s" % PKG_BASE_NAME,
]
)

filegroup(
name = "build",
srcs = [
":npm_module",
],
visibility = ["//visibility:public"],
)
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2639,7 +2639,7 @@
version "0.0.0"
uid ""

"@kbn/eslint-import-resolver-kibana@link:packages/kbn-eslint-import-resolver-kibana":
"@kbn/eslint-import-resolver-kibana@link:bazel-bin/packages/kbn-eslint-import-resolver-kibana/npm_module":
version "0.0.0"
uid ""

Expand Down

0 comments on commit 4af08a5

Please sign in to comment.