From 9813531f81103f661d3b845ea46792b1820840b4 Mon Sep 17 00:00:00 2001 From: Sehoon Shon Date: Tue, 10 Feb 2026 14:06:17 -0500 Subject: [PATCH] Update Gemini.md to use the curent year on creating new files (#18460) --- GEMINI.md | 3 +++ eslint.config.js | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/GEMINI.md b/GEMINI.md index 734aa4eb64..daeaa747f7 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -67,6 +67,9 @@ powerful tool for developers. and `packages/core` (Backend logic). - **Imports:** Use specific imports and avoid restricted relative imports between packages (enforced by ESLint). +- **License Headers:** For all new source code files (`.ts`, `.tsx`, `.js`), + include the Apache-2.0 license header with the current year. (e.g., + `Copyright 2026 Google LLC`). This is enforced by ESLint. ## Testing Conventions diff --git a/eslint.config.js b/eslint.config.js index 52620efe49..7839ae78f6 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -23,6 +23,7 @@ const __dirname = path.dirname(__filename); // Determine the monorepo root (assuming eslint.config.js is at the root) const projectRoot = __dirname; +const currentYear = new Date().getFullYear(); export default tseslint.config( { @@ -267,8 +268,8 @@ export default tseslint.config( ].join('\n'), patterns: { year: { - pattern: '202[5-6]', - defaultValue: '2026', + pattern: `202[5-${currentYear.toString().slice(-1)}]`, + defaultValue: currentYear.toString(), }, }, },