Skip to content

Commit

Permalink
chore(NA): moving @elastic/eslint-config-kibana into bazel (elastic#9…
Browse files Browse the repository at this point in the history
…8648)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
mistic and kibanamachine committed Apr 29, 2021
1 parent 00376cc commit 3d95114
Show file tree
Hide file tree
Showing 5 changed files with 60 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 @@ -62,6 +62,7 @@ yarn kbn watch-bazel
=== List of Already Migrated Packages to Bazel

- @elastic/datemath
- @elastic/eslint-config-kibana
- @elastic/safer-lodash-set
- @kbn/apm-config-loader
- @kbn/apm-utils
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
"@cypress/webpack-preprocessor": "^5.6.0",
"@elastic/apm-rum": "^5.6.1",
"@elastic/apm-rum-react": "^1.2.5",
"@elastic/eslint-config-kibana": "link:packages/elastic-eslint-config-kibana",
"@elastic/eslint-config-kibana": "link:bazel-bin/packages/elastic-eslint-config-kibana/npm_module",
"@elastic/eslint-plugin-eui": "0.0.2",
"@elastic/github-checks-reporter": "0.0.20b3",
"@elastic/makelogs": "^6.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ filegroup(
name = "build",
srcs = [
"//packages/elastic-datemath:build",
"//packages/elastic-eslint-config-kibana:build",
"//packages/elastic-safer-lodash-set:build",
"//packages/kbn-apm-config-loader:build",
"//packages/kbn-apm-utils:build",
Expand Down
56 changes: 56 additions & 0 deletions packages/elastic-eslint-config-kibana/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")

PKG_BASE_NAME = "elastic-eslint-config-kibana"
PKG_REQUIRE_NAME = "@elastic/eslint-config-kibana"

SOURCE_FILES = glob([
".eslintrc.js",
"javascript.js",
"jest.js",
"react.js",
"restricted_globals.js",
"typescript.js",
])

SRCS = SOURCE_FILES

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

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

DEPS = [
"//packages/kbn-dev-utils",
"@npm//eslint-config-prettier",
"@npm//semver",
]

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 @@ -1428,7 +1428,7 @@
semver "7.3.2"
topojson-client "^3.1.0"

"@elastic/eslint-config-kibana@link:packages/elastic-eslint-config-kibana":
"@elastic/eslint-config-kibana@link:bazel-bin/packages/elastic-eslint-config-kibana/npm_module":
version "0.0.0"
uid ""

Expand Down

0 comments on commit 3d95114

Please sign in to comment.