# ast-grep Rule Template
# Place in project root or rules/ directory
# Run with: sg scan

id: rule-id-here
language: typescript  # js, python, go, rust, etc.

rule:
  # Basic pattern match
  pattern: console.log($$$)

  # Or use conditions:
  # any:
  #   - pattern: console.log($$$)
  #   - pattern: console.warn($$$)
  #
  # not:
  #   pattern: console.error($$$)
  #
  # inside:
  #   pattern: function $_ { $$$ }

message: "Description of the issue"
severity: warning  # error | warning | info | hint

# Optional auto-fix
# fix: "replacement using $METAVARS"

# Optional additional context
# note: "Explanation for developers"

# Optional metadata
# metadata:
#   category: security
#   references:
#     - https://example.com/docs
