no-em-dash pre-commit hook for user-facing strings, existing em-dashes rewritten
frontend/scripts/no-em-dash.ts walks src/ with the TypeScript parser and flags an em-dash in JSX text, string literals and template text. A bare "—" placeholder passes, separators go in no-em-dash.allow.json. The script is identical to index's copy.
This commit is contained in:
@@ -117,12 +117,12 @@ function Machines() {
|
||||
{String(provisioner.name)} can start{" "}
|
||||
{(provisioner.profiles as string[]).join(", ")}
|
||||
{outstanding.length > 0
|
||||
? ` — asked for ${outstanding
|
||||
? `. Asked for ${outstanding
|
||||
.map((job) => `${job.profile} (job ${job.job})`)
|
||||
.join(", ")}`
|
||||
: ""}
|
||||
{provisioner.last_error
|
||||
? ` — last failed: ${String(provisioner.last_error)}`
|
||||
? `. Last failed: ${String(provisioner.last_error)}`
|
||||
: ""}
|
||||
</p>
|
||||
)
|
||||
@@ -269,7 +269,7 @@ function Flavors() {
|
||||
<span className="font-mono text-xs text-muted-foreground">
|
||||
{flavor.cpus} cpu · {Math.round((flavor.ram ?? 0) / 1024)} GB
|
||||
{flavor.gpus ? ` · ${flavor.gpus} gpu` : ""}
|
||||
{flavor.description ? ` — ${flavor.description}` : ""}
|
||||
{flavor.description ? ` · ${flavor.description}` : ""}
|
||||
</span>
|
||||
</span>
|
||||
{mayEdit ? (
|
||||
|
||||
Reference in New Issue
Block a user