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

@tker/eslint-config

v2.0.2

Published

基于 ESLint Flat Config 的 ESLint 配置包,提供完整的代码质量检查规则集。

Readme

@tker/eslint-config

基于 ESLint Flat Config 的 ESLint 配置包,提供完整的代码质量检查规则集。

特性

  • 基于 ESLint 9.x Flat Config 架构
  • 支持 Vue、TypeScript、JSON 等多种文件类型
  • 集成 Prettier 格式检查
  • 包含导入排序、注释规范、JSDoc 等规则

安装

pnpm add -D @tker/eslint-config eslint

使用方式

基础用法

在项目根目录创建 eslint.config.js

import { defineConfig } from '@tker/eslint-config'

export default defineConfig()

自定义配置

添加额外的规则或覆盖默认规则:

import { defineConfig } from '@tker/eslint-config'

export default defineConfig([
  {
    rules: {
      'no-console': 'warn',
      'vue/component-name-in-template-casing': ['error', 'PascalCase']
    }
  }
])

Vue 项目配置

配置已内置 Vue 支持,无需额外配置。默认支持:

  • .vue 文件
  • Vue 3.x 语法
  • TypeScript + Vue

TypeScript 项目配置

配置已内置 TypeScript 支持,包括:

  • 类型检查规则
  • 严格模式
  • 未使用导入清理

包含的规则集

| 规则集 | 描述 | |--------|------| | javascript | JavaScript 基础规则 | | typescript | TypeScript 规则(类型检查、严格模式) | | vue | Vue 组件规则(模板、脚本、样式) | | import | 导入规则(排序、未使用清理) | | node | Node.js 规则(API 使用、模块导入) | | jsonc | JSON/JSONC 文件规则 | | prettier | Prettier 格式检查集成 | | unicorn | 更好的 JavaScript 实践规则 | | regexp | 正则表达式规则 | | jsdoc | JSDoc 文档注释规则 | | comments | 注释规范规则 | | perfectionist | 代码排序规则(属性、导入排序) | | command | 注释命令规则(如 // TODO) | | disableds | 禁用区域规则检查 | | ignores | 默认忽略文件配置 |

配合 Prettier 使用

建议同时安装 @tker/prettier-config

pnpm add -D @tker/prettier-config

创建 prettier.config.js

import config from '@tker/prettier-config'
export default config

ESLint 配置已集成 eslint-plugin-prettier,格式问题会作为 ESLint 错误报告。

编辑器集成

VS Code

安装 ESLint 扩展,配置 .vscode/settings.json

{
  "eslint.experimental.useFlatConfig": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  }
}

WebStorm / IntelliJ

ESLint 9.x Flat Config 默认支持,无需额外配置。

依赖说明

本包依赖以下 ESLint 插件(通过 catalog 管理):

eslint-plugin-vue          # Vue 规则
eslint-plugin-prettier     # Prettier 集成
eslint-plugin-import-x     # 导入规则
eslint-plugin-n            # Node.js 规则
eslint-plugin-unicorn      # 最佳实践规则
eslint-plugin-regexp       # 正则规则
eslint-plugin-jsdoc        # JSDoc 规则
eslint-plugin-jsonc        # JSON 规则
eslint-plugin-perfectionist # 排序规则
eslint-plugin-command      # 注释命令
eslint-plugin-eslint-comments # 注释规则
eslint-plugin-unused-imports  # 未使用导入清理
@typescript-eslint/eslint-plugin # TypeScript 规则

License

MIT