Claude-skill-registry configuring-javascript-stack

JavaScript/TypeScript stack configuration - pnpm, prettier, eslint, vitest with 96% coverage threshold

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/configuring-javascript-stack" ~/.claude/skills/majiayu000-claude-skill-registry-configuring-javascript-stack && rm -rf "$T"
manifest: skills/data/configuring-javascript-stack/SKILL.md
source content

JavaScript/TypeScript Stack

Standards Compliance

StandardLevelStatus
aug-just/justfile-interfaceBaseline (Level 0)✓ Full
development-stack-standardsLevel 2✓ Complete

Dimensions: 11/13 (Foundation + Quality Gates + Security)

Toolchain

ToolUse
pnpmPackage manager
TypeScriptType-safe JavaScript
prettierCode formatter
eslintLinter (complexity check)
vitestTesting framework
tsxTypeScript execution

Stack Dimensions

DimensionToolLevel
Package managerpnpm0
Formatprettier0
Linteslint0
Typechecktsc0
Testvitest0
Coveragevitest (96%)1
Complexityeslint (≤10)1
Test watchvitest1
LOCcloc1
Depspnpm outdated2
Vulnspnpm audit2
Licenselicense-checker2
SBOM@cyclonedx/cyclonedx-npm2

Quick Reference

pnpm install
pnpm prettier --write .
pnpm eslint . --fix --max-complexity 10
pnpm tsc --noEmit
pnpm vitest run tests/unit --reporter=verbose
pnpm vitest run tests/unit --coverage --coverage.lines=96

Docker Compatibility

Web services: Bind to

0.0.0.0
(not
127.0.0.1
)

const host = process.env.HOST || '0.0.0.0'
const port = parseInt(process.env.PORT || '3000', 10)

app.listen(port, host)

Standard Justfile Interface

Implements: aug-just/justfile-interface (Level 0 baseline) Requires: aug-just plugin for justfile management

set shell := ["bash", "-uc"]

# Show all available commands
default:
    @just --list

# Install dependencies and setup development environment
dev-install:
    pnpm install

# Format code (auto-fix)
format:
    pnpm prettier --write .

# Lint code (auto-fix, complexity threshold=10)
lint:
    pnpm eslint . --fix --max-complexity 10

# Type check code
typecheck:
    pnpm tsc --noEmit

# Run unit tests
test:
    pnpm vitest run tests/unit --reporter=verbose

# Run tests in watch mode
test-watch:
    pnpm vitest tests/unit

# Run unit tests with coverage threshold (96%)
coverage:
    pnpm vitest run tests/unit --coverage --coverage.lines=96

# Run integration tests with coverage report (no threshold)
integration-test:
    pnpm vitest run tests/integration --coverage

# Detailed complexity report for refactoring decisions
complexity:
    pnpm dlx @pnpm/complexity src

# Show N largest files by lines of code
loc N="20":
    @echo "📊 Top {{N}} largest files by LOC:"
    @pnpm cloc src/ --by-file --quiet | sort -rn | head -{{N}}

# Show outdated packages
deps:
    pnpm outdated

# Check for security vulnerabilities
vulns:
    pnpm audit

# Analyze licenses (flag GPL, etc.)
lic:
    pnpm dlx license-checker --summary

# Generate software bill of materials
sbom:
    pnpm dlx @cyclonedx/cyclonedx-npm --output-file sbom.json

# Build artifacts
build:
    pnpm tsc

# Run all quality checks (format, lint, typecheck, coverage - fastest first)
check-all: format lint typecheck coverage
    @echo "✅ All checks passed"

# Remove generated files and artifacts
clean:
    rm -rf node_modules dist coverage .vitest

tsconfig.json

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "lib": ["ES2022"],
    "outDir": "./dist",
    "rootDir": "./src",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "declaration": true,
    "sourceMap": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist", "tests"]
}

eslint.config.js

import tseslint from '@typescript-eslint/eslint-plugin'
import tsparser from '@typescript-eslint/parser'

export default [
  {
    files: ['**/*.ts', '**/*.tsx'],
    languageOptions: {
      parser: tsparser,
    },
    plugins: {
      '@typescript-eslint': tseslint,
    },
    rules: {
      '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
      '@typescript-eslint/no-explicit-any': 'error',
      'complexity': ['error', 10],
    },
  },
]

vitest.config.ts

import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    coverage: {
      provider: 'v8',
      thresholds: {
        lines: 96,
        functions: 96,
        branches: 96,
        statements: 96,
      },
    },
  },
})

.prettierrc

{
  "semi": false,
  "singleQuote": true,
  "trailingComma": "es5",
  "printWidth": 100,
  "tabWidth": 2
}

Notes

  • Organize tests:
    tests/unit/
    and
    tests/integration/
  • Unit tests run in check-all with 96% threshold
  • No
    any
    types (
    no-explicit-any
    enforced)