eslint-plugin-ai-guard 1.1.9 โ†’ 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,11 +28,35 @@ npx ai-guard run # recommended preset (lowest noise)
28
28
  npx ai-guard run --strict
29
29
  npx ai-guard run --security
30
30
  npx ai-guard init # auto-creates ESLint config for you
31
+ npx ai-guard init --dry-run
31
32
  npx ai-guard doctor # diagnoses setup issues
32
33
  npx ai-guard baseline # track only *new* issues going forward
33
34
  ```
34
35
  That's it. **Zero configuration required.**
35
36
 
37
+ ## ๐Ÿค– Set Up AI Agent Rules
38
+
39
+ Generate instruction files so Claude Code, Cursor, and GitHub Copilot
40
+ automatically avoid the 17 most common AI-generated anti-patterns:
41
+
42
+ ```bash
43
+ npx ai-guard init-context
44
+ ```
45
+
46
+ Follow the prompts to select your agent(s). Or generate all at once:
47
+
48
+ ```bash
49
+ npx ai-guard init-context --all
50
+ ```
51
+
52
+ This writes:
53
+ - `CLAUDE.md` โ€” read automatically by Claude Code
54
+ - `.cursorrules` โ€” read automatically by Cursor
55
+ - `.github/copilot-instructions.md` โ€” read automatically by GitHub Copilot
56
+
57
+ Your AI tools will now avoid these patterns before you even run the linter.
58
+ Use `--force` to regenerate after upgrading to a new version with new rules.
59
+
36
60
  ## ๐Ÿงช Real-World Usage Philosophy
37
61
 
38
62
  `ai-guard` is designed for production adoption in existing codebases:
@@ -62,7 +86,8 @@ const users = await Promise.all(userIds.map(async (id) => {
62
86
 
63
87
  ### Terminal Output
64
88
 
65
- ![ai-guard linting demo](./assets/demo.png)
89
+ ![ai-guard linting demo](./assets/example_1.png)
90
+ ![ai-guard linting demo](./assets/example_2.png)
66
91
 
67
92
  *The terminal output above shows `ai-guard` catching multiple AI-generated anti-patterns in a single run.*
68
93
 
@@ -102,7 +127,7 @@ const users = await Promise.all(userIds.map(async (id) => {
102
127
  Disallow dynamic `eval()` or `new Function()`.
103
128
  - **`ai-guard/no-sql-string-concat`** (Warn in `recommended`, Error in `security`/`strict`)
104
129
  Disallow variable concatenation/interpolation in SQL queries. AI tools frequently generate dangerous code enabling SQL injection.
105
- - **`ai-guard/no-unsafe-deserialize`** (Warn)
130
+ - **`ai-guard/no-unsafe-deserialize`** (Warn in `recommended`/`security`, Error in `strict`)
106
131
  Disallow `JSON.parse()` on likely untrusted inputs (like `req.body`) without visible validation.
107
132
  - **`ai-guard/require-auth-middleware`** (Warn)
108
133
  Enforce authentication middleware on Express/Fastify routes. AI tools frequently generate unprotected endpoints exposing sensitive data.