@promptshield/ignore
v2.0.0
Published
Ignore directive parser and threat filtering utilities for PromptShield. Provides file-level and line-level suppression logic for CLI and IDE integrations.
Downloads
10,050
Maintainers
Readme
@promptshield/ignore
Ignore parser for PromptShield. Provides file-level and line-level suppression logic for CLI and IDE integrations.
✨ Features
- Standard Syntax: Similar to
eslint-disableorts-ignore. - Granular Control: Ignore specific lines, blocks, or entire files.
- File Exclusions: Supports
.promptshieldignore,.psignore, and.gitignore.
📦 Installation
$ pnpm add @promptshield/ignore🚀 Usage
In your PROMPTS (or code)
Ignore next line
<!-- promptshield-ignore -->
I want to use a specific invisible character here: Ignore block (next N lines)
<!-- promptshield-ignore next 5 -->
This block contains highly suspicious
text patterns that are actually
safe in this context.
...Ignore entire file
Must be placed in the first 10 lines of the file.
<!-- promptshield-ignore all -->
# Suspicious File
...In .promptshieldignore
Add patterns to exclude from scanning completely:
node_modules
dist
**/*.min.js
legacy-prompts/*.txt📚 Deep Dives: For advanced ignore semantics (like targeting specific rules e.g.,
PSI001) and reading about Unused Ignore tracking, see the Documentation section.
License
This library is licensed under the MIT open-source license.
