- 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
53 lines
2.0 KiB
TypeScript
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;
|