📋 Issue Type
Code Quality / Tooling
🎯 Objective
Achieve zero-warning ESLint compliance, eliminate all any types, resolve knip dead-code findings, fix TypeDoc configuration issues, and improve all reporting (coverage, API docs, dependency reports).
📊 Current State
- ESLint
@typescript-eslint/no-explicit-any is set to warn — many existing usages across scripts/ and src/
no-unused-vars is warn for JS files — unchecked violations
knip.json has ignoreDependencies and ignoreBinaries workarounds rather than proper resolution
typedoc.json entry points include js/ directory (mixed JS/TS documentation)
tsconfig.typedoc.json may have configuration mismatches causing documentation gaps
- Test coverage reporting (
vitest run --coverage) output not fully integrated into docs
- Dependency report generation (
docs:dependencies script) uses placeholder patterns
🚀 Desired State
ESLint
- Zero warnings on
npm run lint — all warn rules promoted to error or violations fixed
@typescript-eslint/no-explicit-any → error (all any replaced with proper types)
no-unused-vars → error for remaining JS files
- Add
@typescript-eslint/strict-boolean-expressions as warn for improved type safety
- Add
@typescript-eslint/no-floating-promises for async safety
Strict Typing
- All function parameters and return types explicitly typed
- No
any in scripts/, src/browser/, or tests/
- Shared type definitions in
scripts/types/ for common data structures
- Proper generic types for MCP client responses, IMF data, CIA schemas
Knip Configuration
- Remove items from
ignoreDependencies that can be properly resolved
- Ensure all entry points are correctly declared
- Zero knip violations on
npx knip
- Add
scripts/render-lib/**/*.ts, scripts/generate-news-indexes/**/*.ts, scripts/rss/**/*.ts, scripts/sitemap-html/**/*.ts, scripts/sitemap-xml/**/*.ts to entry points if missing
TypeDoc
- Fix
typedoc.json to exclude legacy js/ if not properly documented
- Validate
tsconfig.typedoc.json includes all relevant source paths
- Ensure generated API documentation at
docs/api/ is complete and navigable
- Custom block tags (
@osint, @intelligence, @parliament, etc.) properly rendered
- All public functions have JSDoc with
@param, @returns, @example
Reporting
npm run coverage produces HTML report usable in CI
npm run docs:dependencies produces valid dependency tree
npm run typedoc runs without errors or warnings
- Test result reports properly formatted for CI artifacts
🔧 Implementation Approach
- Run
npm run lint and categorize all warnings by type/file
- Fix
no-explicit-any violations — define interfaces for common shapes (IMF data, MCP responses, CIA schemas, article metadata)
- Fix unused variable warnings in JS files
- Review and update
knip.json entry points and project patterns
- Run
npx knip and resolve all findings (remove dead exports, fix dependency declarations)
- Fix
typedoc.json configuration — validate against current source layout
- Add missing JSDoc to public APIs
- Validate all reporting scripts produce clean output
📚 Key Files
| File |
Purpose |
eslint.config.js |
ESLint flat config — rules to tighten |
knip.json |
Knip dead-code detection config |
typedoc.json |
API documentation generator config |
tsconfig.typedoc.json |
TypeScript config for documentation |
tsconfig.scripts.json |
TypeScript config for scripts |
tsconfig.lib.json |
TypeScript config for library build |
package.json |
Script definitions for lint/docs/coverage |
scripts/types/ |
Shared type definitions |
scripts/imf-client.ts |
Example of large file needing type improvements |
scripts/render-lib/ |
Render library modules |
✅ Acceptance Criteria
🤖 Recommended Agent
code-quality-engineer — ESLint configuration, TypeScript strict typing, dead-code analysis, documentation tooling
🏷️ Labels
enhancement, refactor, component:quality-assurance, priority-high, size-l
📋 Issue Type
Code Quality / Tooling
🎯 Objective
Achieve zero-warning ESLint compliance, eliminate all
anytypes, resolve knip dead-code findings, fix TypeDoc configuration issues, and improve all reporting (coverage, API docs, dependency reports).📊 Current State
@typescript-eslint/no-explicit-anyis set towarn— many existing usages acrossscripts/andsrc/no-unused-varsiswarnfor JS files — unchecked violationsknip.jsonhasignoreDependenciesandignoreBinariesworkarounds rather than proper resolutiontypedoc.jsonentry points includejs/directory (mixed JS/TS documentation)tsconfig.typedoc.jsonmay have configuration mismatches causing documentation gapsvitest run --coverage) output not fully integrated into docsdocs:dependenciesscript) uses placeholder patterns🚀 Desired State
ESLint
npm run lint— allwarnrules promoted toerroror violations fixed@typescript-eslint/no-explicit-any→error(allanyreplaced with proper types)no-unused-vars→errorfor remaining JS files@typescript-eslint/strict-boolean-expressionsaswarnfor improved type safety@typescript-eslint/no-floating-promisesfor async safetyStrict Typing
anyinscripts/,src/browser/, ortests/scripts/types/for common data structuresKnip Configuration
ignoreDependenciesthat can be properly resolvednpx knipscripts/render-lib/**/*.ts,scripts/generate-news-indexes/**/*.ts,scripts/rss/**/*.ts,scripts/sitemap-html/**/*.ts,scripts/sitemap-xml/**/*.tsto entry points if missingTypeDoc
typedoc.jsonto exclude legacyjs/if not properly documentedtsconfig.typedoc.jsonincludes all relevant source pathsdocs/api/is complete and navigable@osint,@intelligence,@parliament, etc.) properly rendered@param,@returns,@exampleReporting
npm run coverageproduces HTML report usable in CInpm run docs:dependenciesproduces valid dependency treenpm run typedocruns without errors or warnings🔧 Implementation Approach
npm run lintand categorize all warnings by type/fileno-explicit-anyviolations — define interfaces for common shapes (IMF data, MCP responses, CIA schemas, article metadata)knip.jsonentry points and project patternsnpx knipand resolve all findings (remove dead exports, fix dependency declarations)typedoc.jsonconfiguration — validate against current source layout📚 Key Files
eslint.config.jsknip.jsontypedoc.jsontsconfig.typedoc.jsontsconfig.scripts.jsontsconfig.lib.jsonpackage.jsonscripts/types/scripts/imf-client.tsscripts/render-lib/✅ Acceptance Criteria
npm run lintexits with 0 and zero warningsanytypes inscripts/**/*.tsandsrc/**/*.tsnpx knipexits with 0 findingsnpm run typedoccompletes without errorsnpm run coverageproduces valid HTML reportnpm run buildsucceeds without type errorsnpm run build:libsucceeds for library package🤖 Recommended Agent
code-quality-engineer— ESLint configuration, TypeScript strict typing, dead-code analysis, documentation tooling🏷️ Labels
enhancement,refactor,component:quality-assurance,priority-high,size-l