chore(lint): 修复 Biome 告警(schema 版本/optional chain/CSS !important 抑制)
Some checks failed
CI / check (push) Has been cancelled
CI / build (push) Has been cancelled

- biome.json: $schema 2.5.1 → 2.5.3,对齐已安装的 CLI 版本(消除 info)
- code-block-view.ts:157: `a && a.b()` → `a?.b()`(等价 optional chain)
- style.css:56: 保留刻意的 `transform: none !important`(删除会重新引入
  animation-fill-mode: both 导致的堆叠上下文 bug),仅加 scoped biome-ignore
  抑制 noImportantStyles,不做全局禁用
This commit is contained in:
xfy 2026-07-15 18:12:04 +08:00
parent 27ed605223
commit 22d05a98b3
3 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.1/schema.json",
"$schema": "https://biomejs.dev/schemas/2.5.3/schema.json",
"vcs": {
"enabled": false
},

View File

@ -154,7 +154,7 @@ export class CodeBlockNodeView {
if (mutation.target === this.contentDOM && mutation.type === 'attributes') return true;
// contentDOM 内的 mutationcharacterData/childList交给 ProseMirror编辑核心
// 注意 contains 对 target===contentDOM 自身也返回 true故上面的 attributes 判断须在前。
if (this.contentDOM && this.contentDOM.contains(mutation.target)) return false;
if (this.contentDOM?.contains(mutation.target)) return false;
// 工具栏/结果区等装饰元素的 mutation忽略
return true;
}

View File

@ -53,5 +53,6 @@ html.is-theme-transitioning *::after {
html.is-theme-transitioning .animate-page-enter {
/* !important 必需:animation-fill-mode: both 保留的关键帧值优先级高于普通
规则,只有 !important 能覆盖,确保 VT 期间 transform 被清为 none */
/* biome-ignore lint/complexity/noImportantStyles: animation-fill-mode: both 保留非 none transform 创建堆叠上下文,仅 !important 可覆盖(详见上方注释) */
transform: none !important;
}