redline
LowAI tellsem-dash

Em or en dash

Em or en dash. An em or en dash (—) in a comment or string. It is the most-cited tell of machine-written text.

This is how the comment reads inline, under the flagged line.

Why it matters

Readers now take the em dash as a sign nobody edited the text. In logs and UI strings it also breaks grep and plain-ASCII terminals.

What to do

Use a comma, colon, parentheses or a plain hyphen, or split the sentence.

Examples

Flagged
throw new Error("Upload failed — try again");
Better
throw new Error("Upload failed. Try again.");

What it catches

It reads a pattern on each line, aware of strings and comments. Languages: Any file. Scope: All files. These cases are the rule's own tests: the first set must be flagged and the second must not.

Flagged

const s = "fast — and cheap";
// one – two

Left alone

const s = "fast - and cheap";
const a = b - c;

Research

Em and en dashes (U+2014, U+2013) in comments and strings. Readers take them as a sign of unedited generated text, and they break plain-ASCII grep and terminals.

Turn it off or change it

In a config file for the CLI, or in the API's rules field:

{
  "rules": {
    "disable": [
      "em-dash"
    ],
    "severity": {
      "em-dash": "medium"
    }
  }
}

Read the source or report a false positive.