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

@winner-fed/biome-config-win

v1.0.0

Published

Biome configuration for winner-fed frontend coding standards

Readme

@winner-fed/biome-config-win

Biome 配置包,用于 winner-fed 前端编码规范。

简介

这是 Biome 的共享配置包,用于替代 ESLint 和 Prettier,提供统一的代码检查和格式化规则。

特性

  • 集成 Linter 和 Formatter 于一体
  • 高性能(基于 Rust 实现)
  • 零配置,开箱即用
  • 支持 JavaScript、TypeScript、JSX、TSX、JSON、CSS、Less、SCSS、Sass、Vue

安装

npm install --save-dev @winner-fed/biome-config-win @biomejs/biome
# 或
pnpm add -D @winner-fed/biome-config-win @biomejs/biome
# 或
yarn add -D @winner-fed/biome-config-win @biomejs/biome

使用方法

方式一:继承配置(推荐)

在项目根目录创建 biome.json

{
  "$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
  "extends": ["@winner-fed/biome-config-win"]
}

方式二:直接复制配置

@winner-fed/biome-config-win/biome.json 的内容复制到项目的 biome.json 文件中,并根据项目需要进行调整。

配置说明

支持的规则

  • Correctness: 代码正确性检查
  • Style: 代码风格检查
  • Suspicious: 可疑代码模式检查
  • Performance: 性能相关检查
  • Complexity: 代码复杂度检查

支持的文件类型

  • JavaScript/TypeScript: 完全支持(.js, .jsx, .ts, .tsx
  • JSON: 完全支持(.json
  • CSS: 完全支持(.css)- 格式化和检查
  • Vue: 部分支持(.vue)- 仅支持 <script> 标签内的代码
    • 注意: Biome 对 Vue 文件的支持不区分 Vue 2 和 Vue 3,只对 <script> 标签中的 JavaScript/TypeScript 代码进行检查和格式化
    • Vue 特定的模板语法和组件选项 API 不会被检查
    • 建议 Vue 项目配合使用专门的 Vue 开发工具(如 Volar)
  • Less/SCSS/Sass: 配置中包含(.less, .scss, .sass),但 Biome 目前不支持这些预处理器,这些文件会被忽略

格式化选项

  • 缩进:2 个空格
  • 行宽:100 字符
  • 引号:单引号(JS),双引号(JSX)
  • 分号:始终使用
  • 尾随逗号:ES5 风格

与 ESLint 的差异

Biome 的规则与 ESLint 不完全对应,但覆盖了大部分常用规则。主要差异:

  1. Biome 内置格式化功能,无需单独配置 Prettier
  2. 部分 ESLint 规则在 Biome 中可能名称不同或不存在
  3. Vue 文件支持
    • Biome 目前对 Vue SFC 的支持有限,仅检查 <script> 标签内的代码
    • 不区分 Vue 2 和 Vue 3:Biome 将所有 Vue 文件视为相同,只检查其中的 JavaScript/TypeScript 代码
    • Vue 特定的规则(如组件选项、模板语法等)需要配合其他工具(如 ESLint + eslint-plugin-vue)
    • 对于 Vue 项目,建议:
      • 使用 Biome 处理 .js.ts 等纯 JavaScript/TypeScript 文件
      • 对于 .vue 文件,Biome 会放宽部分规则(如 noUnusedVariablesnoUndeclaredVariables),以避免误报

迁移指南

从 ESLint + Prettier 迁移到 Biome:

  1. 安装 Biome 和本配置包
  2. 创建 biome.json 并继承本配置
  3. 移除 ESLint 和 Prettier 相关依赖和配置
  4. 更新 CI/CD 脚本中的 lint 命令
  5. 更新编辑器配置(VSCode 等)

许可证

MIT