no-prompt-artifacts

FreeAI Behavior

Disallow AI prompt artifacts (conversational text) in code

no-prompt-artifacts

Disallow AI prompt artifacts (conversational text) in code

Category: AI Behavior | Tier: Free

Why This Matters

AI sometimes leaves conversational fragments in the code: "Here is the implementation you requested" or "Sure, I can help with that." These prompt artifacts are a telltale sign of unreviewed AI output and clutter the codebase.

Bad Code

// Here's the implementation you requested:
// Sure, I'll create a function that handles authentication
function authenticate(token: string) {
  return verify(token);
}

Good Code

/** Verify the authentication token. */
function authenticate(token: string) {
  return verify(token);
}

Configuration

This rule accepts configuration options:

[
  {
    "type": "object",
    "properties": {
      "checkComments": {
        "type": "boolean"
      }
    },
    "additionalProperties": false
  }
]

Enabled by default in lintmyai:recommended.