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

@docyrus/rules

v0.4.2

Published

Shared ESLint and Biome configurations for Docyrus projects

Readme

@docyrus/rules

Central ESLint and Biome configurations for Docyrus projects.

Installation

pnpm add -D @docyrus/rules eslint typescript

If you use Biome:

pnpm add -D @docyrus/rules @biomejs/biome

ESLint

This package uses a composition approach. Each config is an independent layer — you combine the ones that fit your project.

Configs

| Config | Contents | |--------|--------| | baseConfig | TypeScript parser, @stylistic, import ordering, unused imports, general rules | | reactConfig | React, React Hooks rules | | nextjsConfig | Next.js recommended + core-web-vitals, React Refresh | | expoConfig | Expo, React Native rules | | aiConfig | Vercel AI SDK security rules (OWASP Agentic Top 10) |

Usage

All configs can be imported from a single entry point:

import { baseConfig, reactConfig, nextjsConfig, expoConfig, aiConfig } from '@docyrus/rules/eslint';

Or individually:

import { baseConfig } from '@docyrus/rules/eslint/base';
import { reactConfig } from '@docyrus/rules/eslint/react';

React Project

// eslint.config.mjs
import { baseConfig, reactConfig } from '@docyrus/rules/eslint';

export default [...baseConfig, ...reactConfig];

Next.js Project

// eslint.config.mjs
import { baseConfig, reactConfig, nextjsConfig } from '@docyrus/rules/eslint';

export default [...baseConfig, ...reactConfig, ...nextjsConfig];

Next.js + AI Project

// eslint.config.mjs
import { baseConfig, reactConfig, nextjsConfig, aiConfig } from '@docyrus/rules/eslint';

export default [...baseConfig, ...reactConfig, ...nextjsConfig, ...aiConfig];

Expo / React Native Project

// eslint.config.mjs
import { baseConfig, reactConfig, expoConfig } from '@docyrus/rules/eslint';

export default [
  ...baseConfig,
  ...reactConfig,
  ...expoConfig,
  {
    settings: {
      'import-x/resolver': {
        typescript: {
          project: ['apps/*/tsconfig.json', 'packages/*/tsconfig.json']
        }
      }
    }
  }
];

Plain TypeScript Project

// eslint.config.mjs
import { baseConfig } from '@docyrus/rules/eslint';

export default [...baseConfig];

Project-Specific Overrides

You can add your own rules on top of any config:

// eslint.config.mjs
import { baseConfig, reactConfig } from '@docyrus/rules/eslint';

export default [
  ...baseConfig,
  ...reactConfig,
  {
    rules: {
      'no-console': 'off',
      'react/no-array-index-key': 'off'
    }
  }
];

Biome

Biome configs are used via extends. Choose the preset that matches your project.

Configs

| Config | Contents | |--------|--------| | @docyrus/rules/biome/base | Space indentation, single quotes, recommended rules | | @docyrus/rules/biome/cloudflare | Tab indentation, strict rules (MCP/Workers projects) | | @docyrus/rules/biome/react | Base + React ignores | | @docyrus/rules/biome/nextjs | Base + Next.js ignores (.next, .open-next) |

Usage

// biome.json
{
  "extends": ["@docyrus/rules/biome/base"]
}

Cloudflare Workers / MCP Project

// biome.json
{
  "extends": ["@docyrus/rules/biome/cloudflare"]
}

Next.js Project (Biome)

// biome.json
{
  "extends": ["@docyrus/rules/biome/nextjs"]
}

Override

// biome.json
{
  "extends": ["@docyrus/rules/biome/base"],
  "linter": {
    "rules": {
      "suspicious": {
        "noExplicitAny": "off"
      }
    }
  }
}

Which Config For Which Project?

| Project Type | ESLint Configs | Biome Config | |------------|-------------------|--------------| | React (Vite, CRA) | baseConfig + reactConfig | biome/react | | Next.js | baseConfig + reactConfig + nextjsConfig | biome/nextjs | | Next.js + AI | baseConfig + reactConfig + nextjsConfig + aiConfig | biome/nextjs | | Expo / React Native | baseConfig + reactConfig + expoConfig | — | | Node.js / TypeScript | baseConfig | biome/base | | Cloudflare Workers / MCP | — | biome/cloudflare |


Included Plugins

The ESLint configs bring all required plugins as dependencies. You don’t need to install them separately.

| Plugin | Config | |--------|--------| | @stylistic/eslint-plugin | base | | @typescript-eslint/eslint-plugin | base | | @typescript-eslint/parser | base | | eslint-plugin-import-x | base | | eslint-plugin-unused-imports | base | | eslint-plugin-react | react | | eslint-plugin-react-hooks | react | | @next/eslint-plugin-next | nextjs | | eslint-plugin-react-refresh | nextjs | | eslint-config-expo | expo | | eslint-plugin-react-native | expo | | eslint-plugin-vercel-ai-security | ai |