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

@sfmc-bds/eslint-plugin

v0.1.1

Published

ESLint rules for SFMC SDK / module authoring conventions (Msg API, import paths, ModuleRegistry).

Readme

@sfmc-bds/eslint-plugin

SFMC 模块 / SDK 约定的 ESLint 插件,形态对齐 eslint-plugin-minecraft-linting:独立包 + configs.recommended。

安装

主仓 workspace 已包含;sfmc-modules 通过 file: 依赖主仓路径。

pnpm add -D @sfmc-bds/eslint-plugin

Flat config

import sfmc from "@sfmc-bds/eslint-plugin";
import tsParser from "@typescript-eslint/parser";

export default [
  {
    files: ["packages/*/sapi/src/**/*.ts"],
    languageOptions: { parser: tsParser },
    ...sfmc.configs.recommended,
  },
  // SDK 实现 Msg / HttpDB 处可关闭部分规则
  {
    files: ["**/sapi/runtime/msg.ts", "**/sapi/runtime/httpdb.ts"],
    rules: {
      "@sfmc-bds/no-player-send-message": "off",
      "@sfmc-bds/no-httpdb-legacy": "off",
    },
  },
  // economy 模块自身可读写私有表
  {
    files: ["**/packages/economy/**", "**/module-economy/**"],
    rules: { "@sfmc-bds/no-economy-private-tables": "off" },
  },
];

更严:用 sfmc.configs.all(若干 warn 升为 error)。

规则

| Rule | recommended | 说明 | |------|-------------|------| | @sfmc-bds/no-player-send-message | warn | 禁止 *.sendMessage(),改用 Msg.* | | @sfmc-bds/no-sfmc-sdk-alias | error | 禁止 @sfmc/sdk,改用 @sfmc-bds/sdk | | @sfmc-bds/no-sdk-deep-import | error | 禁止相对路径深挖 SDK 源码 | | @sfmc-bds/no-sdk-private-export | error | 仅允许 @sfmc-bds/sdk 公开 exports 子路径 | | @sfmc-bds/require-module-registry | warn | sapi/src/index.ts 须 ModuleRegistry.register | | @sfmc-bds/no-db-toplevel-in-tx | error | db.tx 内禁顶层 db.* / service.get;用 tx.* / tx.call / inTx | | @sfmc-bds/require-command-permission | warn | Command.register 字符串权限须同包 Permission.register | | @sfmc-bds/no-httpdb-legacy | warn | HttpDB 为 legacy;用 db / service / config | | @sfmc-bds/require-service-requires | warn | service.get / tx.call 须在本包 services.requires 声明 | | @sfmc-bds/valid-config-key | warn | config.get/set 字段对照默认配置;onChange 校验 arity | | @sfmc-bds/require-await-sdk-promise | warn | 常见 SDK Promise API 须 await / return / void | | @sfmc-bds/no-economy-private-tables | error | 禁止读写 sfmc_economy_*;用 economy client / service | | @sfmc-bds/no-platform-internal-import | error | 禁止 import db-server / sfmc / bds-tools 等平台内部 | | @sfmc-bds/no-cross-module-source-import | error | 禁止深挖其它模块 sapi/src;允许 @sfmc-bds/module-*/client |

开发

pnpm --filter @sfmc-bds/eslint-plugin run build
pnpm --filter @sfmc-bds/eslint-plugin run build

发布构建只包含插件源码;变更后运行构建、类型检查与 lint 验证。