Chrome DevTools for coding agents
chore: Update eslint rule to require empty line after license notice. (#784)
zyzyzyryxyf028f8c07562
diff --git a/rollup.config.mjs b/rollup.config.mjsindex 957952de..f3c302b3 100644--- a/rollup.config.mjs+++ b/rollup.config.mjs@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+/*** @fileoverview take from {@link https://github.com/GoogleChromeLabs/chromium-bidi/blob/main/rollup.config.mjs | chromium-bidi}* and modified to specific requirement.diff --git a/scripts/eslint_rules/check-license-rule.js b/scripts/eslint_rules/check-license-rule.jsindex 9c304126..2c6c2cde 100644--- a/scripts/eslint_rules/check-license-rule.js+++ b/scripts/eslint_rules/check-license-rule.js@@ -24,6 +24,7 @@ export default {schema: [],messages: {licenseRule: 'Add license header.',+ emptyLine: 'Add empty line after license header.',},},defaultOptions: [],@@ -64,6 +65,22 @@ export default {header.value.includes('License') ||header.value.includes('Copyright'))) {+ const nextToken = sourceCode.getTokenAfter(header, {+ includeComments: true,+ });+ if (+ nextToken &&+ nextToken.loc.start.line === header.loc.end.line + 1+ ) {+ context.report({+ node: node,+ loc: header.loc,+ messageId: 'emptyLine',+ fix(fixer) {+ return fixer.insertTextAfter(header, '\n');+ },+ });+ }return;}diff --git a/scripts/eval_scenarios/console_test.ts b/scripts/eval_scenarios/console_test.tsindex 803171d4..94ce4da9 100644--- a/scripts/eval_scenarios/console_test.ts+++ b/scripts/eval_scenarios/console_test.ts@@ -3,6 +3,7 @@* Copyright 2026 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import type {TestScenario} from '../eval_gemini.ts';diff --git a/scripts/eval_scenarios/emulation_test.ts b/scripts/eval_scenarios/emulation_test.tsindex 94c34e84..4b6f01c8 100644--- a/scripts/eval_scenarios/emulation_test.ts+++ b/scripts/eval_scenarios/emulation_test.ts@@ -3,6 +3,7 @@* Copyright 2026 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import type {TestScenario} from '../eval_gemini.ts';diff --git a/scripts/eval_scenarios/input_test.ts b/scripts/eval_scenarios/input_test.tsindex b359884d..ca1e28d2 100644--- a/scripts/eval_scenarios/input_test.ts+++ b/scripts/eval_scenarios/input_test.ts@@ -3,6 +3,7 @@* Copyright 2026 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import type {TestScenario} from '../eval_gemini.ts';diff --git a/scripts/eval_scenarios/navigation_test.ts b/scripts/eval_scenarios/navigation_test.tsindex 6942ab56..7619b686 100644--- a/scripts/eval_scenarios/navigation_test.ts+++ b/scripts/eval_scenarios/navigation_test.ts@@ -3,6 +3,7 @@* Copyright 2026 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import type {TestScenario} from '../eval_gemini.ts';diff --git a/scripts/eval_scenarios/network_test.ts b/scripts/eval_scenarios/network_test.tsindex e1ace21e..480c3ec7 100644--- a/scripts/eval_scenarios/network_test.ts+++ b/scripts/eval_scenarios/network_test.ts@@ -3,6 +3,7 @@* Copyright 2026 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import type {TestScenario} from '../eval_gemini.ts';diff --git a/scripts/eval_scenarios/performance_test.ts b/scripts/eval_scenarios/performance_test.tsindex c7c7ae2b..63ab3220 100644--- a/scripts/eval_scenarios/performance_test.ts+++ b/scripts/eval_scenarios/performance_test.ts@@ -3,6 +3,7 @@* Copyright 2026 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import type {TestScenario} from '../eval_gemini.ts';diff --git a/scripts/eval_scenarios/snapshot_test.ts b/scripts/eval_scenarios/snapshot_test.tsindex c5f43ff5..4877c1d1 100644--- a/scripts/eval_scenarios/snapshot_test.ts+++ b/scripts/eval_scenarios/snapshot_test.ts@@ -3,6 +3,7 @@* Copyright 2026 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import type {TestScenario} from '../eval_gemini.ts';diff --git a/src/formatters/SnapshotFormatter.ts b/src/formatters/SnapshotFormatter.tsindex dabd937e..e24c99df 100644--- a/src/formatters/SnapshotFormatter.ts+++ b/src/formatters/SnapshotFormatter.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import type {TextSnapshot, TextSnapshotNode} from '../McpContext.js';export class SnapshotFormatter {diff --git a/src/tools/console.ts b/src/tools/console.tsindex 9c3d145b..ace8f628 100644--- a/src/tools/console.ts+++ b/src/tools/console.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import {zod} from '../third_party/index.js';import type {ConsoleMessageType} from '../third_party/index.js';diff --git a/src/tools/tools.ts b/src/tools/tools.tsindex 227fb0d4..f28ff445 100644--- a/src/tools/tools.ts+++ b/src/tools/tools.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import * as consoleTools from './console.js';import * as emulationTools from './emulation.js';import * as inputTools from './input.js';