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

sunny-fe-lint

v1.1.0

Published

前端编码规范工程化脚手架

Readme

sunny-fe-lint

sunny-fe-lint 是我自用的配套 Lint 工具,可以为项目一键接入规范,保障项目的编码规范和代码质量。

| 规范 | Lint 工具 | |-------------------------------------------------------|------------------------------------------------------------| | JavaScript 编码规范 TypeScript 编码规范 Node 编码规范 | ESLint | | | CSS 编码规范 | stylelint | | | Git 规范 | commitlint | | | 文档规范 | markdownlint | |

CLI 使用

安装

在终端执行:

pnpm install sunny-fe-lint -g

安装完成后,可执行 sunny-fe-lint -h 以验证安装成功。

使用

sunny-fe-lint init:一键接入

在项目根目录执行 sunny-fe-lint init,即可一键接入规范,为项目安装规范 Lint 所需的依赖和配置。

具体会做以下事情:

  • 安装各种依赖:包括 Linter 依赖,如 ESLintstylelintcommitlintmarkdownlint 等。

  • 写入各种配置文件,包括:

    • .eslintrc.eslintignore:ESLint 配置及黑名单文件
    • .stylelintrc、.stylelintignore`:stylelint 配置及黑名单文件
    • .commitlintrc:commitlint 配置
    • .markdownlint.markdownlintignoremarkdownlint 配置及黑名单文件
    • .prettierrc:符合规范的 Prettier 配置
    • .editorconfig:符合规范的 editorconfig
    • .vscode/extensions.json :写入规范相关的 VSCode 插件推荐 ,包括 ESLintstylelintmarkdownlintprettier
    • .vscode/settings.json :写入规范相关的 VSCode 设置 ,设置 ESLintstylelint 插件的 validate保存时自动运行 fix,如果选择使用 Prettier ,会同时将 prettier-vscode 插件设置为各前端语言的 defaultFormatter,并配置保存时自动格式化
  • 配置 git commit 卡口:使用 husky 设置代码提交卡口

注 1:如果项目已经配置过 ESLint、stylelint 等 Linter,执行 sunny-fe-lint init 将会提示存在冲突的依赖和配置,并在得到确认后进行覆盖:

注 2:如果项目的 .vscode/ 目录被 .gitignore 忽略,可以在拉取项目后单独执行 sunny-fe-lint init --vscode 命令写入 .vscode/extensions.json.vscode/settings.json 配置文件

常见问题

TypeScript 项目扫描性能问题

如果你的 TS 项目 commit 卡口和 sunny-fe-lint scan 运行时间很长,可以通过如下在 .eslintrc.js 中增加以下配置提升性能:

module.exports = {
  parserOptions: {
    project: [], // for lint performance
    createDefaultProgram: false, // for lint performance
  },
  rules: {
    '@typescript-eslint/dot-notation': 0, // for lint performance
    '@typescript-eslint/restrict-plus-operands': 0, // for lint performance
  },
};