JavaScript Lint API
POST /api/lint/javascript $0.002 per call
USDC on Base · x402
JavaScript / Node lint: POST {code}, get the bugs back with line numbers. Syntax errors come from the real V8 parser (compile-only — code is never executed), plus deterministic checks: loose == coercion, assignment in conditions, comparisons with NaN, const reassignment (runtime TypeError), var pitfalls, unused variables, leftover console.log. Handles ESM imports, template literals, regex. No AI. Max 128 KB.
Parameters
| Name | In | Description | |
|---|---|---|---|
code | body | required | JavaScript/Node source to lint, max 128 KB |
Example request
curl -X POST "https://api.webbersites.com/api/lint/javascript" \
-H "Content-Type: application/json" \
-d '{"code":"const limit = 10;\nif (value == NaN) { stop(); }\nlimit = 20;"}'
# first call returns 402 + payment requirements; an x402 client pays and retries automaticallyExample response
{
"language": "javascript",
"syntax": {
"ok": true,
"errors": []
},
"issues": [
{
"line": 2,
"severity": "error",
"rule": "nan-compare",
"message": "nothing is ever == NaN — this comparison is always false",
"hint": "use Number.isNaN(x)"
}
],
"counts": {
"error": 2,
"warning": 0,
"info": 0
},
"verdict": "errors"
}MCP tool: post_lint_javascript — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.
How payment works
There is no signup and no API key. Call the endpoint; it replies 402 Payment Required with machine-readable payment requirements. Your client signs a USDC transfer authorization (EIP-3009, gasless) and retries with the X-PAYMENT header — @x402/fetch does this automatically. See the overview for a working snippet.