* 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>
97 lines
2.2 KiB
TypeScript
97 lines
2.2 KiB
TypeScript
/**
|
|
* R3F JSX intrinsic element declarations for three.js primitives.
|
|
*
|
|
* @react-three/fiber augments JSX.IntrinsicElements globally via module
|
|
* augmentation, but the augmentation doesn't reliably propagate during
|
|
* composite tsc --build in CI because bun resolves @react-three/fiber's
|
|
* peer deps into variant directories where @types/three is unreachable.
|
|
*
|
|
* This file replicates the module augmentation pattern R3F uses, declaring
|
|
* the subset of three.js elements we actually use.
|
|
*
|
|
* The empty export makes this file a module, which is required for
|
|
* `declare module` to augment existing modules rather than replace them.
|
|
*/
|
|
|
|
export {}
|
|
|
|
interface ThreeJSXElements {
|
|
// Containers
|
|
group: any
|
|
scene: any
|
|
// Geometries
|
|
boxGeometry: any
|
|
planeGeometry: any
|
|
circleGeometry: any
|
|
cylinderGeometry: any
|
|
sphereGeometry: any
|
|
extrudeGeometry: any
|
|
shapeGeometry: any
|
|
bufferGeometry: any
|
|
edgesGeometry: any
|
|
ringGeometry: any
|
|
// Meshes & lines
|
|
mesh: any
|
|
instancedMesh: any
|
|
line: any
|
|
lineSegments: any
|
|
lineLoop: any
|
|
points: any
|
|
// Materials
|
|
meshStandardMaterial: any
|
|
meshBasicMaterial: any
|
|
meshPhongMaterial: any
|
|
meshLambertMaterial: any
|
|
meshPhysicalMaterial: any
|
|
meshNormalMaterial: any
|
|
shadowMaterial: any
|
|
lineBasicMaterial: any
|
|
lineDashedMaterial: any
|
|
pointsMaterial: any
|
|
shaderMaterial: any
|
|
rawShaderMaterial: any
|
|
spriteMaterial: any
|
|
// Lights
|
|
ambientLight: any
|
|
directionalLight: any
|
|
pointLight: any
|
|
spotLight: any
|
|
hemisphereLight: any
|
|
rectAreaLight: any
|
|
// Cameras
|
|
perspectiveCamera: any
|
|
orthographicCamera: any
|
|
// Helpers
|
|
gridHelper: any
|
|
axesHelper: any
|
|
arrowHelper: any
|
|
// Misc
|
|
sprite: any
|
|
lOD: any
|
|
fog: any
|
|
color: any
|
|
// Buffer attribute
|
|
bufferAttribute: any
|
|
instancedBufferAttribute: any
|
|
// Primitive (R3F-specific)
|
|
primitive: any
|
|
}
|
|
|
|
declare module 'react' {
|
|
namespace JSX {
|
|
interface IntrinsicElements extends ThreeJSXElements {}
|
|
}
|
|
}
|
|
|
|
declare module 'react/jsx-runtime' {
|
|
namespace JSX {
|
|
interface IntrinsicElements extends ThreeJSXElements {}
|
|
}
|
|
}
|
|
|
|
declare module 'react/jsx-dev-runtime' {
|
|
namespace JSX {
|
|
interface IntrinsicElements extends ThreeJSXElements {}
|
|
}
|
|
}
|