Skip to content

Standardize license headers and fix ESLint config#2430

Merged
rfontanarosa merged 14 commits intomasterfrom
rfontanarosa/1833/code-health-add-lint-check-for-copyright-headers
Apr 9, 2026
Merged

Standardize license headers and fix ESLint config#2430
rfontanarosa merged 14 commits intomasterfrom
rfontanarosa/1833/code-health-add-lint-check-for-copyright-headers

Conversation

@rfontanarosa
Copy link
Copy Markdown
Collaborator

closes #1833

@auto-assign auto-assign bot requested a review from gino-m February 15, 2026 20:32
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @rfontanarosa, 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 focuses on enhancing code quality and legal clarity by standardizing license headers throughout the project. It achieves this by integrating a new ESLint plugin to automatically check and enforce the presence and format of Apache 2.0 license headers in TypeScript and JavaScript files. The changes also include necessary updates to the ESLint configuration and development dependencies to support this new enforcement, alongside minor adjustments to package management files.

Highlights

  • License Header Standardization: Introduced eslint-plugin-headers to enforce a consistent Apache 2.0 license header across all TypeScript and JavaScript files, ensuring legal compliance and code uniformity.
  • ESLint Configuration Updates: Modified the main ESLint configuration (eslint.config.mjs) to integrate the new header plugin and updated the lint command in web/package.json to properly forward arguments.
  • Dependency Management: Updated various development dependencies, including several ESLint-related packages, to their latest versions in pnpm-workspace.yaml and added eslint-plugin-headers.

🧠 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
  • eslint.config.mjs
    • Imported eslint-plugin-headers for license header enforcement.
    • Added headers plugin to the ESLint configuration.
    • Configured a new headers/header-format rule to enforce a specific Apache 2.0 license header for .ts and .js files.
  • package.json
    • Added eslint-plugin-headers to devDependencies.
    • Modified the lint target's dependsOn configuration to forward parameters.
  • pnpm-workspace.yaml
    • Updated versions for several ESLint-related development dependencies.
    • Added eslint-plugin-headers to the dev catalog.
    • Removed single quotes from package names in the packages list.
    • Removed a blank line.
  • web/package.json
    • Modified the lint command to include {args} for forwarding additional arguments.
Activity
  • The pull request was created by rfontanarosa to address issue [Code health] Add lint check for copyright headers #1833, which aimed to standardize license headers and fix ESLint configuration.
  • Changes were implemented across eslint.config.mjs, package.json, pnpm-workspace.yaml, and web/package.json to achieve the stated goals.
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.

@rfontanarosa rfontanarosa self-assigned this Feb 15, 2026
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 successfully introduces eslint-plugin-headers to enforce standardized license headers and improves the NX linting configuration by allowing argument forwarding. However, there are some inconsistencies in the quote style used in the new ESLint configuration, and the license header template uses double quotes which conflicts with the existing single-quote style found in the repository (including the eslint.config.mjs file itself). Additionally, the header check is currently limited to JavaScript and TypeScript files, while the PR title suggests a broader standardization that should likely include HTML files as well.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.24%. Comparing base (bb68f89) to head (6f0aea3).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2430   +/-   ##
=======================================
  Coverage   60.24%   60.24%           
=======================================
  Files         115      115           
  Lines        2830     2830           
  Branches      425      425           
=======================================
  Hits         1705     1705           
  Misses       1064     1064           
  Partials       61       61           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ck-for-copyright-headers

# Conflicts:
#	eslint.config.mjs
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
#	web/package.json
gino-m
gino-m previously approved these changes Apr 3, 2026
…ck-for-copyright-headers

# Conflicts:
#	pnpm-lock.yaml
@rfontanarosa rfontanarosa merged commit abd691f into master Apr 9, 2026
9 checks passed
@rfontanarosa rfontanarosa deleted the rfontanarosa/1833/code-health-add-lint-check-for-copyright-headers branch April 9, 2026 16:10
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.

[Code health] Add lint check for copyright headers

3 participants