tailscale/yarnfmt: add a shortcut to run Yarn formatting
- ID
a0c7966- date
2026-05-28 13:00:28+00:00- author
Alex Chan <alexc@tailscale.com>- parent
bf5d9f2- message
tailscale/yarnfmt: add a shortcut to run Yarn formatting- changed files
2 files, 28 additions, 1 deletion
Changed files
tailscale/README.md (3011) → tailscale/README.md (3355)
diff --git a/tailscale/README.md b/tailscale/README.md
index e323ea4..5d28b70 100644
--- a/tailscale/README.md
+++ b/tailscale/README.md
@@ -45,6 +45,10 @@ scripts = [
"usage": "tsapi.py",
"description": "call the Tailscale API with a local instance of the Tailscale control plane"
},
+ {
+ "usage": "yarnfmt",
+ "description": "run the Yarn formatting/linting commands for the admin console"
+ },
]
cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
@@ -113,5 +117,14 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
<dd>
call the Tailscale API with a local instance of the Tailscale control plane
</dd>
+
+ <dt>
+ <a href="https://github.com/alexwlchan/scripts/blob/main/tailscale/yarnfmt">
+ <code>yarnfmt</code>
+ </a>
+ </dt>
+ <dd>
+ run the Yarn formatting/linting commands for the admin console
+ </dd>
</dl>
-<!-- [[[end]]] (sum: JQyvJ+o4WW) -->
\ No newline at end of file
+<!-- [[[end]]] (sum: BEjnN4Zchx) -->
\ No newline at end of file
tailscale/yarnfmt (0) → tailscale/yarnfmt (315)
diff --git a/tailscale/yarnfmt b/tailscale/yarnfmt
new file mode 100755
index 0000000..458873d
--- /dev/null
+++ b/tailscale/yarnfmt
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+set -o errexit
+set -o nounset
+
+# Print a command in blue, then run the command
+run_command() {
+ echo ""
+ echo -e "\033[34m-> $@\033[0m"
+ bash -c "$@"
+}
+
+run_command './tool/yarn --cwd control/adminhttp/panel run format'
+run_command './tool/yarn --cwd control/adminhttp/panel run lint'