Skip to content

Commit

Permalink
fix: collect runfiles of config
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Sep 27, 2023
1 parent 2a5447d commit 1754383
Show file tree
Hide file tree
Showing 12 changed files with 1,510 additions and 1,456 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
6.3.0
6.4.0rc1
# The first line of this file is used by Bazelisk and Bazel to be sure
# the right version of Bazel is used to build and test this repo.
# This also defines which version is used on CI.
Expand Down
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module(
)

bazel_dep(name = "aspect_bazel_lib", version = "1.30.2")
bazel_dep(name = "aspect_rules_js", version = "1.32.2")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "platforms", version = "0.0.5")

Expand Down
7 changes: 7 additions & 0 deletions e2e/eslint/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* eslint-env node */
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin'],
root: true,
};
16 changes: 0 additions & 16 deletions e2e/eslint/.eslintrc.js

This file was deleted.

30 changes: 22 additions & 8 deletions e2e/eslint/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_library")
load("@aspect_bazel_lib//lib:directory_path.bzl", "directory_path")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@npm//:eslint/package_json.bzl", eslint_bin = "bin")
load("@aspect_rules_js//js:defs.bzl", "js_library")

package(default_visibility = ["//visibility:public"])

npm_link_all_packages(name = "node_modules")

js_library(
name = "eslintrc",
srcs = [".eslintrc.js"],
visibility = ["//visibility:public"],
deps = [":node_modules/@typescript-eslint/eslint-plugin"],
srcs = [".eslintrc.cjs"],
deps = [
":node_modules/@typescript-eslint/eslint-plugin",
":node_modules/@typescript-eslint/parser",
],
)

# Reach into the node_modules to find the entry points
directory_path(
name = "eslint_entry",
tags = ["manual"],
directory = ":node_modules/eslint/dir",
path = "bin/eslint.js",
)

eslint_bin.eslint_binary(
js_binary(
name = "eslint",
data = [":eslintrc"],
visibility = ["//visibility:public"],
data = [
":node_modules/eslint",
],
entry_point = "eslint_entry",
)
4 changes: 4 additions & 0 deletions e2e/eslint/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"Bazel dependencies"
bazel_dep(name = "aspect_rules_lint", dev_dependency = True, version = "0.0.0")
bazel_dep(name = "aspect_bazel_lib", version = "1.30.2")
bazel_dep(name = "aspect_rules_js", version = "1.25.1", dev_dependency = True)
bazel_dep(name = "aspect_rules_ts", version = "1.3.3", dev_dependency = True)
bazel_dep(name = "bazel_skylib", dev_dependency = True, version = "1.4.1")
Expand All @@ -25,6 +26,9 @@ npm.npm_translate_lock(
name = "npm",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
public_hoist_packages = {
"@typescript-eslint/eslint-plugin": [""],
},
)

use_repo(npm, "npm")
Loading

0 comments on commit 1754383

Please sign in to comment.