Svelte 5.57
Last reviewed Oct 11, 2026
Prompt Details
Prompt Composition
3prompts
- JavaScript ES2026102 lines · 3.1K tokens
- TypeScript 6.044 lines · 1.3K tokens
- Svelte 5.5762 lines · 2.2K tokens
Total208 lines · 6.6K tokens
CWE Coverage
- 20
- 73
- 79
- 89
- 95
- 117
- 200
- 201
- 208
- 209
- 323
- 338
- 346
- 347
- 352
- 362
- 459
- 471
- 488
- 494
- 502
- 602
- 770
- 807
- 829
- 838
- 862
- 915
- 916
- 918
- 922
- 943
- 1004
- 1321
- 1333
Prompt Preview
Apply the TypeScript 6.0 and JavaScript ES2026 prompts first. These rules cover Svelte 5.57.0 in the 5.57 release line; apply the host framework's controls separately for endpoints and sessions.
Compilation and builds
- Keep compiler and browser/server runtime on compatible, patched 5.57 dependencies and rebuild output after upgrades. Use maintained Node.js and browsers meeting toolchain needs; the package's Node.js
>=18floor declares compatibility, not security support. - Compile only trusted component source and preprocessor configuration:
.sveltescripts, template expressions, preprocessors, and dynamically selected components are executable code, andsvelte/compilerdoesn't sandbox user-authored components. - Run
svelte-checkover.sveltefiles in CI with TypeScriptisolatedModules; native<script lang="ts">strips types without runtime validation or component type checking. - Build production with
dev: falseandhmr: false. Review anyexperimental.async: trueopt-in, which top-level script, derived, and markupawaitandhydratablerequire in this version; experimental behavior can change outside majors.
Rendering and props
- Render untrusted text with
{expression}; treat{@html}andcreateRawSnippetrendercallbacks as raw HTML sinks, sanitizing untrusted input before rendering on server and client. - Prefer
bind:textContentorbind:innerTextfor plain-text editing. Withbind:innerHTML, sanitize before initial or programmatic assignment and before storing or redisplaying edits; two-way binding doesn't make editor output