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
- 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.
- 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.
- 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
- 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).
- Commit the change.
- Run
GIT_DIFF_ARG="HEAD~1...HEAD" node ./bin/linter.mjs --strict.
- The linter exits with code 1 and reports
@typescript-eslint/no-empty-interface violations.
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
bin/linter.mjsselects changed TypeScript files viagit diff ... -- *.ts. In Git, this pattern matches*.d.tsfiles, includingpackages/*/protos/protos.d.ts.protos/protos.d.tsand fails with@typescript-eslint/no-empty-interfaceon empty interfaces:google.protobuf.Empty,VisibilityFeature, etc.) are compiled byprotobufjs(pbts) into empty TypeScript interfaces (interface I<Name> {}).protos/protos.d.tsfiles across all packages contain empty interfaces.protos/protos.d.tsin any package currently triggers this linter failure.Steps to Reproduce
protos/protos.d.tsin any package (e.g.packages/google-maps-areainsights/protos/protos.d.tsorpackages/google-cloud-chronicle/protos/protos.d.ts).GIT_DIFF_ARG="HEAD~1...HEAD" node ./bin/linter.mjs --strict.@typescript-eslint/no-empty-interfaceviolations.