* fix: resolve lint and type errors to enable CI - Remove stale biome-ignore suppressions in bootstrap.ts, r3f.d.ts, and parametric-node-renderer.tsx (rules no longer fire). - Replace forEach callbacks that return values with for...of loops in node-actions.ts and build-collider-world.ts (lint/suspicious/useIterableCallbackReturn). - Rewrite assign-in-expression guards in ceiling/tool.tsx to explicit if-statements (lint/suspicious/noAssignInExpressions). - Hoist useMemo/useCallback above early return in chimney/panel.tsx (lint/correctness/useHookAtTopLevel). - Add `^build` to turbo check-types dependsOn so packages/core dist is up-to-date before type checking — this resolves all 32 type errors which were caused by stale dist, not missing symbols. * ci: add lint and typecheck workflow on push/PR Adds a quality gate that runs `bun run check` (Biome) and `bun run check-types` (TypeScript) on every push and PR to main. Uses concurrency groups to cancel stale runs. Closes #147. --------- Co-authored-by: Pascal <open@pascal.app>
This commit is contained in:
@@ -250,8 +250,8 @@ export const CeilingTool: React.FC = () => {
|
||||
if (points.length === 0) {
|
||||
mainLineRef.current.visible = false
|
||||
closingLineRef.current.visible = false
|
||||
groundMainLineRef.current && (groundMainLineRef.current.visible = false)
|
||||
groundClosingLineRef.current && (groundClosingLineRef.current.visible = false)
|
||||
if (groundMainLineRef.current) groundMainLineRef.current.visible = false
|
||||
if (groundClosingLineRef.current) groundClosingLineRef.current.visible = false
|
||||
return
|
||||
}
|
||||
const ceilingY = levelY + CEILING_HEIGHT
|
||||
|
||||
@@ -133,6 +133,21 @@ export default function ChimneyPanel() {
|
||||
}
|
||||
}, [selectedId, node, deleteNode, setSelection])
|
||||
|
||||
// Match the current store node against the preset table so the
|
||||
// segmented control highlights "the preset you'd land on if you
|
||||
// applied X again". Compare against the store node, not the live-
|
||||
// override-merged `node`, so the highlight is stable across slider
|
||||
// drags. Null means the user has tweaked away from any preset; the
|
||||
// segmented control will then render with no segment selected.
|
||||
const activePreset = useMemo(() => detectActiveChimneyPreset(storeNode), [storeNode])
|
||||
const applyPreset = useCallback(
|
||||
(key: ChimneyPresetKey) => {
|
||||
commitProp(chimneyPresets[key] as Partial<ChimneyNode>)
|
||||
triggerSFX('sfx:item-pick')
|
||||
},
|
||||
[commitProp],
|
||||
)
|
||||
|
||||
if (!(node && node.type === 'chimney' && selectedId)) return null
|
||||
|
||||
const scenestate = useScene.getState()
|
||||
@@ -322,20 +337,6 @@ export default function ChimneyPanel() {
|
||||
}
|
||||
|
||||
// Match the current store node against the preset table so the
|
||||
// segmented control highlights "the preset you'd land on if you
|
||||
// applied X again". Compare against the store node, not the live-
|
||||
// override-merged `node`, so the highlight is stable across slider
|
||||
// drags. Null means the user has tweaked away from any preset; the
|
||||
// segmented control will then render with no segment selected.
|
||||
const activePreset = useMemo(() => detectActiveChimneyPreset(storeNode), [storeNode])
|
||||
const applyPreset = useCallback(
|
||||
(key: ChimneyPresetKey) => {
|
||||
commitProp(chimneyPresets[key] as Partial<ChimneyNode>)
|
||||
triggerSFX('sfx:item-pick')
|
||||
},
|
||||
[commitProp],
|
||||
)
|
||||
|
||||
return (
|
||||
<PanelWrapper
|
||||
icon="/icons/roof.png"
|
||||
|
||||
Reference in New Issue
Block a user