Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...

    Module Scripts/StripInMethodComments

    Removes leading, trailing and free-standing comments that live inside function/method/arrow/constructor/accessor bodies, while preserving comments that document declarations and any directive comments needed by the tooling chain (ESLint, TypeScript, coverage, bundlers, license headers).

    Rules:

    • Strip block and line comments whose range falls inside any function/method/constructor/get/set/arrow body block.
    • Preserve directive comments anywhere: eslint-, @ts-, prettier-ignore, c8 ignore, istanbul ignore, webpackIgnore, vite-ignore, __PURE__, @vite-, @license, @preserve, @copyright, @cc_on.
    • Always preserve top-level JSDoc anywhere โ€” they document declarations, never live inside method bodies under our codebase rules.

    Usage: npx tsx scripts/strip-in-method-comments.ts [--check] [--quiet] [pathsโ€ฆ]

    With no paths, defaults to src/browser and scripts (recursively), skipping tests, generated artefacts, vendor js/lib, dashboard stubs and declaration files.