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

@hcwhan/eslint-config

v1.0.8

Published

hcwhan's personal ESLint flat config presets, modular and opt-in.

Readme

@hcwhan/eslint-config

hcwhan 个人的 ESLint Flat Config 预设,单一入口 hcwhan() 工厂,按开关懒加载子配置。

特性

  • 单一入口 hcwhan() 工厂,按开关加载 formatters/stylistic/unocss/globals/javascript/typescript/vue
  • 可选集成(UnoCSS/Vue)通过动态 import 懒加载,未开启时不拉取对应 peer
  • 完全基于 TypeScript,附带 .d.ts 类型定义
  • 基于 ESLint Flat Config 标准
  • 内置 @stylistic/eslint-plugin 统一代码格式化

安装

pnpm add -D eslint @hcwhan/eslint-config

按需加装 optional peer:

| 场景 | 需要安装 | |---|---| | UnoCSS | pnpm add -D @unocss/eslint-plugin | | TypeScript | pnpm add -D typescript | | Vue | pnpm add -D eslint-plugin-vue vue-eslint-parser |

快速开始

在项目根目录新建 eslint.config.mjs

import hcwhan from '@hcwhan/eslint-config'

export default await hcwhan({
  ignores: ['dist'],
})

默认启用 formatters/stylistic/javascript/typescriptglobals 不默认注入,需要时显式传入运行环境;如需 UnoCSS 或 Vue,显式打开:

export default await hcwhan({
  ignores: ['dist'],
  unocss: true,
  vue: true,
})

API

hcwhan(options?) 是一个 async 工厂函数,返回 Promise<Linter.Config[]>options 整体可选,缺省等价于开启 formatters/stylistic/javascript/typescript、关闭 unocss/vue,且不注入任何 globals

options

| 参数 | 类型 | 默认 | 说明 | |---|---|---|---| | ignores | string[] | [] | 顶层 ignores 数组 | | formatters | boolean | true | MD/JSON/YAML/TOML/CSS/HTML 格式化 | | stylistic | boolean | true | @stylistic/* 规则 | | unocss | boolean | false | UnoCSS 规则 | | globals | 'node' \| 'browser' \| 'both' \| Linter.Globals | undefined | 为 JS/TS/Vue 注入 languageOptions.globals,未设置则不注入 | | javascript | boolean | true | JS 核心规则(含 import-x / unused-imports / node / unicorn / regexp) | | typescript | boolean | true | TypeScript 规则(同步加载,typescript-eslint 作为 dependency 随包提供) | | vue | boolean | false | Vue 规则 |

开发

pnpm install
pnpm build              # tsc -> dist/
pnpm run config         # 重新生成 config/*.json 快照
pnpm lint               # 自 lint

许可

ISC