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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@aplus-frontend/oxfmt-config

v0.0.1

Published

OXC formatter config preset for aplus team.

Readme

🚀 Ultra-fast OXC Formatter config preset for Aplus frontend team

基于 Rust 编写的高性能代码格式化工具配置预设

NPM Version NPM Downloads NPM License

✨ 特性

  • ⚡️ 极速格式化 - 基于 Rust 的 OXC 引擎,比 Prettier 快 10-50 倍
  • 🎯 零配置 - 开箱即用的团队统一配置
  • 📦 轻量级 - 无需安装 Prettier 及其插件
  • 🔧 兼容性好 - 支持 JavaScript、TypeScript、Vue、React 等

📦 安装

# 只需安装这一个包,无需 prettier
pnpm add @aplus-frontend/oxfmt-config -D

🚀 使用方法

1. 安装包

# 只需安装这一个包,无需 prettier
pnpm add @aplus-frontend/oxfmt-config -D

2. 添加格式化脚本

package.json 中添加:

{
  "scripts": {
    "format": "oxfmt",
    "format:check": "oxfmt --check"
  }
}

注意:包内已包含 oxfmt 可执行文件和配置,无需额外安装或配置。

3. 运行格式化

# 格式化所有文件(默认)
pnpm format

# 检查格式化(不修改文件)
pnpm format:check

# 格式化特定文件
pnpm format src/**/*.{js,ts,vue}

⚙️ 配置选项

此预设包含以下配置:

| 选项 | 值 | 说明 | |------|-----|------| | printWidth | 80 | 每行最大字符数 | | indentWidth | 2 | 缩进宽度 | | useTabs | false | 使用空格而非制表符 | | semicolons | always | 始终使用分号 | | singleQuote | true | 使用单引号 | | trailingComma | none | 不使用尾随逗号 | | bracketSpacing | true | 对象字面量括号内有空格 | | arrowParens | true | 箭头函数参数总是使用括号 |

🔄 从 Prettier 迁移

如果你正在从 @aplus-frontend/prettier-config 迁移:

优势

  • ✅ 格式化速度提升 10-50 倍
  • ✅ 更小的依赖体积
  • ✅ 更快的安装速度
  • ✅ 配置完全兼容

迁移步骤

  1. 卸载 Prettier 相关依赖:
pnpm remove prettier @aplus-frontend/prettier-config
  1. 安装 OXC Formatter 配置:
pnpm add @aplus-frontend/oxfmt-config -D
  1. 更新配置文件(删除 .prettierrc,创建 .oxc.json

  2. 更新 package.json 脚本:

{
  "scripts": {
    "format": "oxc format --write .",
    "format:check": "oxc format --check ."
  }
}

📚 更多信息

📄 License

MIT © Aplus Frontend Team