Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the @typescript-eslint/no-use-before-define lint rule from the ESLint configuration and cleans up an obsolete eslint-disable-next-line comment in src/ensureApiEnabled.ts. I have no additional feedback to provide as these changes are straightforward and clean up the codebase.
joehan
marked this pull request as ready for review
November 6, 2026 23:59
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves Buganizer b/582886459 (parent goal b/565072516).
Turns off
@typescript-eslint/no-use-before-defineby removing its.eslintrc.jsoverrides instead of keeping"off"entries:"@typescript-eslint/no-use-before-define": ["warn", { functions: false, typedefs: false }](and itsTODO(bkendall)comment) from the*.tsoverride in.eslintrc.js."@typescript-eslint/no-use-before-define": "off"entry from the*.jsoverride in.eslintrc.js. None of the extended ESLint/TypeScript configs enable@typescript-eslint/no-use-before-defineor baseno-use-before-define, so deleting both entries disables the rule everywhere.// eslint-disable-next-line @typescript-eslint/no-use-before-definecomment insrc/ensureApiEnabled.ts.Skipped file: Left the
// eslint-disable-next-line @typescript-eslint/no-use-before-definecomment inscripts/integration-helpers/cli.tsuntouched to avoid a merge conflict with open PR #11120 (which rewrites lines 50–75). SincereportUnusedDisableDirectivesis not enabled, leaving it produces no warnings or errors.(Note for reviewers: if you prefer keeping
@typescript-eslint/no-use-before-defineenabled for same-scope use-before-define rather than turning it off, setting["warn", { functions: false, classes: false, variables: false, enums: false, typedefs: false }]also eliminates all 38 existing warnings across the codebase.)Scenarios Tested
ESLint.calculateConfigForFileonsrc/apiv2.ts,src/apiv2.spec.ts, andscripts/sanitize-lockfile.js: confirmed@typescript-eslint/no-use-before-defineandno-use-before-defineboth evaluate toundefined.npx eslint --config .eslintrc.js --ext .ts,.js . --format json: confirmed 0 errors and 0@typescript-eslint/no-use-before-definemessages across 1,434 files.npm run lint:quiet: passed (ESLint + Prettier).npm run build,npx tsc --noEmit -p tsconfig.json, andnpm run test:compile: passed.npx mocha src/ensureApiEnabled.spec.ts: 21 passing.npm run mocha: 5,934 passing, 11 pending (1 unrelatedEADDRINUSEon port 52672 insrc/apiv2.spec.ts"with a proxy" hook from concurrent test runs on the shared host).Sample Commands
N/A (dev-only ESLint configuration change).