# Forge Lang Node

> Node.js development standards including jest/vitest, eslint, and prettier. Use when working with JavaScript files, package.json, or npm/pnpm.

- Skill: `majiayu000/forge-lang-node` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/forge-lang-node`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/forge-lang-node/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/forge-lang-node

---


# Node.js Development

## Testing

```bash
# Run all tests
npm test

# Run with coverage
npm test -- --coverage

# Run in watch mode
npm test -- --watch

# Run specific test
npm test -- --testPathPattern=module.test
```

## Linting

```bash
# Run eslint
npm run lint

# Fix auto-fixable issues
npm run lint -- --fix
```

## Formatting

```bash
# Format with prettier
npm run format

# Check without changing
npx prettier --check .
```

## Project Structure

```
project/
├── src/
│   ├── index.js
│   └── module.js
├── tests/
│   └── module.test.js
├── package.json
└── README.md
```

## package.json Scripts

```json
{
  "scripts": {
    "test": "jest",
    "lint": "eslint src/",
    "format": "prettier --write .",
    "check": "npm run lint && npm run test"
  }
}
```

## TDD Cycle Commands

```bash
# RED: Write test, run to see it fail
npm test -- --testPathPattern=new_feature

# GREEN: Implement, run to see it pass
npm test -- --testPathPattern=new_feature

# REFACTOR: Clean up, ensure tests still pass
npm run check
```

