npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@harness-engineering/linter-gen

v0.1.6

Published

Generate ESLint rules from YAML configuration

Readme

@harness-engineering/linter-gen

Generate ESLint rules from YAML configuration using extensible Handlebars templates.

Installation

pnpm add @harness-engineering/linter-gen

Usage

Configuration

Create harness-linter.yml:

version: 1
output: ./generated/eslint-rules

rules:
  - name: no-ui-in-services
    type: import-restriction
    severity: error
    config:
      source: 'src/services/**'
      forbiddenImports:
        - 'react'
        - 'src/ui/**'
      message: 'Service layer cannot import UI code'

CLI

# Generate rules
harness linter generate

# Generate with options
harness linter generate --config ./custom-config.yml --output ./rules --clean

# Validate config only
harness linter validate

Programmatic API

import { generate, validate } from '@harness-engineering/linter-gen';

// Generate rules
const result = await generate({
  configPath: './harness-linter.yml',
  outputDir: './generated',
  clean: true,
});

if (result.success) {
  console.log(`Generated ${result.rulesGenerated.length} rules`);
}

// Validate config
const validation = await validate({ configPath: './harness-linter.yml' });

Built-in Templates

import-restriction

Block imports matching patterns in files matching a source pattern.

- name: no-react-in-services
  type: import-restriction
  config:
    source: 'src/services/**'
    forbiddenImports:
      - 'react'
      - 'react-dom'
    message: 'Service files cannot import React'

boundary-validation

Ensure files export Zod schemas for validation.

- name: api-must-validate
  type: boundary-validation
  config:
    pattern: 'src/api/**/*.ts'
    requireZodSchema: true
    message: 'API endpoints must use Zod validation'

dependency-graph

Detect circular import dependencies.

- name: no-cycles
  type: dependency-graph
  config:
    entryPoints:
      - 'src/index.ts'
    exclude:
      - '**/*.test.ts'
    maxDepth: 20

Custom Templates

Convention-based

Place templates in templates/ directory relative to config:

project/
├── harness-linter.yml
└── templates/
    └── my-custom-type.ts.hbs

Explicit paths

Specify template paths in config:

templates:
  my-custom-type: ./custom-templates/my-rule.ts.hbs

Template Context

Templates receive:

{
  name: 'rule-name',           // kebab-case
  nameCamel: 'ruleName',       // camelCase
  namePascal: 'RuleName',      // PascalCase
  severity: 'error',           // error | warn | off
  config: { ... },             // Template-specific config
  meta: {
    generatedAt: '2026-03-13T...',
    generatorVersion: '0.1.0',
    configPath: '/path/to/config.yml',
  }
}

Handlebars Helpers

  • {{json value}} - JSON.stringify
  • {{jsonPretty value}} - JSON.stringify with formatting
  • {{camelCase "kebab-name"}} - Convert to camelCase
  • {{pascalCase "kebab-name"}} - Convert to PascalCase

License

MIT