Guidance for AI review agents working in this repository. This repo
(demo-javascript) intentionally contains sample JavaScript issues used to
demonstrate DeepSource analysis, so some "problems" are deliberate.
- Small Node.js (ESM,
"type": "module") demo. Entry points:index.js(assorted lint samples) andserver.js(an Express app with intentional security smells). - Purpose is demonstration of static analysis findings — not production code. Treat intentional demo issues accordingly (see Suppressions).
server.js— Replace the deprecatedrequestlibrary withaxios. New HTTP calls must not userequest. (category: issue)server.js—helmet.expectCt({ enforce: ... })must beenforce: truein any real deployment;falsedisables Certificate Transparency enforcement. (category: security)*.js— Use strict equality (===/!==). Loose==/!=and accidental assignment in conditionals (e.g.if (x = 2 ...)) must be flagged. (category: issue)*.js— Nodebuggerstatements in committed code. (category: issue)
index.js—console.log/console.errorusage is expected in this demo file; do not raise no-console issues here. (category: style)README.md,*.md— Documentation code snippets are illustrative; do not raise lint issues on fenced code blocks. (category: style)server.js— The bareres.send('hello')root handler is a placeholder; do not suggest response-shape or content-type improvements. (category: style)
server.js— This file deliberately demonstrates insecure defaults (disabled CT enforcement, deprecated HTTP client). When reviewing real changes here, prioritize security categories. (category: security)- Never introduce hardcoded secrets, tokens, or credentials in any file. (category: security)
- ESM only (
import/export), matching"type": "module". Do not add CommonJSrequirein new files. (category: style) - Prefer
const/letovervar; template literals over string concatenation. (category: style)