-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Create a minimal AGENTS.md for the NodeSecure repositories:
- CLI
- scanner
- JS-X-Ray
- vulnera
- report
- ossf-scorecard-sdk
- npm-registry-sdk
- npm-security-fetcher
- landing
Here is a first draft of template
# ${name} Agent Guide
## Build & Test Commands
\```
# Build the project
npm run build
# Run all tests
npm test
# Run a single test file
node --test 'test/path/to/file.test.ts'
# Lint the code
npm run lint
\```
## Code Style Guidelines
- **TypeScript**: Strict typing with explicit type imports `import type { X }`. Avoid `any` all the times. Ensure types compliance.
- **Formatting**: Use UTF-8, LF line endings, 2-space indentation (no tabs), a final newline, and trim trailing whitespace.
- **Imports**: Strict order — Node.js core → Third-party → Internal — each group preceded by a comment (`// Import Node.js Dependencies`, etc.). Always use the `node:` prefix for core modules; never require().
- **Naming**: PascalCase for classes, camelCase for variables/functions, `#` prefix for private fields, ALL_CAPS for exported constants, `k`+PascalCase for file-local constants. Place all constants beneath imports under a `// CONSTANTS` comment.
- **API Design**: Consistent API interface with options objects and promise-based returns.
- **Testing**: Node.js test runner with deep assertions. Use deepStrictEqual when appropriate. Never modify the src folder. The test file for src/foo/bar/baz.ts is test/foo/bar/baz.test.ts
- **Comments**: always on the preceding line, never inline. Keep them concise.
- **Quotes**: double quotes or template literals; never single quotes.
- **Returns**: always add a blank line before return inside functions.
## Node Requirements
- Node.js >= 22.18.0 or >= 24.6.0Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels