Skip to content

fix(lint): support TypeScript declaration merging#3715

Merged
brianc merged 1 commit into
brianc:masterfrom
noritaka1166:fix/typescript-declaration-merging-lint
Jul 21, 2026
Merged

fix(lint): support TypeScript declaration merging#3715
brianc merged 1 commit into
brianc:masterfrom
noritaka1166:fix/typescript-declaration-merging-lint

Conversation

@noritaka1166

Copy link
Copy Markdown
Contributor

Summary

  • Use the TypeScript-aware @typescript-eslint/no-redeclare rule for
    TypeScript files.
  • Preserve no-redeclare checks for JavaScript files.

Rationale

brianc/node-postgres#3714
updates the lint job to run on Node.js 22, which allows ESLint 10 to run
correctly.

That change exposed a no-redeclare error in pg-query-stream. The error is
a false positive from ESLint's core rule: QueryStream intentionally uses a
class/namespace declaration merge to expose the public QueryStream.Config
type.

This replaces the core rule with TypeScript ESLint's equivalent rule for
TypeScript files, which understands declaration merging.

Validation

  • yarn lint
  • yarn build

@brianc

brianc commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Thank you!

@brianc
brianc merged commit c5e8c9a into brianc:master Jul 21, 2026
12 checks passed
@noritaka1166
noritaka1166 deleted the fix/typescript-declaration-merging-lint branch July 21, 2026 15:40
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