mirror of
https://github.com/Dvorinka/Dash.git
synced 2026-10-28 07:41:27 +00:00
Establishes the skeleton every later phase builds on: Go+Gin API with zap logging, /api/healthz, SQLite+goose runner; Vite+React18+TS strict+ Tailwind v4 frontend with bento-mono theme tokens; openapi.yaml driving a generated TS client; oxlint with vendored anti-slop rules; GitHub CI; multi-stage Dockerfile -> 33.6MB distroless image; docker compose up serves the blank board. Generated with [Devin](https://devin.ai) Authored By: TDvorak <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
16 lines
501 B
TypeScript
16 lines
501 B
TypeScript
import type { ESTree, Scope, SourceCode, Variable } from "@oxlint/plugins";
|
|
|
|
/** Resolve an identifier to its binding by walking lexical scopes upward. */
|
|
export function resolveVariable(
|
|
sourceCode: SourceCode,
|
|
identifier: ESTree.IdentifierReference,
|
|
): Variable | null {
|
|
let scope: Scope | null = sourceCode.getScope(identifier);
|
|
while (scope !== null) {
|
|
const variable = scope.set.get(identifier.name);
|
|
if (variable !== undefined) return variable;
|
|
scope = scope.upper;
|
|
}
|
|
return null;
|
|
}
|