Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 615 Bytes

File metadata and controls

35 lines (26 loc) · 615 Bytes

Contributing

Development Setup

pnpm install
pnpm run build

Testing

Run the test suite:

pnpm test          # Watch mode
pnpm run test:run  # Single run
pnpm run lint      # Dogfood: lint this plugin with itself

Fixture-Based Testing

Tests use fixture files with expected complexity values in comments:

// @complexity myFunction:cyclomatic=3,cognitive=5
function myFunction(x) {
  if (x > 0) {
    for (const item of items) {
      process(item);
    }
  }
}

Add fixtures to tests/fixtures/ organized by file type (e.g., js/, ts/, jsx/, vue/).