788bf329b1
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
61 lines
928 B
Python
61 lines
928 B
Python
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
|
|
|
|
PKG_BASE_NAME = "kbn-eslint-plugin-eslint"
|
|
PKG_REQUIRE_NAME = "@kbn/eslint-plugin-eslint"
|
|
|
|
SOURCE_FILES = glob(
|
|
[
|
|
"rules/**/*.js",
|
|
"index.js",
|
|
"lib.js",
|
|
],
|
|
exclude = [
|
|
"**/*.test.*",
|
|
"**/__fixtures__"
|
|
],
|
|
)
|
|
|
|
SRCS = SOURCE_FILES
|
|
|
|
filegroup(
|
|
name = "srcs",
|
|
srcs = SRCS,
|
|
)
|
|
|
|
NPM_MODULE_EXTRA_FILES = [
|
|
"package.json",
|
|
"README.md",
|
|
]
|
|
|
|
DEPS = [
|
|
"@npm//babel-eslint",
|
|
"@npm//dedent",
|
|
"@npm//eslint",
|
|
"@npm//eslint-module-utils",
|
|
"@npm//micromatch",
|
|
]
|
|
|
|
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"],
|
|
)
|