Core diagnostic engine for Astro projects. Provides project discovery, lint rules, filter pipeline, and score calculation. Current stable version is 0.2.1. Released irregularly as part of the Diagnost project. Key differentiator: built specifically for the Astro ecosystem with type-safe rule definitions and composable filter pipelines. Unlike generic linters, it understands Astro project structure and component boundaries.
npm install diagnost-coreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a diagnostic engine, registers a custom lint rule, and runs it against the Astro project in the current directory.
Pin exact version and test upgrades thoroughly.
Use import syntax or dynamic import() in CommonJS files.
Always await engine.run() or handle the returned Promise.
Provide an array of rule objects to createEngine or use a separate package for default rules.
Change to dynamic import: `const { createEngine } = await import('diagnost-core');`Ensure createEngine returns an engine object with run method. Run `const engine = createEngine(...);` then `await engine.run();`
Pass an object with a 'rules' property as an array. Example: `createEngine({ rules: [] })`