Skip to content

bin/linter.mjs fails on auto-generated protos/protos.d.ts due to @typescript-eslint/no-empty-interface #9210

Description

@quirogas

Summary

The monorepo linter (bin/linter.mjs), which executes in .github/workflows/presubmit.yaml, fails when pull requests include changes to auto-generated protobuf declaration files (packages/*/protos/protos.d.ts).

Observations

  1. Linter Scope: bin/linter.mjs selects changed TypeScript files via git diff ... -- *.ts. In Git, this pattern matches *.d.ts files, including packages/*/protos/protos.d.ts.
  2. ESLint Error: ESLint evaluates protos/protos.d.ts and fails with @typescript-eslint/no-empty-interface on empty interfaces:
    error  An empty interface is equivalent to `{}`  @typescript-eslint/no-empty-interface
    ✖ problems (errors, warnings)
    [ERROR] ESLint violations were detected.
    
  3. Repository-Wide Impact:
    • Protobuf messages with no fields (e.g. google.protobuf.Empty, VisibilityFeature, etc.) are compiled by protobufjs (pbts) into empty TypeScript interfaces (interface I<Name> {}).
    • A scan of the repository shows that 243 out of 243 (100%) protos/protos.d.ts files across all packages contain empty interfaces.
    • Any pull request that modifies or regenerates protos/protos.d.ts in any package currently triggers this linter failure.

Steps to Reproduce

  1. Modify or regenerate protos/protos.d.ts in any package (e.g. packages/google-maps-areainsights/protos/protos.d.ts or packages/google-cloud-chronicle/protos/protos.d.ts).
  2. Commit the change.
  3. Run GIT_DIFF_ARG="HEAD~1...HEAD" node ./bin/linter.mjs --strict.
  4. The linter exits with code 1 and reports @typescript-eslint/no-empty-interface violations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions