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:
@@ -293,7 +293,7 @@ export function FlowDock({
|
||||
saving={saving}
|
||||
publishing={publishing}
|
||||
offline={!connected}
|
||||
draftHint="Saved — publish to put it live"
|
||||
draftHint="Saved. Publish to put it live"
|
||||
onPublish={onPublish}
|
||||
/>
|
||||
</Dock>
|
||||
|
||||
@@ -1139,7 +1139,7 @@ function FlowEditorInner({
|
||||
JSON.stringify({ nodes: picked, sources } satisfies NodeClipboard),
|
||||
)
|
||||
if (!stored) {
|
||||
notify("That is too much to copy — the browser store is full.", "error")
|
||||
notify("That is too much to copy. The browser store is full.", "error")
|
||||
}
|
||||
}, [canvasNodes, definitions, flowName, selectedId, sourceTypes])
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ const NODE_ICONS = {
|
||||
const STATUS_STYLES = {
|
||||
queued: {
|
||||
dot: "bg-muted-foreground",
|
||||
label: "Queued — waiting for a machine",
|
||||
label: "Queued, waiting for a machine",
|
||||
},
|
||||
running: { dot: "bg-primary animate-pulse", label: "Running" },
|
||||
success: { dot: "bg-status-success", label: "Last run succeeded" },
|
||||
@@ -282,7 +282,7 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
|
||||
)}
|
||||
aria-label={
|
||||
failedEarlier
|
||||
? `Failed at ${failedAt} — show the traceback`
|
||||
? `Failed at ${failedAt}. Show the traceback`
|
||||
: "Show what this node printed"
|
||||
}
|
||||
data-testid="node-traceback"
|
||||
@@ -299,7 +299,7 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
{failedEarlier
|
||||
? `Failed at ${failedAt} — show the traceback`
|
||||
? `Failed at ${failedAt}. Show the traceback`
|
||||
: "Show the traceback"}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
|
||||
Reference in New Issue
Block a user