yggdrasil/libs/biome.json
xfy 22d05a98b3
Some checks failed
CI / check (push) Has been cancelled
CI / build (push) Has been cancelled
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,不做全局禁用
2026-07-15 18:12:04 +08:00

80 lines
1.5 KiB
JSON

{
"$schema": "https://biomejs.dev/schemas/2.5.3/schema.json",
"vcs": {
"enabled": false
},
"files": {
"includes": [
"**/*.ts",
"**/*.js",
"**/*.json",
"**/*.jsonc",
"**/*.css",
"**/*.html",
"!**/node_modules",
"!**/dist"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100,
"lineEnding": "lf"
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended",
"style": {
"useImportType": "warn",
"useNodejsImportProtocol": "warn",
"useTemplate": "off",
"noNonNullAssertion": "off"
},
"suspicious": {
"noConsole": "off",
"noExplicitAny": "off"
},
"correctness": {
"noUnusedVariables": "warn"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always",
"trailingCommas": "all",
"arrowParentheses": "always"
}
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2
}
},
"css": {
"formatter": {
"enabled": true,
"quoteStyle": "single"
}
},
"overrides": [
{
"includes": ["**/*.css"],
"linter": {
"rules": {
"style": {
"noDescendingSpecificity": "off"
},
"suspicious": {
"noDuplicateProperties": "off"
}
}
}
}
]
}