0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-22 04:59:34 +01:00
mongodb/bazel/format/BUILD.bazel
auto-revert-processor 9cad6d1fb4 Revert "SERVER-90583: Add Ruff to bazel //:format target (#22268)"
This reverts commit c7bf1f40180c861f4418898fd34aa1097438456c.

GitOrigin-RevId: 2e57b7804ad7b55034b8d19da29e93b989539dd6
2024-05-17 00:55:08 +00:00

25 lines
684 B
Python

load("@npm//:prettier/package_json.bzl", prettier = "bin")
# TODO: SERVER-82329 eslint binary should almost exactly mirror prettier binary
# To update prettier change the version in package.json
# Run `pnpm install`
# Commit changes
prettier.prettier_binary(
name = "prettier",
# Allow the binary to be run outside bazel
# See more details about this by commenting this out and running `bazel run //:format`
env = {"BAZEL_BINDIR": "."},
)
py_binary(
name = "format",
srcs = ["format.py"],
args = [
"--prettier",
"$(location :prettier)",
],
data = [":prettier"],
main = "format.py",
visibility = ["//visibility:public"],
)