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

@qiaer/eslint-config

v0.1.3

Published

JavaScript Standard Style - ESLint Shareable Config

Readme

@qiaer/eslint-config

ESLint 可共享配置,基于 JavaScript Standard Style,提供统一的 JavaScript/JSX 代码风格检查规则。

特性

  • 基于 eslint-config-standard 17.x,兼容 ESLint 8.x
  • 支持 ES2022 语法与 JSX
  • 内置 import、Node(n)、Promise 相关规则
  • 针对团队习惯的规则微调:函数括号前无空格、多行尾逗号、camelcase 等
  • 支持浏览器与 Node 环境全局变量

安装

npm

npm install @qiaer/eslint-config --save-dev

yarn

yarn add @qiaer/eslint-config --dev

pnpm

pnpm add @qiaer/eslint-config --save-dev

使用

在项目根目录的 .eslintrc、.eslintrc.json 或 eslint.config.js(需兼容层)中扩展本配置。

方式一:.eslintrc / .eslintrc.json

{
  "extends": "@qiaer/eslint-config"
}

方式二:.eslintrc.js

module.exports = {
  extends: ['@qiaer/eslint-config']
}

覆盖或追加规则

{
  "extends": "@qiaer/eslint-config",
  "rules": {
    "no-console": "warn"
  }
}

主要规则说明

| 规则 | 说明 | |------|------| | space-before-function-paren | 函数括号前不加空格(function foo()) | | comma-dangle | 多行时尾逗号:数组不加,对象/import/export/函数多行加 | | camelcase | 变量名驼峰,属性名不强制,解构与 import 忽略 | | import/no-absolute-path | 禁止 import 绝对路径(CommonJS 允许) | | no-new | 允许 new Constructor() 不赋值 |

环境与解析

  • parserOptions.ecmaVersion: 2022
  • parserOptions.ecmaFeatures.jsx: true
  • env: es2022、node
  • globals: document、navigator、window(readonly)

命令行使用

# 检查当前目录
npx eslint .

# 指定扩展名
npx eslint --ext .js,.jsx .

# 自动修复
npx eslint . --fix

IDE 集成

VS Code

安装扩展 dbaeumer.vscode-eslint,在 settings.json 中可开启保存时修复:

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}

WebStorm / IntelliJ IDEA

在 Settings → Languages & Frameworks → JavaScript → Code Quality Tools → ESLint 中启用 ESLint 并选择配置文件。

常见问题

与 Prettier 一起用会冲突吗?

部分规则(如缩进、引号)可能与 Prettier 冲突。建议使用 eslint-config-prettier 关闭与格式相关的 ESLint 规则,由 Prettier 负责格式:

npm install eslint-config-prettier --save-dev
{
  "extends": ["@qiaer/eslint-config", "prettier"]
}

如何忽略某些文件?

在项目根目录创建 .eslintignore:

node_modules/
dist/
build/
*.min.js

只对部分目录启用?

在 overrides 中按目录或文件扩展名指定配置:

{
  "extends": "@qiaer/eslint-config",
  "overrides": [
    {
      "files": ["tests/**/*.js"],
      "env": { "mocha": true }
    }
  ]
}

更新日志

v1.0.0-beta.0

  • 升级 ESLint 至 ^8.57.0,eslint-config-standard 至 ^17.1.0
  • 使用 eslint-plugin-n 替代已废弃的 eslint-plugin-node
  • 移除 eslint-plugin-standard(standard 17 已不再依赖)
  • 移除 eslint-define-config(当前未使用)
  • parserOptions.ecmaVersion 调整为 2022,env 使用 es2022
  • 增加 package.json 的 exports 与 files,便于 npm/yarn/pnpm 正确解析
  • 完善 README:安装(npm/yarn/pnpm)、使用、规则说明、IDE、常见问题

v0.1.8

  • 此前版本(ESLint 7 + standard 16)

贡献

欢迎提交 Issue 和 Pull Request。

许可证

MIT