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

@purea/eslint-config

v0.0.6

Published

Pure Anin ESLint Config

Readme

@purea/eslint-config

基于 @antfu/eslint-config 的 ESLint Flat Config 预设,内置团队默认规则。

特性

  • 基于 @antfu/eslint-config,开箱即用
  • 自动检测 TypeScript、Vue 等技术栈
  • 内置团队默认规则,用户规则优先级更高
  • ESLint Flat Config 格式(ESLint 9+)
  • 完整的 TypeScript 类型支持,类型自动与上游同步

安装

pnpm add -D @purea/eslint-config eslint

要求 eslint >= 9.39.2 作为 peer dependency。

使用

最简用法

// eslint.config.js
import useConfig from '@purea/eslint-config';

export default useConfig();

自动检测项目中安装的 TypeScript、Vue 等,按需启用对应规则。

自定义选项

所有 @antfu/eslint-config 的选项均可直接使用:

// eslint.config.js
import useConfig from '@purea/eslint-config';

export default useConfig({
  typescript: {
    tsconfigPath: 'tsconfig.json',
  },
  vue: true,
  react: true,
  ignores: ['**/generated'],
});

覆盖默认规则

用户传入的 rules 会与内置默认规则合并,同名规则以用户为准:

// eslint.config.js
import useConfig from '@purea/eslint-config';

export default useConfig({
  rules: {
    'no-console': 'off',
  },
});

追加额外配置

// eslint.config.js
import useConfig from '@purea/eslint-config';

export default useConfig(
  { typescript: true },
  {
    rules: {
      'my-custom-rule': 'error',
    },
  }
);

使用 FlatConfigComposer 链式 API

useConfig() 返回 FlatConfigComposer,支持链式操作:

// eslint.config.js
import useConfig from '@purea/eslint-config';

export default useConfig()
  .override('antfu/javascript/rules', {
    rules: { 'no-console': 'off' },
  })
  .append({
    rules: { 'my-custom-rule': 'error' },
  });

导出

| 导出 | 类型 | 说明 | | --- | --- | --- | | default / useConfig | 函数 | 工厂函数,返回 FlatConfigComposer | | Options | 类型 | 配置选项类型(从 antfu() 参数推导) | | ExtraConfigs | 类型 | 额外配置参数类型(从 antfu() 参数推导) | | Config | 类型 | 返回值类型 FlatConfigComposer(从 antfu() 返回值推导) |

更多选项

完整的配置选项请参考 @antfu/eslint-config 文档,支持的技术栈包括:

  • TypeScript / JavaScript
  • Vue / React / Svelte / Astro / Solid
  • JSON / YAML / Toml / Markdown
  • UnoCSS / Formatters
  • 以及更多

开发

pnpm install    # 安装依赖
pnpm build      # 构建(tsdown → ESM + DTS)
pnpm dev        # 监听模式构建
pnpm lint       # ESLint 自检

项目结构

src/
├── index.ts     # 入口,导出 useConfig 及类型
├── factory.ts   # 工厂函数,注入默认规则
├── configs.ts   # 文件级默认配置(Vue、Markdown 等)
└── rules.ts     # 全局默认规则定义