chore(lint): 修复 Biome 告警(schema 版本/optional chain/CSS !important 抑制)
- 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:
parent
27ed605223
commit
22d05a98b3
@ -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
|
||||
},
|
||||
|
||||
@ -154,7 +154,7 @@ export class CodeBlockNodeView {
|
||||
if (mutation.target === this.contentDOM && mutation.type === 'attributes') return true;
|
||||
// contentDOM 内的 mutation(characterData/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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user