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

@cat-com/eslint-config

v3.0.2

Published

前端统一Eslint分层规范集成包

Readme

使用说明

版本要求

v3.0.0+ 要求 ESLint >= 9.0.0

安装

npm install --save-dev @cat-com/eslint-config eslint@^9.0.0

📝 升级说明:从 v2.x 升级到 v3.x 的详细指南请查看 CHANGELOG.md

配置方式

本包仅支持 Flat Config 方式(ESLint 9.x 推荐方式):

在项目根目录创建 eslint.config.mjs 文件:

基础层 - base

适用于所有前端及 nodejs 项目

javascript

import baseConfig from '@cat-com/eslint-config/index.mjs';
import prettierConfig from '@cat-com/eslint-config/prettier.mjs';

export default [...baseConfig, ...prettierConfig];

typescript

import tsConfig from '@cat-com/eslint-config/typescript/index.mjs';
import prettierConfig from '@cat-com/eslint-config/typescript/prettier.mjs';

export default [...tsConfig, ...prettierConfig];

终端层 - web

适用于浏览器、小程序项目

javascript

import webConfig from '@cat-com/eslint-config/web/index.mjs';
import prettierConfig from '@cat-com/eslint-config/web/prettier.mjs';

export default [...webConfig, ...prettierConfig];

typescript

import webTsConfig from '@cat-com/eslint-config/web/typescript/index.mjs';
import prettierConfig from '@cat-com/eslint-config/web/typescript/prettier.mjs';

export default [...webTsConfig, ...prettierConfig];

框架层 - react

适用于 react 项目

javascript

import reactConfig from '@cat-com/eslint-config/react/index.mjs';
import prettierConfig from '@cat-com/eslint-config/react/prettier.mjs';

export default [...reactConfig, ...prettierConfig];

typescript

import reactTsConfig from '@cat-com/eslint-config/react/typescript/index.mjs';
import prettierConfig from '@cat-com/eslint-config/react/typescript/prettier.mjs';

export default [...reactTsConfig, ...prettierConfig];

注意事项

  • v3.0.0 要求 ESLint >= 9.0.0
  • 仅支持 Flat Config 方式(eslint.config.mjs),这是 ESLint 9.x 的推荐配置方式
  • 如果遇到问题,请检查 Node.js 版本(建议 >= 18.18.0)
  • 详细的升级指南和变更说明请查看 CHANGELOG.md

Flat Config 说明

本包的 .mjs 文件使用 ESLint 9.x 的 Flat Config 格式。在 Flat Config 中,配置必须显式指定 files 模式,插件必须在匹配的配置对象中声明,这与传统 .js 配置的工作方式不同,但功能保持一致。

配置架构

  • 基础层rules/):基础规则,不涉及环境
  • 应用层web/):覆盖基础配置,添加环境特性(如 browser globals)
  • 框架层react/):继承应用层,添加框架特性
  • 最终使用层index.mjs):组合配置,TypeScript 项目同时引用 JS 和 TS 配置