Skip to content

Commit

Permalink
chore(deps): upgrade rules_js and friends to final (#493)
Browse files Browse the repository at this point in the history
Also update linter install to current recommendation
  • Loading branch information
alexeagle authored Sep 3, 2024
1 parent 58949bd commit e071520
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
3 changes: 0 additions & 3 deletions frontend/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
"Root BUILD file for all frontend examples"

load("@npm//:defs.bzl", "npm_link_all_packages")
load("@npm//:eslint/package_json.bzl", eslint_bin = "bin")

package(default_visibility = ["//:__subpackages__"])

# Create the root of the "virtual store" of npm dependencies under bazel-out.
# This must be done in the package where the pnpm workspace is rooted.
npm_link_all_packages(name = "node_modules")

eslint_bin.eslint_binary(name = "eslint")
14 changes: 7 additions & 7 deletions frontend/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

bazel_dep(name = "aspect_bazel_lib", version = "2.8.1")
bazel_dep(name = "aspect_rules_lint", version = "1.0.0-rc4")
bazel_dep(name = "aspect_rules_jest", version = "0.22.0-rc0")
bazel_dep(name = "aspect_rules_js", version = "2.0.0-rc1")
bazel_dep(name = "aspect_rules_swc", version = "2.0.0-rc0")
bazel_dep(name = "aspect_rules_ts", version = "3.0.0-rc0")
bazel_dep(name = "aspect_rules_rollup", version = "2.0.0-rc0")
bazel_dep(name = "aspect_rules_webpack", version = "0.16.0-rc0")
bazel_dep(name = "aspect_rules_jest", version = "0.22.0")
bazel_dep(name = "aspect_rules_js", version = "2.0.0")
bazel_dep(name = "aspect_rules_swc", version = "2.0.0")
bazel_dep(name = "aspect_rules_ts", version = "3.1.0")
bazel_dep(name = "aspect_rules_rollup", version = "2.0.0")
bazel_dep(name = "aspect_rules_webpack", version = "0.16.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_nodejs", version = "6.1.1")
bazel_dep(name = "rules_nodejs", version = "6.2.0")

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "20.13.1")
Expand Down
6 changes: 3 additions & 3 deletions frontend/packages/one/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"esModuleInterop": true,
}
"esModuleInterop": true,
},
"exclude": []
}
2 changes: 1 addition & 1 deletion frontend/react/src/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")
load("//:lint.bzl", "eslint_test")
load("//:vitest.bzl", "vitest")
load("//react:defs.bzl", "ASSET_PATTERNS", "SRC_PATTERNS", "TEST_PATTERNS", "TRANSPILER")
load("//tools/lint:linters.bzl", "eslint_test")

js_library(
name = "assets",
Expand Down
3 changes: 2 additions & 1 deletion frontend/react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"declaration": true,
"jsx": "react-jsx"
},
"include": ["src"]
"include": ["src"],
"exclude": []
}
3 changes: 3 additions & 0 deletions frontend/tools/lint/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
load("@npm//:eslint/package_json.bzl", eslint_bin = "bin")

eslint_bin.eslint_binary(name = "eslint")
8 changes: 5 additions & 3 deletions frontend/lint.bzl → frontend/tools/lint/linters.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
load("@aspect_rules_lint//lint:eslint.bzl", "lint_eslint_aspect")
load("@aspect_rules_lint//lint:lint_test.bzl", "lint_test")

# NB: use of explicit Label constructor avoids our strings being interpreted
# in the context of aspect_rules_lint.
eslint = lint_eslint_aspect(
binary = "@@//:eslint",
binary = Label(":eslint"),
configs = [
"@@//react:package_json",
"@@//next.js:eslintrc",
Label("//react:package_json"),
Label("//next.js:eslintrc"),
],
)

Expand Down

0 comments on commit e071520

Please sign in to comment.