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

create-stern-config

v1.0.3

Published

CLI tool to setup ESLint and Prettier configuration for Stern projects

Readme

create-stern-config

Interactive CLI tool to set up ESLint and Prettier configuration for your projects with best practices baked in.

Features

  • Interactive prompts for easy setup
  • Auto-detects package manager (Bun, npm, pnpm, yarn)
  • Strict TypeScript ESLint rules
  • Prettier with import sorting
  • Customizable configuration files
  • Zero config required

Usage

Quick Start

Using npx (npm 5.2+):

npx create-stern-config

Using bunx (Bun):

bunx create-stern-config

Using pnpm:

pnpm dlx create-stern-config

Interactive Setup

The CLI will guide you through:

  1. Selecting configuration files to create:

    • ESLint configuration (eslint.config.js)
    • Prettier configuration (prettier.config.js)
    • Prettier ignore file (.prettierignore)
  2. Adding lint/format scripts to your package.json

  3. Installing all required dependencies

What Gets Installed

The following dependencies are installed as dev dependencies:

  • @eslint/js - ESLint core rules
  • @ianvs/prettier-plugin-sort-imports - Import sorting
  • eslint - JavaScript/TypeScript linter
  • eslint-config-prettier - Disables conflicting ESLint rules
  • eslint-plugin-import - Import/export validation
  • eslint-plugin-jsdoc - JSDoc linting
  • eslint-plugin-n - Node.js specific rules
  • globals - Global variables definitions
  • prettier - Code formatter
  • typescript-eslint - TypeScript ESLint support

Configuration Details

ESLint Rules

The configuration includes:

  • Strict TypeScript checking - No any, proper type safety
  • Code complexity limits - Warns on complex functions
  • Naming conventions - Enforced type parameter naming
  • Import organization - Type imports separated and sorted
  • Security best practices - Prevents common pitfalls
  • Immutability - Encourages readonly properties
  • Test file overrides - Relaxed rules for test files

Prettier Configuration

  • Single quotes
  • 2-space indentation
  • 80-character line width
  • Trailing commas everywhere
  • Always parentheses around arrow function parameters
  • Import sorting by type and source

Scripts Added

After setup, you can use these commands:

# Check for linting errors
npm run lint

# Fix linting errors automatically
npm run lint:fix

# Format code with Prettier
npm run format

# Check formatting without changes
npm run format:check

Requirements

  • Node.js 18.0.0 or higher
  • A package manager (npm, pnpm, yarn, or Bun)

Repository Structure

your-project/
├── eslint.config.js       # ESLint configuration
├── prettier.config.js     # Prettier configuration
├── .prettierignore        # Files to ignore from formatting
└── package.json           # Updated with scripts and dependencies

Customization

All generated files can be customized after creation. The configurations are designed to be extended:

Extending ESLint

import { createBaseConfig } from './eslint.config.js';

export default [
  ...createBaseConfig(import.meta.dirname),
  {
    rules: {
      // Your custom rules
      'no-console': 'off',
    },
  },
];

Extending Prettier

import baseConfig from './prettier.config.js';

export default {
  ...baseConfig,
  printWidth: 100, // Override example
};

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Issues

If you encounter any issues, please report them at: https://github.com/0xstern/create-stern-config/issues

License

MIT © 0xstern

Author

0xstern