Disclosure: I work on VibUI, a paid library of website prompts. It's linked once, at the very end.

Say it's launch morning. You skim the diff, it looks fine, you merge. At noon a friend messages you a screenshot: the testimonials section is live, with "Sarah J., Product Manager" and a five-star rating nobody ever gave you. The tool wrote it. You skimmed past it. The footer also still says "Lorem ipsum dolor sit amet."

You could promise yourself to read more carefully. Or you could make the computer read for you, for free, in a few lines.

A content lint is a script that searches changed files for strings you never want to ship by accident. It's blunt on purpose. It will sometimes flag something that's fine, and you can override it. What it won't do is let a fake testimonial slip through because you were tired.

Save it as scripts/content-lint.sh:

#!/usr/bin/env bash
# Flags placeholder text and likely invented proof in staged files.
PATTERNS='lorem ipsum|TODO|TBC|john doe|jane doe|your company|acme|trusted by [0-9]|join [0-9,]+|[0-9]+% (increase|boost|more|faster)|as seen (in|on)|5 stars'

files=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(html|jsx|tsx|vue|svelte|md|mdx)$')
[ -z "$files" ] && exit 0

hits=$(rg -n -i -e "$PATTERNS" $files)
if [ -n "$hits" ]; then
  echo "Content lint: possible placeholder or invented proof:"
  echo "$hits"
  echo "Fix it, or commit with --no-verify if it is real and approved."
  exit 1
fi

Hook it up:

chmod +x scripts/content-lint.sh
printf '#!/usr/bin/env bash\nscripts/content-lint.sh\n' > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

It uses ripgrep. Swap in grep -nEi if you don't have it. File names with spaces will confuse the simple loop, so keep the names tidy.

| Pattern | Catches | |---|---| | lorem ipsum ,TODO ,TBC | Placeholders and your own unfinished markers | | john doe ,jane doe ,your company ,acme | Template names | | trusted by [0-9] ,join [0-9,]+ | Made-up audience claims | | [0-9]+% (increase | boost | | {% raw %}as seen (in | on) , 5 stars` |

Tune the list to your project. When the lint flags something real (say, a statistic you measured), add a comment pointing to the source and move on.

Hooks can be skipped, so check pull requests as well:

name: content-lint
on: [pull_request]
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: sudo apt-get install -y ripgrep
      - run: |
          if rg -n -i -e 'lorem ipsum|TODO|john doe|trusted by [0-9]' src/; then exit 1; fi

A lint catches mistakes after the fact. The cheaper fix is a rule in the prompt, so the tool doesn't write them:

Don't invent testimonials, ratings, statistics, customer counts or logos.
Where proof would go, leave a line containing the exact text TODO real proof.

That marker is on the lint's list, so the two work together. The rule works in v0, Lovable, Bolt, Cursor, Windsurf, Claude, ChatGPT, Gemini, Replit, GitHub Copilot, Framer AI, Google Stitch, Readdy, Aura.build, OpenAI Codex.

Fewer invented sections means fewer lint hits. If you want starting layouts where you fill the proof in yourself: VibUI is the library I work on: 2,852 website prompt templates (775 pages, 1,100 sections, 817 components, 160 animated backgrounds), about 1,000 of them with source code. It's one-time pricing with no auto-renewal: $48 quarterly, $99 yearly, $179 lifetime (listed down from $384). Yearly and lifetime also include 2,407 AI video prompts. There are 60 free samples, and a free account can copy 2 prompts. Open a free sample and run the lint on it.

原文来源:dev.to