将 pnpm workspace 根从项目根移到 libs/,项目根保持纯 Rust,JS 工作区自治: - package.json/pnpm-workspace.yaml/pnpm-lock.yaml/biome.json 迁入 libs/ - pnpm-workspace.yaml glob 从 'libs/*' 改为 '*'(已在 libs/ 内) - biome.json 关闭 vcs.useIgnoreFile(libs/ 无独立 .gitignore, files.includes 已显式排除 node_modules/dist) - Makefile 所有 pnpm/biome 调用加 'cd libs &&' 前缀 Makefile 同步整合 lint/fix(替代独立 clippy/fix target): - make lint = biome check (libs) + cargo clippy - make fix = biome format --write (libs) + cargo fix - 删除 8 个 build-*-incremental/build-* target,改为 build-libs 聚合 + build-<name> 用 pnpm --filter 单库便利 target 修复 biome 格式化回归:tiptap-editor/src/index.ts:83 的 sourceTextarea!.value 被 biome 误转为可选链 ?.,导致 TS2345(string | undefined 不匹配 string), 已还原为非空断言。
80 lines
1.5 KiB
JSON
80 lines
1.5 KiB
JSON
{
|
|
"$schema": "https://biomejs.dev/schemas/2.5.1/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|