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

@pgg/lint-installer

v1.1.1

Published

一键安装和配置代码质量工具链的CLI工具

Readme

Lint Installer

一键安装和配置代码质量工具链的CLI工具。

功能特性

自动安装和配置以下开发工具:

  • @antfu/eslint-config - Anthony Fu 的 ESLint 配置
  • commitlint - Git 提交信息规范检查
  • @ls-lint/ls-lint - 文件和目录命名规范检查
  • czg - 交互式 Git 提交工具
  • eslint - JavaScript/TypeScript 代码检查
  • lint-staged - Git 暂存文件检查
  • simple-git-hooks - 简单的 Git 钩子管理

安装

npm install -g lint-installer

使用方法

在当前项目中安装开发工具

lint-installer install

在指定目录安装开发工具

lint-installer install -d /path/to/your/project

安装内容

依赖包

工具会自动添加以下 devDependencies 到你的 package.json:

{
  "@antfu/eslint-config": "^4.17.0",
  "@commitlint/cli": "^19.8.1",
  "@commitlint/config-conventional": "^19.8.1",
  "@ls-lint/ls-lint": "^2.3.1",
  "czg": "^1.12.0",
  "eslint": "^9.31.0",
  "eslint-plugin-format": "^1.0.1",
  "lint-staged": "^16.1.2",
  "simple-git-hooks": "^2.13.0"
}

脚本命令

添加以下 npm scripts:

{
  "lint:eslint": "eslint --fix",
  "lint:ls": "ls-lint",
  "lint": "git add . && npx lint-staged",
  "commit": "git add . && czg && git pull && git push"
}

配置文件

  • eslint.config.mjs - ESLint 配置
  • commitlint.config.cjs - Commitlint 配置(中文版)
  • .ls-lint.yml - LS-Lint 配置

Git Hooks

自动配置以下 Git 钩子:

  • commit-msg: 检查提交信息格式
  • pre-commit: 运行代码检查和格式化

使用示例

安装完成后,你可以使用以下命令:

# 运行代码检查
npm run lint

# 交互式提交代码
npm run commit

# 单独运行 ESLint
npm run lint:eslint

# 单独运行文件命名检查
npm run lint:ls

注意事项

  1. 如果目标项目已存在相同的配置文件,工具会覆盖它们
  2. 工具会自动检测项目使用的包管理器(npm/yarn/pnpm)
  3. 安装完成后会自动初始化 Git Hooks

许可证

MIT