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

eslint-plugin-aurora-config

v0.0.3

Published

Aurora ESLint plugin (rules) + flat config (recommended)

Readme

eslint-plugin-aurora

Aurora 项目 ESLint 插件:提供一套可复用的基础 Flat Config(JS/TS/import),并附带若干 Aurora 约定的结构/语义类自定义规则。

  • 运行环境:Node.js >= 18
  • ESLint:v9+(Flat Config)

安装

npm i -D eslint eslint-plugin-aurora

说明:本插件内部会用到 @eslint/jstypescript-eslinteslint-plugin-importglobals 等依赖;安装本插件时会一并安装。

如果你需要让 eslint-plugin-import 的 TypeScript 解析/路径解析更准确,建议项目也安装:

npm i -D eslint-import-resolver-typescript

使用(推荐:Flat Config)

在项目根目录创建/修改 eslint.config.js

const aurora = require("eslint-plugin-aurora");

const baseDir = __dirname;

module.exports = [
  // 1) 基础规则集(JS/TS/import)
  ...aurora.configs.recommended(baseDir),

  // 2) 选择性启用 Aurora 自定义规则
  {
    plugins: { aurora },
    rules: {
      "aurora/base-check": "error",
      "aurora/trial-check": "error",
      "aurora/scene-check": "error",
      "aurora/prefab-check": "error",
    },
  },
];

然后执行:

npx eslint .

打包与发布

在本项目根目录下执行。

# 1) 登录 npm(如已登录可跳过)
npm login

# 2) 更新版本号(按需选择 patch/minor/major)
npm version patch

# 3) 本地打包(生成 .tgz 包,用于自测/分发)
npm pack

# 4) 发布到 npm
npm publish

如果你想先确认发布内容是否正确,可以先运行:

npm publish --dry-run

configs

configs.recommended(baseDir)

生成基础 Flat Config 数组,包含:

  • @eslint/js 的 recommended
  • typescript-eslint
    • baseDir/tsconfig.json 存在,则启用 type-aware 的 recommendedTypeChecked
    • 否则降级为 recommended
  • eslint-plugin-import 的 recommended + 常用 resolver/settings

baseDir 必须传项目根目录(用于定位 tsconfig.json)。

rules

  • aurora/base-check
    • 当前版本默认不做检查(已禁用,保留 rule id 以兼容历史配置)
  • aurora/trial-check
    • 仅对 *trialService.ts 生效(不要求目录结构)
    • 约束 TrialGenerator 子类、generate() 方法以及返回值包含 target_answer
  • aurora/scene-check
    • 仅对 *scene.ts 生效
    • 约束 Phaser/BaseScene/NodeConfig 的导入与 getSceneConfig() 返回
  • aurora/prefab-check
    • 仅对 *prefab.ts 生效
    • 约束 Phaser/phaser-kit 导入、PrefabConfig 结构,以及 GameObjectFactory remove/register

目录结构

  • lib/index.js:插件入口(导出 rulesconfigs
  • lib/configs/base-config.js:基础 Flat Config 生成函数
  • lib/rules/*.js:Aurora 自定义规则实现

备注

  • 更详细的背景与设计说明见:设计.md