Files
headroom/frontend/node_modules/svelte-eslint-parser/lib/parser/index.d.ts
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

53 lines
2.0 KiB
TypeScript

import type { Comment, SourceLocation, SvelteProgram, Token } from "../ast/index.js";
import type { Program } from "estree";
import type { ScopeManager } from "eslint-scope";
import type { Rule, Node } from "postcss";
import type { Node as SelectorNode, Root as SelectorRoot } from "postcss-selector-parser";
import type * as SvAST from "./svelte-ast-types.js";
import type * as Compiler from "./svelte-ast-types-for-v5.js";
import { type StyleContext, type StyleContextNoStyleElement, type StyleContextParseError, type StyleContextSuccess, type StyleContextUnknownLang } from "./style-context.js";
import { type SvelteParseContext } from "./svelte-parse-context.js";
export { StyleContext, StyleContextNoStyleElement, StyleContextParseError, StyleContextSuccess, StyleContextUnknownLang, };
export interface ESLintProgram extends Program {
comments: Comment[];
tokens: Token[];
}
/**
* The parsing result of ESLint custom parsers.
*/
export interface ESLintExtendedProgram {
ast: ESLintProgram;
services?: Record<string, any>;
visitorKeys?: {
[type: string]: string[];
};
scopeManager?: ScopeManager;
_virtualScriptCode?: string;
}
type ParseResult = {
ast: SvelteProgram;
services: Record<string, any> & ({
isSvelte: true;
isSvelteScript: false;
getSvelteHtmlAst: () => SvAST.Fragment | Compiler.Fragment;
getStyleContext: () => StyleContext;
getStyleSelectorAST: (rule: Rule) => SelectorRoot;
styleNodeLoc: (node: Node) => Partial<SourceLocation>;
styleNodeRange: (node: Node) => [number | undefined, number | undefined];
styleSelectorNodeLoc: (node: SelectorNode) => Partial<SourceLocation>;
svelteParseContext: SvelteParseContext;
} | {
isSvelte: false;
isSvelteScript: true;
svelteParseContext: SvelteParseContext;
});
visitorKeys: {
[type: string]: string[];
};
scopeManager: ScopeManager;
};
/**
* Parse source code
*/
export declare function parseForESLint(code: string, options?: any): ParseResult;