prodlint 0.2.1 → 0.3.0
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 +88 -4
- package/dist/cli.js +1106 -59
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1106 -59
- package/dist/mcp.js +1106 -59
- package/package.json +12 -4
- package/dist/cli.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mcp.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/prodlint/prodlint/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/prodlint)
|
|
5
|
+
[](https://www.npmjs.com/package/prodlint)
|
|
6
|
+
[](https://prodlint.com)
|
|
5
7
|
[](https://opensource.org/licenses/MIT)
|
|
6
8
|
|
|
7
9
|
Scan AI-generated projects for production readiness issues.
|
|
@@ -20,6 +22,33 @@ prodlint catches what TypeScript and ESLint miss: **production readiness gaps**.
|
|
|
20
22
|
npx prodlint
|
|
21
23
|
```
|
|
22
24
|
|
|
25
|
+
## Example Output
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
prodlint v0.2.2
|
|
29
|
+
Scanned 142 files in 87ms
|
|
30
|
+
|
|
31
|
+
src/app/api/users/route.ts
|
|
32
|
+
8:1 CRIT API route has no authentication check auth-checks
|
|
33
|
+
8:1 WARN API route has no rate limiting rate-limiting
|
|
34
|
+
|
|
35
|
+
src/components/chat.tsx
|
|
36
|
+
24:5 CRIT Hardcoded Stripe secret key detected secrets
|
|
37
|
+
|
|
38
|
+
src/lib/db.ts
|
|
39
|
+
15:1 CRIT SQL query built with template literal interpolation sql-injection
|
|
40
|
+
|
|
41
|
+
Scores
|
|
42
|
+
security 40 ████████░░░░░░░░░░░░
|
|
43
|
+
reliability 70 ██████████████░░░░░░
|
|
44
|
+
performance 95 ███████████████████░
|
|
45
|
+
ai-quality 88 ██████████████████░░
|
|
46
|
+
|
|
47
|
+
Overall: 73/100
|
|
48
|
+
|
|
49
|
+
3 critical · 4 warnings · 2 info
|
|
50
|
+
```
|
|
51
|
+
|
|
23
52
|
## Usage
|
|
24
53
|
|
|
25
54
|
```bash
|
|
@@ -31,7 +60,7 @@ npx prodlint --ignore "*.test.ts" # Ignore patterns
|
|
|
31
60
|
|
|
32
61
|
## What It Checks
|
|
33
62
|
|
|
34
|
-
prodlint runs **11 rules** across
|
|
63
|
+
prodlint runs **11 rules** across 3 categories:
|
|
35
64
|
|
|
36
65
|
### Security
|
|
37
66
|
| Rule | Severity | What it detects |
|
|
@@ -64,9 +93,7 @@ Each category starts at 100 points. Deductions:
|
|
|
64
93
|
- **Warning**: -3 points
|
|
65
94
|
- **Info**: -1 point
|
|
66
95
|
|
|
67
|
-
Overall score = average of all
|
|
68
|
-
|
|
69
|
-
Exit code is `1` if any critical findings exist, `0` otherwise.
|
|
96
|
+
Overall score = average of all category scores. Exit code is `1` if any critical findings exist, `0` otherwise.
|
|
70
97
|
|
|
71
98
|
## Smart Detection
|
|
72
99
|
|
|
@@ -77,6 +104,63 @@ prodlint avoids common false positives:
|
|
|
77
104
|
- **TypeScript path aliases** — `@/`, `~/`, and custom tsconfig paths aren't flagged as hallucinated imports
|
|
78
105
|
- **Route exemptions** — auth, webhook, health, and cron routes are exempt from auth/rate-limit checks
|
|
79
106
|
|
|
107
|
+
## GitHub Action
|
|
108
|
+
|
|
109
|
+
Add prodlint to your CI pipeline. It posts a score summary as a PR comment and can fail builds below a threshold.
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
- uses: prodlint/prodlint@v1
|
|
113
|
+
with:
|
|
114
|
+
threshold: 70 # Fail if score < 70 (optional)
|
|
115
|
+
comment: true # Post PR comment (default: true)
|
|
116
|
+
ignore: '*.test.ts, __mocks__/**' # Ignore patterns (optional)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Inputs:**
|
|
120
|
+
| Input | Default | Description |
|
|
121
|
+
|-------|---------|-------------|
|
|
122
|
+
| `path` | `.` | Path to scan |
|
|
123
|
+
| `threshold` | `0` | Minimum score to pass (0-100) |
|
|
124
|
+
| `ignore` | `''` | Comma-separated glob patterns to ignore |
|
|
125
|
+
| `comment` | `true` | Post a PR comment with results |
|
|
126
|
+
|
|
127
|
+
**Outputs:**
|
|
128
|
+
| Output | Description |
|
|
129
|
+
|--------|-------------|
|
|
130
|
+
| `score` | Overall score (0-100) |
|
|
131
|
+
| `critical` | Number of critical findings |
|
|
132
|
+
|
|
133
|
+
## MCP Server
|
|
134
|
+
|
|
135
|
+
prodlint ships an MCP server for AI coding tools (Cursor, Claude Code, Windsurf, etc.).
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npx prodlint-mcp
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Claude Code
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
claude mcp add prodlint npx prodlint-mcp
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Cursor / Windsurf
|
|
148
|
+
|
|
149
|
+
Add to your MCP config:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"mcpServers": {
|
|
154
|
+
"prodlint": {
|
|
155
|
+
"command": "npx",
|
|
156
|
+
"args": ["prodlint-mcp"]
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The MCP server exposes a single `scan` tool that accepts a project path and returns the full score breakdown with findings.
|
|
163
|
+
|
|
80
164
|
## Suppressing Findings
|
|
81
165
|
|
|
82
166
|
Suppress a single line:
|