惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Security Archives - TechRepublic
WordPress大学
WordPress大学
量子位
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
云风的 BLOG
云风的 BLOG
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
H
Heimdal Security Blog
Microsoft Security Blog
Microsoft Security Blog
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
The Last Watchdog
The Last Watchdog
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
PCI Perspectives
PCI Perspectives
H
Help Net Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - Franky
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
MongoDB | Blog
MongoDB | Blog
V
V2EX - 技术
Attack and Defense Labs
Attack and Defense Labs
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hacker News: Front Page
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
V
Visual Studio Blog
T
Tor Project blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Cisco Blogs
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
大猫的无限游戏
大猫的无限游戏
Simon Willison's Weblog
Simon Willison's Weblog
F
Full Disclosure
博客园 - 司徒正美
L
LINUX DO - 最新话题
J
Java Code Geeks
G
GRAHAM CLULEY
The Register - Security
The Register - Security
B
Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
About on SuperTechFans
N
Netflix TechBlog - Medium
TaoSecurity Blog
TaoSecurity Blog
S
Security Affairs

Shine & Website

从圆肩到挺拔:我的训练计划 V2|肩胛稳定优先 2026 最新土耳其(外区)Apple ID 注册教程:低价订阅 ChatGPT Plus 完整指南(附开启跨区 Apple 家庭共享) 我们都还在路上:在不确定中攒出自己的选择权 Claude Desktop 接入第三方模型 API:基于 ccswitch 的配置与踩坑 从圆肩到挺拔:我的训练计划 V1|我的第一份认真训练计划 一生难忘,仅此一次:傅氏傅厝井朵桥祖厝重建竣工暨祔桃庆典 At Datawahle 我在Datawahle的日常 使用 Waline 实现 iCloud 和 Gmail 邮件通知的完整配置教程 为 Astro 博客打造完美的 Waline 评论系统:从集成到深度定制的完整实践 vscode优化体验(推荐设置 & 推荐插件) YOLO V7及多线程优化和边缘端设备RK3588-RK3588S部署 YOLO V11及多线程优化和边缘端设备RK3588-RK3588S部署 用于备份和恢复 Zotero 配置的插件-蒲公英 Tara Obsidian利用Syncthing全平台同步终极方案 同步ios和PC端 新机Linux(Ubuntu)到手一般都会做如下配置 04讲 - 炼丹流程 - PyTorch深度学习快速入门教程 03讲 - 神经网络 - PyTorch深度学习快速入门教程 02讲 - 数据 - PyTorch深度学习快速入门教程 01讲 - 配置 - PyTorch深度学习快速入门教程 其他设备通过局域网内主机的代理VPN科学上网(以Jetson设备为例) Jetson系统烧入过程(以Orin - Nano为例) Jetson Orin Nano开发指南记录 以RKNN系列模型为例,训练一个yolov7的目标检测模型 常用软件配置分享 - 持续更新 瓦肯举手礼 初识MCP技术 Qwen2.5 - VL的vllm部署方案(图像分析) 部署大模型并用Chatbox连接到远程Ollama服务 配合Cloudflare和Piclist搭建一个属于你的免费图床 代码如诗,文章如歌
关于biome代码审查
2025-06-07 · via Shine & Website

Biome通过自动修复代码格式(如缩进、换行)并支持配置调整,解决Astro和Svelte文件的格式一致性问题。

June 7, 2025  •  1 min read


Note

Biome 检测到多个 .astro.svelte 文件的格式问题,主要是 代码缩进和换行不一致。Biome 会尝试自动修复这些问题,但你需要手动确认或调整配置。

1 解决方案

1.1 自动修复格式问题

运行以下命令,让 Biome 自动修复所有格式问题:

biome format ./src --write

这会直接修改文件,使其符合 Biome 的默认规则。


1.2 手动检查差异

如果自动修复后仍有问题,可以对比 Biome 的期望格式和当前文件的差异:

Biome 会显示哪些行需要调整,例如:

× Formatter would have printed the following content:

1 - import·{·Icon·}·from·"astro-icon/components";

2 + import·{·Icon·}·from·"astro-icon/components";

- 表示当前代码,+ 表示 Biome 期望的格式。

1.3 调整 Biome 配置(可选)

如果默认规则不符合你的需求,可以在 biome.json 中修改配置:

{

"formatter": {

"indentStyle": "space", // 或 "tab"

"indentWidth": 2, // 缩进宽度

"lineWidth": 80 // 每行最大字符数

},

"linter": {

"rules": {

"recommended": true,

"correctness": {

"noUnusedVariables": "off" // 关闭未使用变量的检查

}

}

}

}

然后重新运行检查:

1.4 忽略特定文件或规则

如果某些文件不需要格式化,可以在 biome.json 中添加 ignore

{

"files": {

"ignore": [

"src/components/LightDarkSwitch.svelte",

"src/utils/url-utils.ts"

]

}

}

1.5 使用 npx 临时运行

如果不想全局安装,可以用 npx 直接运行:

npx @biomejs/biome format --write ./src

关于biome代码审查

https://www.futseyi.com/blog/biome-code-review/

Author
FuTseYi

Published at
June 7, 2025

Copyright
CC BY-NC-SA 4.0