Skip to content

Cache lint results for unchanged files#9926

Merged
joehan merged 6 commits intomainfrom
jh-faster-tests
Apr 9, 2026
Merged

Cache lint results for unchanged files#9926
joehan merged 6 commits intomainfrom
jh-faster-tests

Conversation

@joehan
Copy link
Copy Markdown
Member

@joehan joehan commented Feb 13, 2026

Description

Cache lint results for unchanged files. On smaller changes, this saves about a minute per npm run test, which is quite appreciated

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @joehan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves developer workflow efficiency by integrating ESLint caching. By leveraging cached lint results for files that haven't changed, the npm run test command, which includes linting, will execute much faster, saving valuable development time during iterative changes.

Highlights

  • Linting Performance Improvement: Enabled ESLint caching to drastically reduce linting times, particularly for incremental changes, by only processing modified files.
  • Configuration Updates: Modified package.json scripts to utilize the ESLint --cache flag and updated .gitignore to prevent the cache file from being tracked.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .gitignore
    • Added .eslintcache to prevent the ESLint cache file from being committed to the repository.
  • package.json
    • Modified the lint:quiet and lint:ts scripts to include the --cache flag for ESLint, enabling performance improvements.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/node-test.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Code Review

The pull request introduces ESLint caching to improve linting performance, which is a welcome optimization. I have identified a minor redundancy in the package.json scripts where the --cache flag is applied twice when running lint:quiet. Other than that, the changes are correct and follow best practices for ignoring tool-specific cache files.

Comment thread package.json Outdated
"lint:other": "prettier --check '**/*.{md,yaml,yml}'",
"lint:quiet": "npm run lint:ts -- --quiet && npm run lint:other",
"lint:ts": "eslint --config .eslintrc.js --ext .ts,.js .",
"lint:quiet": "npm run lint:ts -- --cache --quiet && npm run lint:other",
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.

medium

The --cache flag is redundant here because it is already included in the lint:ts script definition on line 25. When npm run lint:quiet is executed, it calls npm run lint:ts, which now includes the cache flag by default.

Suggested change
"lint:quiet": "npm run lint:ts -- --cache --quiet && npm run lint:other",
"lint:quiet": "npm run lint:ts -- --quiet && npm run lint:other",

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.

LGTM - can remove the redundant --quiet flag

Comment thread .github/workflows/node-test.yml Outdated
cache-dependency-path: npm-shrinkwrap.json

- name: Cache ESLint
uses: actions/cache@v3
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.

Curious if v3 was chosen over v4 intentionally?

If yes -> comment, if no -> could use v4 😃

Comment thread package.json Outdated
"lint:other": "prettier --check '**/*.{md,yaml,yml}'",
"lint:quiet": "npm run lint:ts -- --quiet && npm run lint:other",
"lint:ts": "eslint --config .eslintrc.js --ext .ts,.js .",
"lint:quiet": "npm run lint:ts -- --cache --quiet && npm run lint:other",
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.

LGTM - can remove the redundant --quiet flag

@joehan joehan enabled auto-merge (squash) February 19, 2026 18:45
@joehan joehan disabled auto-merge February 19, 2026 23:54
@joehan joehan enabled auto-merge (squash) April 9, 2026 22:43
@joehan joehan merged commit 7c4dacf into main Apr 9, 2026
47 checks passed
@joehan joehan deleted the jh-faster-tests branch April 9, 2026 22:55
joehan added a commit that referenced this pull request Apr 16, 2026
* fix(functions): fix permission denied error for Dart deployments on Windows (#10264)

* fix permission denied error for Dart deployments on Windows

* fix lint issues

* address gemini PR comments

* check the endpoint instead of pubspec

* Update src/deploy/functions/prepare.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Assert runtime is present

---------

Co-authored-by: Thomas Bouldin <inlined@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fixing issue 6989 (#10253)

* fixing issue 6989

* adding change logs and reducing the wait time to 1s

* [mcp] ensure project root is resolved before feature detection (#10213)

Resolve the project root inside detectActiveFeatures so auto-detection does not build MCP context before cachedProjectDir is available.

Adds a regression test covering a Flutter project with firebase_crashlytics and firebase_options.dart.

Refs #10211.

Co-authored-by: Joe Hanley <joehanley@google.com>

* Rename 'functionsrunapionly' experiment 'dartfunctions'. (#10269)

Fixes #10267

Co-authored-by: Andy Perelson <ajp@google.com>

* Fix incorrect FAL event type. Add regression exception & test (#10268)

* Fix incorrect FAL event type. Add regression exception & test

* Remove redundant service lookup

* Change the default App Hosting region to us-east4 (#10271)

* Change the default App Hosting region to us-east4

* Changelog

---------

Co-authored-by: Bryan Kendall <bkend@google.com>

* middleware/proxy fixes for next.js 16 (#9631)

* middleware/proxy fixes for next.js 15/16

* changelog

* check src directory

* document middleware check in dev mode

* update middleware types docs

* Apply suggestion from @leoortizz

* remove extra space

* update changelog

* fix: detect next/image usage in client components (#10228)

* detect next/image usage in client components

* pr review

* format

* format test file

* pr review

* changelog

* feat: enable fdcrealtime by default and inject clientCache into SDK generation configurations (#10279)

* Revert "Rename 'functionsrunapionly' experiment 'dartfunctions'. (#10269)"

This reverts commit a6c0c22.

* Alternate link to Cloud Console (#10283)

* Alternate link to Cloud Console

* Fix URL. Bad AI

* Restore type safety for runtimes

* Linter error

* Update FDC emulator to v3.3.9 (#10290)

* Update FDC emulator to v3.4.1

- Upgraded Go runtime to 1.25.9.
- Bug fix: Fixed an issue that caused Angular SDK generation to fail.

* Rearrange entries in CHANGELOG.md

Reorganize changelog entries for clarity and consistency.

* Add enterprise edition support in Firestore Emulator (#10280)

* initial impl of datbase edition in fs emulator

* updated to include manual CLI override

* updated naming of flag

* quick linter fix

* update JSON schema

* fixing check on invalid flag input

* Undo nom.shrinkwrap.json change..

* Changed wrong line oops.

* removing manual flag option

* ran npm run format

* update CHANGELOG

* minor update to description

* run format

* read prod edition as well, with emulator edition taking precedence

* Update CHANGELOG.md

Co-authored-by: Joe Hanley <joehanley@google.com>

---------

Co-authored-by: Joe Hanley <joehanley@google.com>

* Another attempt to fix the npm propogation delay issues on publish (#10303)

* handle powershell stripping commas (#10288)

* handle powershell stripping commas

* remove console log

* changelog entry

* add ai suggestion

---------

Co-authored-by: Joe Hanley <joehanley@google.com>

* 15.14.0

* [firebase-release] Removed change log and reset repo after 15.14.0 release

* Increase default test timeout to 2s (#10308)

* Cache lint results for unchanged files (#9926)

* Cache lint results for unchanged files

* pr fixes

* Create new "dartfunctions" experiment

This creates a new experiment to enable Dart for Cloud Functions, and
separates out some of the dart-specific features gated by the
functionsrunapionly experiment.

* Remove unused experiments library

* Update "shows Dart as an option" test

Should be using the dartfunctions experiment now

* Updating to pubusb 0.8.30 (#10326)

* sql connect rename (#10289)

* Rename Firebase Data Connect displayed text to SQL Connect (#10270)

* Rename Data Connect displayed text to SQL Connect

Co-authored-by: fredzqm <9068391+fredzqm@users.noreply.github.com>

* Update src/emulator/dataconnectEmulator.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Added CHANGELOG entry

Co-authored-by: fredzqm <9068391+fredzqm@users.noreply.github.com>

* Update CHANGELOG.md

* Answered PR comments

Co-authored-by: fredzqm <9068391+fredzqm@users.noreply.github.com>

* Update experiments.ts

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Add a skill for addressing vulnerable dependencies in the Firebase Docker image (#10321)

* First draft of skill

* Updating docker iamge script to allow statging changes, and updating skill to use it

* Clean up script

* Update FDC emulator to v3.4.4 (#10330)

* remaining sql connect fixes (#10328)

* Reference pub.dev package in dart template (#10335)

* Clean up old broken FDL code (#10339)

* feat: remove Firebase Dynamic Links references from codebase

### Description
Removed all configurations and usages pointing to the decommissioned Firebase Dynamic Links service.

### Scenarios Tested
None applicable

### Sample Commands
None applicable

* No CHANGELOG today

* feat: add warnings when using experimental triggers in Dart runtime (#10338)

Co-authored-by: Guillaume Bernos <guillaume@bernos.dev>
Co-authored-by: Jeff <3759507+jhuleatt@users.noreply.github.com>

* fix: resolve dependency vulnerabilities and upgrade lsofi (#10342)

### Description
- Resolved multiple reported security vulnerabilities via precise overrides in package.json.
- Upgraded yaml to a safe version ^2.8.3.
- Upgraded lsofi from 1.0.0 to ^2.0.0.

### Scenarios Tested
- npm install builds cleanly.
- TypeScript compilation verified.

### Sample Commands
npm audit

* Update FDC emulator to v3.4.5 (#10343)

* Update FDC emulator to v3.4.5

- [fixed] Kotlin codegen missing comma between parameters (#10336)

* Apply suggestion from @gemini-code-assist[bot]

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update CHANGELOG.md

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Add a general Dart changelog entry (#10347)

* Add a general Dart changelog entry

* Update CHANGELOG.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* remove the other dart changelog line

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Harden FAL registration (#10306)

* Harden FAL registration

* PR feedback. Linter

---------

Co-authored-by: Joe Hanley <joehanley@google.com>

* Default function regions are decided much later in prepare (#10293)

* Default regions are decided much later in prepare and can be per-function type

* Changelog

* Update src/deploy/functions/prepare.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Fix stupid test bug

* typos

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* 2.3.0 (#10357)

* Function rename deletion sequence change (#10317)

* Function rename deletion sequence change

* addressing review comments

* linting fixes

* Review changes

* Lint fixes

* Review comments

* trigger ci

* Update codcecov to v5 (#10358)

* fix: dartfunctions experiment should be able to list run services (#10354)

* fix: dartfunctions experiment should be able to list run services

Previously, trying to update a Dart function with dartfunctions enabled
would be broken because it didn't know to list the run services.

* Fix cleanup for mixed deployments

This checks for the "cloudfunctions" string in labels for v2 functions,
and temporarily adds the deployment-tool tag to the endpoint for Run
functions so it is discoverable during cleanup.

* Fix Dart Deploy.

* formatting

* test fixes

---------

Co-authored-by: Andy Perelson <ajp@google.com>
Co-authored-by: Joe Hanley <joehanley@google.com>

* Add client-name annotation to revision template for run functions (#10359)

Co-authored-by: Joe Hanley <joehanley@google.com>

* 15.15.0

* [firebase-release] Removed change log and reset repo after 15.15.0 release

* feat: add SSE mode support for MCP server

### Description
Adds support for running the MCP server in SSE (HTTP) mode, in addition to the default Stdio transport. This allows clients to connect over network or via tools that support SSE.

### Scenarios Tested
- Started server in SSE mode and verified log output.

* fix: add progressToken to McpContext interface to fix build error

### Description
Fixes a type error where progressToken was not defined on McpContext.

### Scenarios Tested
- Verified build succeeds.

* refactor: address PR comments on SSE support

### Description
Addresses PR comments by:
- Moving inline require calls to top-level imports.
- Replacing any types with specific interfaces or unknown.

### Scenarios Tested
- Verified build succeeds.

* fix: address remaining review comments on SSE support

### Description
- Reverts accidental GA4 tracking change in mcpListResources.
- Replaces console.error with this.logger calls for better logging.
- Changes default server binding from 0.0.0.0 to 127.0.0.1 for security.

### Scenarios Tested
- Verified build succeeds.

* style: lint and format fixes for SSE support

### Description
- Applied auto-formatting fixes from npm run format.

### Scenarios Tested
- Verified build succeeds.

* feat: add infrastructure for MCP Apps (#10259)

* feat: add infrastructure for MCP Apps

### Description
Adds support for returning structured content from tools, which is used by MCP Apps to pass complex data to the host. Also updates the resource index.

### Scenarios Tested
- Verified build and file changes.

* fix: resolve build errors and address review comments on infra

### Description
- Removes imports and registry entries for UI resources that are not yet available in this branch (login, update_environment, deploy, init).
- Replaces as any in toContent with an intersection type for better type safety.

### Scenarios Tested
- Verified build succeeds.

* chore: avoid any for sessionId in SSE transport

### Description
- Defines a local interface extending SSEServerTransport to avoid using  when accessing .

### Scenarios Tested
- Build succeeds.
- Lint passes for modified lines.

* feat: change sse flag to mode flag and fix build errors

### Description
- Replaced  boolean flag with  string flag (defaults to 'stdio').
- Added validation for  to accept only 'stdio' or 'sse'.
- Fixed build errors by adding  to  interface and removing missing  resource.

### Scenarios Tested
- Build succeeds.
- Lint passes with no new errors.

* feat: add mcpapps experiment flag and helper

### Description
- Adds mcpapps experiment flag to src/experiments.ts.
- Adds applyAppMeta helper function to src/mcp/util.ts to conditionally add UI metadata.
- Adds unit tests for applyAppMeta in src/mcp/util.spec.ts.

### Scenarios Tested
- Unit tests passed.
- Build succeeds.

* chore: address PR comments on experiments and util

### Description
- Fixes applyAppMeta to preserve existing metadata.
- Moves mcpapps flag to be grouped with other MCP experiments.
- Removes as any in util.spec.ts by importing CallToolResult.

### Scenarios Tested
- Build succeeds.
- Lint passes for modified files (ignoring pre-existing warnings).
- Unit tests for applyAppMeta pass.

* feat: add infrastructure for MCP Apps

Adds support for returning structured content from tools, which is used by MCP Apps to pass complex data to the host. Also updates the resource index.

- Verified build and file changes.

* feat: add Update Environment MCP App

### Description
Adds the Update Environment MCP App, allowing users to switch projects and directories from the UI.

### Scenarios Tested
- Verified build and file changes.

* feat: add Init MCP App

### Description
Adds the Init MCP App for interactive initialization of Firestore and Auth products. Includes support for Google Sign-In configuration and project selection.

### Scenarios Tested
- Verified build and file changes.

* chore: address PR comments and fix build on mcp-init-app

- Remove non-existent login_ui and deploy_ui from resources index to fix build.

- Avoid using any in mcp-app.ts, use specific interfaces.

- Check isError on tool results.

- Reduce page_size to 1000.

- Fix lint warnings for catch blocks.

* fix: add missing vite.config.ts for update_environment MCP app

* chore: add missing MCP app dependencies and update shrinkwrap on mcp-init-app

* fix: resolve lint errors for unused variables on mcp-init-app

* chore: format mcp-app.ts to fix lint issues

* refactor: clean up typing and UI options structure per review

* feat: add deploy and deploy_status tools

### Description
Adds firebase_deploy and deploy_status tools to support asynchronous deployment and status polling.

### Scenarios Tested
- Verified file changes.

* feat: use applyAppMeta in deploy tool and recover jobs.ts

### Description
- Updates deploy tool to use applyAppMeta to conditionally return UI resource URI.
- Recovers missing src/mcp/util/jobs.ts from compiled version.

### Scenarios Tested
- Build succeeds.
- Lint passes for these files.

* chore: address PR comments and fix build on mcp-deploy-tools

- Export TARGETS from src/deploy/index.ts to avoid duplication.

- Fix any usages in deploy.ts and deploy_status.ts.

- Add index signature to Job interface in jobs.ts.

- Fix lint warnings and errors.

* refactor: enforce specific types for deploy tool options

---------

Co-authored-by: Lahiru Maramba <llahiru@gmail.com>
Co-authored-by: Thomas Bouldin <inlined@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: shettyvarun268 <shettyvarun@google.com>
Co-authored-by: Luke Memet <1598289+lukemmtt@users.noreply.github.com>
Co-authored-by: Andy Perelson <ajperel@users.noreply.github.com>
Co-authored-by: Andy Perelson <ajp@google.com>
Co-authored-by: Bryan Kendall <bkend@google.com>
Co-authored-by: Leonardo Ortiz <83593673+leoortizz@users.noreply.github.com>
Co-authored-by: Akhil Raveendran <153134308+itsrakhil@users.noreply.github.com>
Co-authored-by: Wanda Mora <42626188+wandamora@users.noreply.github.com>
Co-authored-by: Fred Zhang <fredzqm@google.com>
Co-authored-by: harshyyy21 <harshoza24@gmail.com>
Co-authored-by: aalej <alejandromarco@google.com>
Co-authored-by: Google Open Source Bot <firebase-oss-bot@google.com>
Co-authored-by: Wanda Mora <morawand@google.com>
Co-authored-by: Harold Shen <hlshen@google.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Jeff <3759507+jhuleatt@users.noreply.github.com>
Co-authored-by: Guillaume Bernos <guillaume@bernos.dev>
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.

3 participants