# Conflicts: # packages/elastic-eslint-config-kibana/javascript.js # packages/kbn-eslint-plugin-eslint/rules/disallow_license_headers.test.js # packages/kbn-eslint-plugin-eslint/rules/no_restricted_paths.test.js # packages/kbn-eslint-plugin-eslint/rules/require_license_header.test.js # src/dev/eslint/lint_files.ts # x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/processor.tsx # yarn.lock Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
63 lines
959 B
Python
63 lines
959 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",
|
|
"helpers/**/*.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-parser",
|
|
"@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"],
|
|
)
|