Skip to content

CI lint gate misses JS test files and Node build scripts #985

Description

@aram356

The JS lint gate in CI (npm run lint in format.yml) only covers src/**/*.{ts,tsx} because of the lint script's glob in crates/trusted-server-js/lib/package.json. ESLint errors in test/**, the Node build scripts (build-all.mjs, build-prebid-external.mjs), and config files are invisible to CI — npx eslint . on main reports 280 accumulated errors:

  • 249 × @typescript-eslint/no-explicit-any in test files (the established (window as any) mock convention)
  • 16 × no-undef in the .mjs Node scripts (process/console/Buffer — no Node globals declared for them)
  • 10 × import/order, 4 × @typescript-eslint/no-unused-vars (intentionally unused _-prefixed params), 1 × prefer-const

New lint errors in these files land unnoticed.

Fix: widen the lint script to eslint . and make the widened surface clean — disable no-explicit-any for tests (matching the existing convention), declare Node globals for the .mjs scripts, honor the ^_ unused-arg convention, and fix the mechanical remainder. No workflow change needed since format.yml already runs npm run lint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions