Skip to content

feat(internal/librarian/nodejs): remove eslint files during post-prcessing - #6020

Merged
quirogas merged 2 commits into
googleapis:mainfrom
quirogas:feat/delete-untracked-linter-files
May 15, 2026
Merged

quirogas merged 2 commits into
googleapis:mainfrom
quirogas:feat/delete-untracked-linter-files

Conversation

@quirogas

@quirogas quirogas commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

Currently, gapic-generator-typescript unconditionally emits per-library linter configuration files (.eslintignore, .eslintrc.json, .prettierignore, .prettierrc.js, .prettierrc.cjs) during code generation. However, following the centralized linter overhaul in google-cloud-node/pull/8266, individual package-level linter configurations are completely redundant and conflict with the shared monorepo-wide configuration. When Librarian executes generation sweeps, these generated linter files remain in the working tree as untracked artifacts.

This PR isolates the cleanup within the Node.js post-processing pipeline as a temporary patch that tracks the gapic-generator-typescript fix.

Closes #5956

@quirogas quirogas self-assigned this May 15, 2026

@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 introduces a post-processing cleanup step in the Node.js librarian to remove redundant linter configuration files, such as .eslintrc.json and .prettierrc.js, which are unconditionally generated by the GAPIC generator. The new removeRedundantLinterFiles function performs this cleanup while allowing specific files to be preserved via configuration. Comprehensive unit tests have been added to ensure the logic correctly handles various scenarios. The reviewer noted that the TODO comment in the code contains a placeholder issue number that should be updated to a real tracking issue.

Comment thread internal/librarian/nodejs/generate.go Resolved
@quirogas
quirogas marked this pull request as ready for review May 15, 2026 00:43
@quirogas
quirogas requested a review from a team as a code owner May 15, 2026 00:43
@quirogas
quirogas enabled auto-merge (squash) May 15, 2026 06:28
@quirogas
quirogas merged commit 1c78c5e into googleapis:main May 15, 2026
25 of 26 checks passed
@quirogas
quirogas deleted the feat/delete-untracked-linter-files branch May 15, 2026 22:33
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.

nodejs: Investigate Untracked ESLint Configuration File Generation

2 participants