Skip to main content
Fensu can analyze TypeScript and SvelteKit targets natively, without starting Node. Web analysis uses named targets, so a repository can check Python and web projects in one deterministic fensu check run.
Web analyzers are newer and less broadly exercised than Fensu’s Python analyzer. Include a confidently detected SvelteKit project during repository-wide Fensu onboarding, but do not expand an unrelated scoped task into frontend policy work. Existing configured targets always apply.

Repository-wide onboarding

Run the normal initializer when the user asks to set up Fensu for the repository:
Fensu recognizes a SvelteKit target only when one directory contains all of the following:
  • svelte.config.js, .cjs, .mjs, or .ts;
  • package.json with a non-empty @sveltejs/kit dependency or dev dependency;
  • tsconfig.json or jsconfig.json; and
  • a src/ directory.
If Python packages are present too, init writes explicit Python and Svelte targets. Use --exclude-target NAME only when repository-wide onboarding deliberately excludes one detected web project. Generic TypeScript files alone do not imply a particular architecture policy and are not auto-detected as a target. For a new SvelteKit-only setup, an explicit preset is also available:

Add a target

To add SvelteKit to an existing explicit-target fensu.toml:
This appends a validated [targets.web] block without converting or overwriting an ambiguous configuration. See fensu target for its safety contract.

Configuration

A mixed repository can declare both analyzers:
root is relative to the repository configuration and the target’s roots, tests, and tooling are relative to that root. Use analyzer = "typescript" for an explicitly configured generic TypeScript project, or analyzer = "svelte" with framework = "sveltekit" for SvelteKit. With several targets, fensu check evaluates all of them and renders one report. Use fensu check --target web to select one. Positional paths also require one selected target.

What it checks

The FW policy covers TypeScript imports, ownership and module shape, annotations, naming, hygiene, and test conventions. Svelte analysis adds component and state contracts. The SvelteKit framework adds route, resource, UI-kit, generated-client, and API-boundary policies where configured. Inspect any reported contract in the selected web target:
Fensu reads TypeScript/JavaScript config inheritance and static path aliases. It also reads literal SvelteKit kit.alias values. When a required alias is dynamic, Fensu fails with a configuration diagnostic rather than guessing. A missing generated .svelte-kit/tsconfig.json is accepted on a fresh checkout. Python custom rules and fensu map remain Python analyzer features. Web targets use the shipped native FW catalogue.

Gradual adoption

Use the same target-local controls as other analyzers. To measure the full web policy without blocking CI:
Run fensu check --warn, then move proven rules or paths into blocking policy as the repository adopts them.