diff --git a/eslint.config.mjs b/eslint.config.mjs index c2ca5e3a..6b175387 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -35,6 +35,24 @@ const eslintConfig = [ 'react-hooks/incompatible-library': 'off', }, }, + { + // User-facing copy in src/components and src/app should never use + // em-dashes (—) in JSX text. The user reads em-dashes as a + // tell-tale "AI-generated" marker; we prefer periods, commas, or + // simple hyphens. Code comments / audit-log strings / templates + // outside these directories are exempt. + files: ['src/components/**/*.tsx', 'src/app/**/*.tsx'], + rules: { + 'no-restricted-syntax': [ + 'warn', + { + selector: "JSXText[value=/\\u2014/]", + message: + 'No em-dash in user-facing JSX text. Use period, comma, or hyphen instead.', + }, + ], + }, + }, { // Tests assert response shape via expect() — narrowing every // `res.json()` to a structural type adds boilerplate without catching diff --git a/src/components/documents/document-detail.tsx b/src/components/documents/document-detail.tsx index cde42c4c..de7440b0 100644 --- a/src/components/documents/document-detail.tsx +++ b/src/components/documents/document-detail.tsx @@ -543,7 +543,7 @@ function WatchersCard({ documentId, watchers }: { documentId: string; watchers:

{watchers.length === 0 ? ( -

No one is watching this document yet.

+

No one is watching this document yet.

) : (