From 84628f670a87f733c2dbdd4a760224844e90029e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Sep 2026 17:40:41 +0000 Subject: [PATCH 1/3] Initial plan From f81855168b241cbefdf88ea72f1610b0fbb78343 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Sep 2026 17:46:02 +0000 Subject: [PATCH 2/3] Fix use-baseline schema stack overflow Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com> --- src/rules/use-baseline.js | 30 ++++++++++-------------------- tests/plugin/eslint.test.js | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 20 deletions(-) diff --git a/src/rules/use-baseline.js b/src/rules/use-baseline.js index 1107a170..e1c340e3 100644 --- a/src/rules/use-baseline.js +++ b/src/rules/use-baseline.js @@ -543,26 +543,16 @@ export default /** @satisfies {UseBaselineRuleDefinition} */ ({ }, allowPropertyValues: { type: "object", - properties: Object.fromEntries( - Array.from(properties.keys()).map(prop => { - const values = new Set([ - ...globalKeywords.keys(), - ...(propertyValues.get(prop)?.keys() ?? []), - ]); - - return [ - prop, - { - type: "array", - items: { - enum: Array.from(values), - }, - uniqueItems: true, - }, - ]; - }), - ), - additionalProperties: false, + propertyNames: { + enum: Array.from(properties.keys()), + }, + additionalProperties: { + type: "array", + items: { + type: "string", + }, + uniqueItems: true, + }, }, allowSelectors: { type: "array", diff --git a/tests/plugin/eslint.test.js b/tests/plugin/eslint.test.js index 8c60fec0..f62c2f02 100644 --- a/tests/plugin/eslint.test.js +++ b/tests/plugin/eslint.test.js @@ -12,6 +12,7 @@ import ESLintAPI from "eslint"; const { ESLint } = ESLintAPI; import assert from "node:assert"; +import { execFileSync } from "node:child_process"; //----------------------------------------------------------------------------- // Tests @@ -71,6 +72,41 @@ describe("Plugin", () => { ); assert.strictEqual(results[0].messages[0].messageId, "emptyBlock"); }); + + it("use-baseline config should compile with limited stack space", () => { + const pluginUrl = new URL("../../src/index.js", import.meta.url).href; + const output = execFileSync( + process.execPath, + [ + "--stack_size=100", + "--input-type=module", + "--eval", + ` + import css from ${JSON.stringify(pluginUrl)}; + import ESLintAPI from "eslint"; + + const { ESLint } = ESLintAPI; + const eslint = new ESLint({ + overrideConfigFile: true, + overrideConfig: { + files: ["**/*.css"], + plugins: { css }, + language: "css/css", + rules: { + "css/use-baseline": "error", + }, + }, + }); + + await eslint.calculateConfigForFile("test.css"); + process.stdout.write("ok"); + `, + ], + { encoding: "utf8", cwd: process.cwd() }, + ); + + assert.strictEqual(output, "ok"); + }); }); describe("languageOptions", () => { From 69bb161823912b09f0e273bbe9187bacd148747b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 23 Sep 2026 13:29:39 +0000 Subject: [PATCH 3/3] Fix bun CI for use-baseline regression test Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com> --- tests/plugin/eslint.test.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/plugin/eslint.test.js b/tests/plugin/eslint.test.js index f62c2f02..3b7d55d5 100644 --- a/tests/plugin/eslint.test.js +++ b/tests/plugin/eslint.test.js @@ -74,9 +74,13 @@ describe("Plugin", () => { }); it("use-baseline config should compile with limited stack space", () => { - const pluginUrl = new URL("../../src/index.js", import.meta.url).href; + const pluginUrl = new URL("../../src/index.js", import.meta.url) + .href; + const nodeExecutable = process.versions.bun + ? "node" + : process.execPath; const output = execFileSync( - process.execPath, + nodeExecutable, [ "--stack_size=100", "--input-type=module",