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

@dyyz1993/eslint-plugin-rpc

v1.1.0

Published

ESLint rules enforcing @dyyz1993/rpc-core usage conventions

Readme

@dyyz1993/eslint-plugin-rpc

ESLint rules enforcing the RPC conventions of @dyyz1993/rpc-core in projects created from @dyyz1993/create-agent. The plugin is vendored into every template (./eslint-plugin-rpc/index.js) so generated projects work without an extra npm dependency.

Usage (flat config)

// eslint.config.mjs
import rpcPlugin from "./eslint-plugin-rpc/index.js";

export default tseslint.config(
	// ...
	rpcPlugin.configs["flat/recommended"]
);

Rules

| Rule | Description | | ------------------------------ | ----------------------------------------------------------------------------------------- | | rpc/no-bare-method | register/call/subscribe/emitEvent 方法名必须使用 module.action 格式 | | rpc/no-direct-register | server.register() 只允许出现在 shared/handlers/ 目录 | | rpc/schema-merge-only | rpc-schema.ts 只允许 extends 合并,禁止直接定义方法(interface 和 type alias 都检查) | | rpc/module-file-naming | modules/ 下文件必须导出 XxxMethods 接口,方法/事件 key 必须以 module. 为前缀 | | rpc/require-typed-register | 入口文件必须导入并调用 registerAllHandlers(支持别名导入) | | rpc/require-api-client | mainview/ 下禁止直接操作 WebSocket(含 window.WebSocket)或裸传输层 .send() | | rpc/no-hardcoded-strings | JSX 禁止硬编码英文字符串,提示走 i18n t()(warn 级别) | | rpc/no-deep-relative-imports | 禁止超过 2 层 ../ 的相对路径导入(含 export ... from),应使用 @shared/* 别名 |

Options

// rpc/no-bare-method — which receiver names are treated as RPC entry points
"rpc/no-bare-method": ["error", { objectNames: ["apiClient", "server"] }]

// rpc/no-direct-register
"rpc/no-direct-register": ["error", {
  serverNames: ["server", "rpcServer"],
  entryFiles: ["bun/index.ts", "server.ts"],
  handlersDirs: ["shared/handlers"],
}]

// rpc/require-typed-register
"rpc/require-typed-register": ["error", { entryFiles: ["bun/index.ts"] }]

// rpc/require-api-client — exact variable names treated as raw transports
"rpc/require-api-client": ["error", { transportNames: ["ws", "websocket", "socket"] }]

// rpc/no-hardcoded-strings
"rpc/no-hardcoded-strings": ["warn", {
  ignoreAttributes: ["className", "href", /* ... */],
  ignoreComponents: ["Icon", "Panel"],  // suppress everything inside these components
  ignorePrefixes: ["bg-", "https://"],
}]

// rpc/no-deep-relative-imports
"rpc/no-deep-relative-imports": ["error", { maxDepth: 2 }]

Tests

cd packages/eslint-plugin-rpc
bun test tests/