mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add no-emdash/endash rule to agent instructions and CI lint (#24375)
Add a lint check that prevents introduction of Unicode emdash (U+2014) and endash (U+2013) characters. These are almost exclusively introduced by AI agents and conflict with the project writing style. The lint script (scripts/check_emdash.sh) checks only added lines in the current diff by default, so existing violations do not block CI. Pass --all to scan the entire repo for auditing. Agent instructions in AGENTS.md, site/AGENTS.md, and the docs style guide now explicitly ban emdash, endash, and " -- " as punctuation, with guidance to use commas, semicolons, or periods instead.
This commit is contained in:
+4
-1
@@ -71,8 +71,11 @@ When investigating or editing TypeScript/React code, always use the TypeScript l
|
||||
If sibling components initialize state with `useMemo`, don't switch to
|
||||
`useState(initialFn)` in the same file without reason.
|
||||
- Match errors by error code or HTTP status, never by comparing error
|
||||
message strings. String matching is brittle — messages change, get
|
||||
message strings. String matching is brittle; messages change, get
|
||||
localized, or get reformatted.
|
||||
- Do not use emdash (U+2014), endash (U+2013), or ` -- ` as punctuation
|
||||
in code, comments, string literals, or documentation. Use commas,
|
||||
semicolons, or periods instead. Restructure the sentence if needed.
|
||||
|
||||
## TypeScript Type Safety
|
||||
|
||||
|
||||
Reference in New Issue
Block a user