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

@map-colonies/eslint-plugin

v0.1.0

Published

Custom ESLint rules for MapColonies projects

Readme

@map-colonies/eslint-plugin

Custom ESLint rules for MapColonies projects. This plugin provides specialized rules to enforce best practices and prevent common mistakes.

Installation

npm install --save-dev @map-colonies/eslint-plugin

Usage

Quick Start with Recommended Config

Add the plugin to your ESLint configuration:

// eslint.config.mjs
import mapColoniesPlugin from '@map-colonies/eslint-plugin';

export default [
  mapColoniesPlugin.configs['pino-safety'],
  // ... your other configs
];

Manual Configuration

Or configure rules individually:

// eslint.config.mjs
import mapColoniesPlugin from '@map-colonies/eslint-plugin';

export default [
  {
    plugins: {
      '@map-colonies': mapColoniesPlugin,
    },
    rules: {
      '@map-colonies/pino-safety/no-swallowed-args': 'error',
      '@map-colonies/pino-safety/prefer-standard-error-key': 'warn',
    },
  },
];

Rules

Pino Safety Rules

pino-safety/no-swallowed-args

Prevents Pino from silently swallowing objects when arguments don't match the message format placeholders.

Problem: Pino uses printf-style formatting. If you pass extra arguments without corresponding placeholders (%s, %d, etc.), they are silently ignored.

Examples:

// ❌ Bad - object is swallowed (no placeholder)
logger.info('User logged in', { userId: 123 });

// ❌ Bad - second argument is swallowed (only one %s placeholder)
logger.info('User %s logged in', username, { extra: 'data' });

// ✅ Good - merge object pattern (object first)
logger.info({ userId: 123 }, 'User logged in');

// ✅ Good - placeholders match argument count
logger.info('User %s logged in at %d', username, timestamp);

// ✅ Good - no extra arguments
logger.info('Simple message');

Supported placeholders: %s, %d, %f, %i, %j, %o, %O

pino-safety/prefer-standard-error-key

Ensures errors are serialized correctly by using Pino's standard err key instead of error.

Problem: Pino's default error serializer looks for the err key. Using error means the error won't be properly serialized with stack traces.

Examples:

// ❌ Bad - "error" key won't be serialized properly
logger.error({ error: new Error('Failed') }, 'Operation failed');

// ✅ Good - "err" key uses Pino's error serializer
logger.error({ err: new Error('Failed') }, 'Operation failed');

// ✅ Good - other property names are fine
logger.info({ userId: 123, status: 'active' }, 'User info');

Configuration Presets

pino-safety (recommended)

Enables all Pino safety rules with recommended severity levels:

  • pino-safety/no-swallowed-args: error
  • pino-safety/prefer-standard-error-key: warn

Development

Building

pnpm run build

Testing

pnpm run test

Linting

pnpm run lint

Related Packages

License

MIT