mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
277 lines
8.7 KiB
Text
277 lines
8.7 KiB
Text
{
|
|
"$schema": "https://biomejs.dev/schemas/2.5.1/schema.json",
|
|
"vcs": {
|
|
"enabled": true,
|
|
"clientKind": "git",
|
|
"useIgnoreFile": true
|
|
},
|
|
"plugins": [
|
|
// Project-wide source shape and placement.
|
|
{
|
|
"path": "./scripts/grit/source-shape/no-handwritten-reexports.grit",
|
|
"includes": ["**/*.ts", "**/*.tsx", "**/*.mjs"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/source-shape/no-responsibility-root-module-files.grit",
|
|
"includes": [
|
|
"**/src/app-server/*.ts",
|
|
"**/src/app-server/*.tsx",
|
|
"**/src/domain/*.ts",
|
|
"**/src/domain/*.tsx",
|
|
"**/src/features/chat/*.ts",
|
|
"**/src/features/chat/*.tsx",
|
|
"**/src/features/threads/*.ts",
|
|
"**/src/features/threads/*.tsx",
|
|
"**/src/shared/*.ts",
|
|
"**/src/shared/*.tsx"
|
|
]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/source-shape/no-misplaced-tsx.grit",
|
|
"includes": [
|
|
"**/src/**/*.tsx",
|
|
"!**/src/features/chat/panel/**",
|
|
"!**/src/features/chat/ui/**",
|
|
"!**/src/features/selection-rewrite/*.dom.tsx",
|
|
"!**/src/features/turn-diff/*.dom.tsx",
|
|
"!**/src/features/threads-view/*.dom.tsx",
|
|
"!**/src/settings/**",
|
|
"!**/src/shared/ui/**"
|
|
]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/source-shape/no-self-referential-initializer-callback.grit",
|
|
"includes": ["**/*.ts", "**/*.tsx", "**/*.mjs"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/source-shape/no-unsafe-iterator-value.grit",
|
|
"includes": ["**/*.ts", "**/*.tsx", "**/*.mjs"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/source-shape/no-uncontrolled-preact-form-state.grit",
|
|
"includes": ["**/src/**/*.tsx"]
|
|
},
|
|
|
|
// Cross-cutting source-layer import boundaries.
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-domain-outer-layer-imports.grit",
|
|
"includes": ["**/src/domain/**/*.ts", "**/src/features/chat/domain/**/*.ts"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-lower-level-feature-imports.grit",
|
|
"includes": ["**/src/app-server/**/*.ts", "**/src/shared/**/*.ts", "**/src/shared/**/*.tsx"]
|
|
},
|
|
|
|
// App-server and generated protocol boundaries.
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-app-server-subfolder-root-imports.grit",
|
|
"includes": ["**/src/app-server/**/*.ts"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-app-server-connection-boundary-imports.grit",
|
|
"includes": ["**/src/app-server/protocol/**/*.ts", "**/src/domain/**/*.ts", "**/src/shared/**/*.ts", "**/src/shared/**/*.tsx"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-app-server-protocol-boundary-imports.grit",
|
|
"includes": ["**/src/**/*.ts", "**/src/**/*.tsx", "!**/src/app-server/**"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-generated-app-server-boundary-imports.grit",
|
|
"includes": [
|
|
"**/src/**/*.ts",
|
|
"**/src/**/*.tsx",
|
|
"!**/src/app-server/connection/**",
|
|
"!**/src/app-server/protocol/server-requests.ts",
|
|
"!**/src/app-server/protocol/turn.ts"
|
|
]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/runtime/no-app-server-direct-rpcs.grit",
|
|
"includes": ["**/src/**/*.ts", "**/src/**/*.tsx", "!**/src/app-server/**", "!**/src/features/chat/app-server/**"]
|
|
},
|
|
// Workspace and feature coordination boundaries.
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-chat-workspace-boundary-imports.grit",
|
|
"includes": ["**/src/features/chat/**/*.ts", "**/src/features/chat/**/*.tsx"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-feature-workspace-boundary-imports.grit",
|
|
"includes": ["**/src/features/**/*.ts", "**/src/features/**/*.tsx", "!**/src/features/chat/**"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-workspace-chat-internal-imports.grit",
|
|
"includes": ["**/src/workspace/**/*.ts"]
|
|
},
|
|
|
|
// Chat feature layer boundaries.
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-chat-application-outer-layer-imports.grit",
|
|
"includes": ["**/src/features/chat/application/**/*.ts"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-chat-app-server-outer-layer-imports.grit",
|
|
"includes": ["**/src/features/chat/app-server/**/*.ts"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-chat-host-rendering-layer-imports.grit",
|
|
"includes": ["**/src/features/chat/host/**/*.ts"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-chat-panel-runtime-boundary-imports.grit",
|
|
"includes": ["**/src/features/chat/panel/**/*.ts", "**/src/features/chat/panel/**/*.tsx"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-chat-presentation-outer-layer-imports.grit",
|
|
"includes": ["**/src/features/chat/presentation/**/*.ts"]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-chat-ui-outer-layer-imports.grit",
|
|
"includes": ["**/src/features/chat/ui/**/*.ts", "**/src/features/chat/ui/**/*.tsx"]
|
|
},
|
|
|
|
// Chat state and runtime ownership.
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-preact-signal-imports.grit",
|
|
"includes": [
|
|
"**/src/**/*.ts",
|
|
"**/src/**/*.tsx",
|
|
"!**/src/features/chat/panel/shell-read-model.ts",
|
|
"!**/src/features/chat/panel/surface/**/*.ts",
|
|
"!**/src/features/chat/panel/surface/**/*.tsx"
|
|
]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-chat-shell-read-model-imports.grit",
|
|
"includes": [
|
|
"**/src/features/chat/**/*.ts",
|
|
"**/src/features/chat/**/*.tsx",
|
|
"!**/src/features/chat/panel/shell-read-model.ts",
|
|
"!**/src/features/chat/panel/shell.dom.tsx",
|
|
"!**/src/features/chat/panel/composer-controller.ts",
|
|
"!**/src/features/chat/panel/surface/**/*.ts",
|
|
"!**/src/features/chat/panel/surface/**/*.tsx"
|
|
]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/import-boundaries/no-chat-signal-type-references.grit",
|
|
"includes": [
|
|
"**/src/features/chat/**/*.ts",
|
|
"**/src/features/chat/**/*.tsx",
|
|
"!**/src/features/chat/panel/shell-read-model.ts",
|
|
"!**/src/features/chat/panel/surface/**/*.ts",
|
|
"!**/src/features/chat/panel/surface/**/*.tsx"
|
|
]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/runtime/no-state-module-side-effects.grit",
|
|
"includes": ["**/src/features/chat/application/state/**/*.ts"]
|
|
},
|
|
|
|
// DOM bridge and Preact root boundaries.
|
|
{
|
|
"path": "./scripts/grit/dom/no-implicit-dom-bridges.grit",
|
|
"includes": [
|
|
"**/src/**/*.ts",
|
|
"**/src/**/*.tsx",
|
|
"!**/src/**/*.dom.ts",
|
|
"!**/src/**/*.dom.tsx",
|
|
"!**/src/**/*.obsidian.ts",
|
|
"!**/src/**/*.obsidian.tsx",
|
|
"!**/src/**/*.measure.ts",
|
|
"!**/src/**/*.measure.tsx"
|
|
]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/dom/no-dom-events-imports.grit",
|
|
"includes": [
|
|
"**/src/**/*.ts",
|
|
"**/src/**/*.tsx",
|
|
"!**/src/**/*.dom.ts",
|
|
"!**/src/**/*.dom.tsx",
|
|
"!**/src/**/*.obsidian.ts",
|
|
"!**/src/**/*.obsidian.tsx",
|
|
"!**/src/**/*.measure.ts",
|
|
"!**/src/**/*.measure.tsx"
|
|
]
|
|
},
|
|
{
|
|
"path": "./scripts/grit/dom/no-ui-root-imports.grit",
|
|
"includes": [
|
|
"**/src/**/*.ts",
|
|
"**/src/**/*.tsx",
|
|
"!**/src/**/*.dom.ts",
|
|
"!**/src/**/*.dom.tsx",
|
|
"!**/src/**/*.obsidian.ts",
|
|
"!**/src/**/*.obsidian.tsx"
|
|
]
|
|
},
|
|
|
|
// CSS source policy.
|
|
{
|
|
"path": "./scripts/grit/no-restricted-css-policy.grit",
|
|
"includes": ["**/src/styles/**/*.css"]
|
|
}
|
|
],
|
|
"files": {
|
|
"includes": [
|
|
"*.config.mjs",
|
|
"*.config.ts",
|
|
"*.css",
|
|
"*.json",
|
|
"*.jsonc",
|
|
"*.mjs",
|
|
"scripts/**/*.{json,jsonc}",
|
|
"scripts/**/*.grit",
|
|
"scripts/**/*.mjs",
|
|
"src/**/*.{css,ts,tsx}",
|
|
"tests/**/*.{mjs,ts,tsx}",
|
|
"!src/generated"
|
|
]
|
|
},
|
|
"formatter": {
|
|
"indentStyle": "space",
|
|
"lineWidth": 140
|
|
},
|
|
"assist": {
|
|
"actions": {
|
|
"source": {
|
|
"noDuplicateClasses": "on",
|
|
"organizeImports": "on"
|
|
}
|
|
}
|
|
},
|
|
"linter": {
|
|
"domains": {
|
|
"react": "recommended",
|
|
"test": "recommended"
|
|
},
|
|
"rules": {
|
|
"preset": "recommended",
|
|
"complexity": {
|
|
"useLiteralKeys": "off"
|
|
},
|
|
"correctness": {
|
|
"useExhaustiveDependencies": {
|
|
"level": "error",
|
|
"options": {
|
|
"reportUnnecessaryDependencies": false
|
|
}
|
|
}
|
|
},
|
|
"nursery": {
|
|
"noExcessiveSelectorClasses": {
|
|
"level": "error",
|
|
"options": {
|
|
"maxClasses": 4
|
|
}
|
|
}
|
|
},
|
|
"style": {
|
|
"noCommonJs": "error"
|
|
},
|
|
"suspicious": {
|
|
"noImportCycles": "error"
|
|
}
|
|
}
|
|
}
|
|
}
|