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

mrac-lint-creator

v1.1.0

Published

** Internal use for mrac department. A CLI tool to setup lint configuration for old project.

Readme

mrac-lint-creator

【MRAC内部专用】快速配置项目 lint 环境的 CLI 工具。

📦 安装

直接使用 npx(推荐):

npx mrac-lint-creator init

或全局安装(可选):

npm install -g mrac-lint-creator

🚀 使用方法

快速开始

在项目根目录下运行:

npx mrac-lint-creator --init

或者使用子命令:

npx mrac-lint-creator init

首次运行时,工具会提示你选择项目类型:

请选择待初始化的项目类型:
❯ 1、插件或Web - Javascript
  2、微信小程序 - Javascript
  3、插件或Web - Typescript
  4、微信小程序 - Typescript

使用方向键选择,按回车确认。工具会根据你的选择自动下载对应的配置文件。

指定目标目录:

npx mrac-lint-creator init --dir /path/to/your/project

帮助信息

查看所有可用命令:

npx mrac-lint-creator --help

📋 功能特性

  • 🎯 项目类型选择:支持多种项目类型(Web/小程序,JS/TS)
  • 一键配置:自动下载和配置所有必需的 lint 文件
  • 🔄 智能合并:对于已存在的配置文件,智能合并而不是覆盖
  • 💬 保留注释:使用 comment-json 保留 JSON 文件中的注释和格式
  • 📦 增量更新:只添加新配置,不改变原有文件结构
  • ⏱️ 下载超时控制:每个文件下载超时时间为 10 秒,避免长时间等待
  • 🌈 友好提示:彩色输出和进度提示,操作一目了然

📄 配置文件说明

工具会处理:

Add 文件(强制覆盖)

以下文件会被直接下载并覆盖本地文件:

  • .eslintignore - ESLint 忽略配置
  • .eslintrc.js - ESLint 规则配置
  • .lintstagedrc.js - lint-staged 配置
  • .prettierrc.js - Prettier 格式化配置

Update 文件(智能合并)

以下 JSON 文件会智能合并到本地现有配置:

  • .vscode/extensions.json - VSCode 推荐扩展
  • .vscode/settings.json - VSCode 工作区设置
  • package.json - 项目依赖配置

对于 JSON 文件:

  • 如果本地文件存在,会保留原有配置和注释,只添加新的配置项
  • 如果本地文件不存在,会创建新文件

🛠️ 技术栈

  • commander: 命令行参数解析
  • comment-json: JSON 文件解析和合并(保留注释)
  • chalk: 终端彩色输出
  • ora: 终端加载动画

📝 使用流程

  1. 在项目目录运行 npx mrac-lint-creator init
  2. 工具自动下载并配置所有 lint 相关文件
  3. 运行 npm install 安装新添加的依赖
  4. 检查自动添加的依赖项跟本工程是否存在冲突(尤其是依赖项的版本冲突)
  5. 开始使用 lint 工具

⚠️ 注意事项

  • 必须在有效的 Node.js 项目中使用:工具会检查目标目录是否包含 package.json 文件,如果没有将提示错误并退出
  • Add 列表中的文件会被强制覆盖,请确保已备份重要配置
  • Update 列表中的 JSON 文件会进行智能合并,保留原有配置
  • 建议在干净的项目或新项目中使用
  • 配置完成后记得运行 npm install 安装依赖