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

@goodbyenjn/configs

v6.1.4

Published

GoodbyeNJN's configs, including eslint, prettier, and more.

Readme

@goodbyenjn/configs

个人使用的一套配置,包含 ESLint、Prettier、TypeScript 等配置。

使用方法

安装

npm install --save-dev @goodbyenjn/configs
# or
pnpm add -D @goodbyenjn/configs
# or
yarn add -D @goodbyenjn/configs

ESLint

本配置基于 eslint-config-alloy@antfu/eslint-config,并增加了 eslint-plugin-import-xeslint-plugin-react-hooks 等插件。

npm install --save-dev eslint
# or
pnpm add -D eslint
# or
yarn add -D eslint

在你的项目根目录下创建一个 eslint.config.mjs 文件,并将以下内容复制进去:

import { withConfig } from "@goodbyenjn/configs/eslint";

export default withConfig();

本配置会根据 package.json 文件中是否存在 reactvuetypescript 依赖项来自动启用对应的规则。

你也可以手动覆盖相关配置,例如:

import { withConfig } from "@goodbyenjn/configs/eslint";

export default [
    ...withConfig({
        // 禁用 TypeScript 相关规则
        typescript: false,

        // 启用 React 相关规则
        react: {
            // 手动指定 React 版本
            version: "18",

            // 覆盖 React 相关规则
            overrides: {
                "react/react-in-jsx-scope": "off",
            },
        },

        // 启用 Vue 相关规则
        vue: true,
    }),
];

本配置带类型定义,在进行配置时会有智能提示。

Prettier

npm install --save-dev prettier
# or
pnpm add -D prettier
# or
yarn add -D prettier

在你的项目根目录下创建一个 prettier.config.mjs 文件,并将以下内容复制进去:

import { withConfig } from "@goodbyenjn/configs/prettier";

export default withConfig();

本配置会自动忽略 .gitignore 中列出的文件,并且会忽略一些常见的文件,例如 dist.next.nuxt.output.vercelpackage-lock.jsonyarn.lockpnpm-lock.yaml 等。详细列表请查看 globs.ts 文件。

如果你需要忽略其他文件,可以在 prettier.config.mjs 中添加 ignores 选项,例如:

import { withConfig } from "@goodbyenjn/configs/prettier";

export default withConfig({
    // 忽略所有的 JSON 文件
    ignores: ["*.json"],
});

其中 ignores 选项的格式与 Prettier 配置中的 overrides[].files 选项相同。详情请参考 Prettier 文档

TypeScript

npm install --save-dev typescript
# or
pnpm add -D typescript
# or
yarn add -D typescript

在你的项目根目录下创建一个 tsconfig.json 文件,并将以下内容复制进去:

{
    "extends": "@goodbyenjn/configs/tsconfigs/<name>"
}

其中 <name> 可以是以下值:

  • base: 基础配置,包含大多数常用的配置项。
  • react: 在 base 的基础上增加了 React 相关配置,包含 jsx 配置项和 dom 相关的库。
  • decorator: 在 base 的基础上增加了装饰器相关配置,包含 emitDecoratorMetadataexperimentalDecorators 配置项。