mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
Move DOM bridge lint exclusions to Biome includes
This commit is contained in:
parent
e39d4b90a4
commit
e5f65736d6
3 changed files with 18 additions and 4 deletions
20
biome.jsonc
20
biome.jsonc
|
|
@ -47,7 +47,16 @@
|
|||
// UI and DOM source boundaries.
|
||||
{
|
||||
"path": "./scripts/lint/no-implicit-dom-bridges.grit",
|
||||
"includes": ["**/src/**/*.ts", "**/src/**/*.tsx"]
|
||||
"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",
|
||||
|
|
@ -64,7 +73,14 @@
|
|||
},
|
||||
{
|
||||
"path": "./scripts/lint/no-ui-root-imports.grit",
|
||||
"includes": ["**/src/**/*.ts", "**/src/**/*.tsx"]
|
||||
"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",
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ or {
|
|||
`$target.defaultView` as $stmt,
|
||||
`$target.style.$property` as $stmt
|
||||
} where {
|
||||
not { $filename <: r".*\.(?:dom|obsidian|measure)\.tsx?$" },
|
||||
not { $stmt <: `$target.addEventListener("abort", $...)` },
|
||||
not { $stmt <: `$target.removeEventListener("abort", $...)` },
|
||||
register_diagnostic(span=$stmt, message="Keep DOM reads, writes, measurements, hit-tests, focus, and event wiring in files named with a .dom, .obsidian, or .measure suffix.", severity="error")
|
||||
|
|
|
|||
|
|
@ -12,6 +12,5 @@ private pattern js_module_reference() {
|
|||
|
||||
js_module_reference() as $stmt where {
|
||||
$stmt <: contains `$source` where { $source <: r"^[\"'].*shared/ui/ui-root\.dom[\"']$" },
|
||||
not { $filename <: r".*\.(?:dom|obsidian|measure)\.tsx?$" },
|
||||
register_diagnostic(span=$stmt, message="Import the Preact root adapter only from explicit root bridge files.", severity="error")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue