kibana/packages/elastic-eslint-config-kibana/BUILD.bazel
Kibana Machine 78fb42a25e
chore(NA): moving @elastic/eslint-config-kibana into bazel (#98648) (#98786)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-04-29 18:24:34 +00:00

56 lines
897 B
Python

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"],
)