Skip to content

chore(lint): exempt generated GAPIC files from promise/prefer-const rules - #9429

Merged
bshaffer merged 2 commits into
mainfrom
fix-generated-gapic-lint
Sep 23, 2026
Merged

bshaffer merged 2 commits into
mainfrom
fix-generated-gapic-lint

Conversation

@bshaffer

Copy link
Copy Markdown
Contributor

Generated GAPIC clients (packages/*/src/v*/) and their gapic_*.ts tests lost their per-package root: true eslintrc in #8266, so the root config's plugin:promise/recommended + gts rules now fail every regeneration PR (e.g. #9427, 59 errors).

Adds an override turning off promise/always-return, promise/catch-or-return, @typescript-eslint/no-floating-promises, and prefer-const for those paths — mirroring the existing handwritten/firestore GAPIC override.

…ules

Generated clients and gapic_*.ts tests lost their per-package 'root: true'
eslintrc in #8266, so root promise/* + gts rules now break every regen PR.
@bshaffer
bshaffer requested a review from a team as a code owner September 23, 2026 18:00

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the .eslintrc.json configuration to disable specific ESLint rules, such as promise-related rules and prefer-const, for generated GAPIC surfaces and their unit tests. This prevents linting issues on code that cannot be hand-edited. No review comments were provided, so there is no additional feedback to address.

@github-actions
github-actions Bot requested a review from feywind September 23, 2026 18:10

@quirogas quirogas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!

Split the override's rules into the pre-#8458 restoration (promise/*) and
the new relaxation (no-floating-promises, prefer-const), with TODO(#9432)
for the latter.
@bshaffer
bshaffer merged commit ae52e32 into main Sep 23, 2026
50 checks passed
@bshaffer
bshaffer deleted the fix-generated-gapic-lint branch September 23, 2026 19:01
danieljbruce pushed a commit that referenced this pull request Sep 29, 2026
…ules (#9429)

Generated GAPIC clients (`packages/*/src/v*/`) and their `gapic_*.ts`
tests lost their per-package `root: true` eslintrc in #8266, so the root
config's `plugin:promise/recommended` + gts rules now fail every
regeneration PR (e.g. #9427, 59 errors).

Adds an override turning off `promise/always-return`,
`promise/catch-or-return`, `@typescript-eslint/no-floating-promises`,
and `prefer-const` for those paths — mirroring the existing
`handwritten/firestore` GAPIC override.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants