forge-lang-node

martimramos's avatarfrom martimramos

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

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 21, 2025

When & Why to Use This Skill

This Claude skill streamlines Node.js development by enforcing industry-standard practices for testing, linting, and formatting. It provides a comprehensive framework for managing JavaScript projects using Jest, Vitest, ESLint, and Prettier, ensuring code quality and consistency through automated workflows and structured project organization.

Use Cases

  • Automating Code Quality: Quickly identify and fix syntax errors or formatting inconsistencies using ESLint and Prettier integration.
  • Implementing Test-Driven Development (TDD): Execute unit tests with Jest or Vitest, utilizing watch mode and coverage reports to ensure robust feature implementation.
  • Project Standardization: Establish a professional directory structure and manage essential package.json scripts for efficient build and test cycles.
  • Pre-commit Verification: Use combined check commands to validate both linting and testing status before code submission or deployment.
nameforge-lang-node
descriptionNode.js development standards including jest/vitest, eslint, and prettier. Use when working with JavaScript files, package.json, or npm/pnpm.

Node.js Development

Testing

# 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

# Run eslint
npm run lint

# Fix auto-fixable issues
npm run lint -- --fix

Formatting

# 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

{
  "scripts": {
    "test": "jest",
    "lint": "eslint src/",
    "format": "prettier --write .",
    "check": "npm run lint && npm run test"
  }
}

TDD Cycle Commands

# 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