murashit_codex-panel/biome.jsonc

204 lines
5.7 KiB
Text

{
"$schema": "https://biomejs.dev/schemas/2.5.1/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"plugins": [
// App-server protocol and generated binding boundaries.
{
"path": "./scripts/lint/no-app-server-projection-rpcs.grit",
"includes": ["**/src/features/chat/application/**/*.ts"]
},
{
"path": "./scripts/lint/no-app-server-protocol-boundary-imports.grit",
"includes": ["**/src/**/*.ts", "**/src/**/*.tsx", "!**/src/app-server/**"]
},
{
"path": "./scripts/lint/no-generated-app-server-boundary-imports.grit",
"includes": ["**/src/**/*.ts", "**/src/**/*.tsx", "!**/src/app-server/connection/**"]
},
// Shared source layering boundaries.
{
"path": "./scripts/lint/no-domain-outer-layer-imports.grit",
"includes": ["**/src/domain/**/*.ts", "**/src/features/chat/domain/**/*.ts"]
},
{
"path": "./scripts/lint/no-lower-level-feature-imports.grit",
"includes": ["**/src/app-server/**/*.ts", "**/src/shared/**/*.ts", "**/src/shared/**/*.tsx"]
},
{
"path": "./scripts/lint/no-app-server-connection-boundary-imports.grit",
"includes": ["**/src/app-server/protocol/**/*.ts", "**/src/domain/**/*.ts", "**/src/shared/**/*.ts", "**/src/shared/**/*.tsx"]
},
// Chat feature architecture.
{
"path": "./scripts/lint/no-preact-signal-imports.grit",
"includes": ["**/src/**/*.ts", "**/src/**/*.tsx", "!**/src/features/chat/panel/shell-state.tsx"]
},
{
"path": "./scripts/lint/no-state-module-side-effects.grit",
"includes": ["**/src/features/chat/application/state/**/*.ts"]
},
{
"path": "./scripts/lint/no-chat-application-outer-layer-imports.grit",
"includes": ["**/src/features/chat/application/**/*.ts"]
},
{
"path": "./scripts/lint/no-chat-app-server-outer-layer-imports.grit",
"includes": ["**/src/features/chat/app-server/**/*.ts"]
},
{
"path": "./scripts/lint/no-chat-panel-runtime-boundary-imports.grit",
"includes": ["**/src/features/chat/panel/**/*.ts", "**/src/features/chat/panel/**/*.tsx"]
},
{
"path": "./scripts/lint/no-chat-presentation-outer-layer-imports.grit",
"includes": ["**/src/features/chat/presentation/**/*.ts"]
},
{
"path": "./scripts/lint/no-chat-ui-outer-layer-imports.grit",
"includes": ["**/src/features/chat/ui/**/*.ts", "**/src/features/chat/ui/**/*.tsx"]
},
// UI and DOM source boundaries.
{
"path": "./scripts/lint/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/lint/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/lint/no-ui-root-imports.grit",
"includes": [
"**/src/**/*.ts",
"**/src/**/*.tsx",
"!**/src/**/*.dom.ts",
"!**/src/**/*.dom.tsx",
"!**/src/**/*.obsidian.ts",
"!**/src/**/*.obsidian.tsx"
]
},
{
"path": "./scripts/lint/no-uncontrolled-preact-form-state.grit",
"includes": ["**/src/**/*.tsx"]
},
// Project-wide source shape.
{
"path": "./scripts/lint/no-misplaced-tsx.grit",
"includes": [
"**/src/**/*.tsx",
"!**/src/features/chat/panel/**",
"!**/src/features/chat/ui/**",
"!**/src/features/selection-rewrite/*.dom.tsx",
"!**/src/features/threads-view/*.dom.tsx",
"!**/src/settings/**",
"!**/src/shared/ui/**"
]
},
{
"path": "./scripts/lint/no-handwritten-reexports.grit",
"includes": ["**/*.ts", "**/*.tsx", "**/*.mjs"]
},
{
"path": "./scripts/lint/no-self-referential-initializer-callback.grit",
"includes": ["**/*.ts", "**/*.tsx", "**/*.mjs"]
},
{
"path": "./scripts/lint/no-unsafe-iterator-value.grit",
"includes": ["**/*.ts", "**/*.tsx", "**/*.mjs"]
},
// CSS source policy.
{
"path": "./scripts/lint/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"
}
}
}
}