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

@carnil/config

v1.1.1

Published

Shared tooling configuration for Carnil SDK packages

Readme

@carnil/config

npm version License: MIT

Shared tooling configuration for Carnil SDK packages. This package provides standardized ESLint, TypeScript, Prettier, Vitest, and TSUP configurations used across all Carnil packages.

Features

  • 🔧 Standardized Configurations - Consistent tooling across all packages
  • 📝 ESLint Rules - Optimized for TypeScript and React development
  • 🎨 Prettier Formatting - Consistent code formatting
  • 📘 TypeScript Config - Base TypeScript configuration
  • 🧪 Vitest Setup - Testing configuration
  • 📦 TSUP Build - Modern bundling configuration

Installation

npm install @carnil/config --save-dev

Usage

ESLint Configuration

// eslint.config.js
import carnilEslint from "@carnil/config/eslint";

export default carnilEslint;

TypeScript Configuration

// tsconfig.json
{
  "extends": "@carnil/config/typescript",
  "compilerOptions": {
    "outDir": "./dist"
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}

Prettier Configuration

// .prettierrc.json
{
  "extends": "@carnil/config/prettier"
}

Vitest Configuration

// vitest.config.ts
import { defineConfig } from "vitest/config";
import carnilVitest from "@carnil/config/vitest";

export default defineConfig({
  ...carnilVitest,
  test: {
    ...carnilVitest.test,
    // Your custom test config
  },
});

TSUP Configuration

// tsup.config.ts
import { defineConfig } from "tsup";
import carnilTsup from "@carnil/config/tsup";

export default defineConfig({
  ...carnilTsup,
  entry: ["src/index.ts"],
  // Your custom build configuration
});

Available Configurations

ESLint (@carnil/config/eslint)

Provides ESLint configuration optimized for:

  • TypeScript projects
  • React components
  • Modern JavaScript features
  • Import/export rules
  • Accessibility best practices

TypeScript (@carnil/config/typescript)

Base TypeScript configuration with:

  • Strict type checking
  • Modern ES features
  • Module resolution
  • Declaration file generation

Prettier (@carnil/config/prettier)

Code formatting rules:

  • 2-space indentation
  • Single quotes
  • Trailing commas
  • Semicolons
  • Print width: 80 characters

Vitest (@carnil/config/vitest)

Testing configuration:

  • TypeScript support
  • Coverage reporting
  • Test environment setup
  • Mock utilities

TSUP (@carnil/config/tsup)

Build configuration:

  • ESM and CommonJS output
  • TypeScript compilation
  • Source maps
  • Declaration files
  • Tree shaking

Package.json Scripts

Add these scripts to your package.json:

{
  "scripts": {
    "build": "tsup",
    "dev": "tsup --watch",
    "test": "vitest --passWithNoTests",
    "test:coverage": "vitest --coverage",
    "lint": "eslint src --ext .ts,.tsx",
    "lint:fix": "eslint src --ext .ts,.tsx --fix",
    "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
    "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
    "type-check": "tsc --noEmit",
    "clean": "rm -rf dist"
  }
}

IDE Integration

VS Code Settings

Create .vscode/settings.json:

{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "typescript.preferences.importModuleSpecifier": "relative"
}

Recommended Extensions

  • ESLint
  • Prettier - Code formatter
  • TypeScript Importer
  • Vitest

Customization

You can extend or override any configuration:

// Custom ESLint config
import carnilEslint from "@carnil/config/eslint";

export default [
  ...carnilEslint,
  {
    rules: {
      // Your custom rules
      "@typescript-eslint/no-unused-vars": "error",
    },
  },
];

Version Management

This package uses automatic version bumping on every push to the main branch:

  • Patch version (1.0.2 → 1.0.3) is automatically incremented on each commit
  • The version bump is committed back to the repository
  • Package is automatically published to both npm and GitHub Packages

Manual Version Control

For major or minor version bumps, use these commands:

# Patch version (automatic on push)
npm run version:patch

# Minor version (new features)
npm run version:minor

# Major version (breaking changes)
npm run version:major

Contributing

When contributing to this package:

  1. Test configuration changes across multiple packages
  2. Ensure backward compatibility
  3. Update documentation for new features
  4. Follow semantic versioning
  5. No need to manually bump versions - it's automatic!

License

MIT © Carnil Team

Support