0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-29 00:32:18 +01:00
mongodb/bazel/format/BUILD.bazel

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
684 B
Python
Raw Normal View History

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"],
)