From e05618896f17cce348e7ce36d9ed5fb31dbbabe6 Mon Sep 17 00:00:00 2001 From: Allen Date: Fri, 31 Oct 2025 15:40:57 -0400 Subject: [PATCH 1/2] fix(vscode-webui): refine i18next lint rules to reduce false positives Limit i18next/no-literal-string checks to JSX-only mode and exclude developer-oriented strings --- packages/vscode-webui/eslint.config.mjs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/vscode-webui/eslint.config.mjs b/packages/vscode-webui/eslint.config.mjs index 34afd1ad99..36bf391d7c 100644 --- a/packages/vscode-webui/eslint.config.mjs +++ b/packages/vscode-webui/eslint.config.mjs @@ -22,7 +22,21 @@ export default [ "i18next/no-literal-string": [ "error", { - mode: "jsx-text-only", // only check jsx + mode: "jsx-only", // limit to JSX text and attributes to reduce noise + // Only check user-facing attributes; ignore design/technical attrs like className/variant/size/id + "jsx-attributes": { + include: [ + "^title$", + "^alt$", + "^placeholder$", + "^label$", + ], + }, + // Ignore developer-oriented strings passed to specific utility calls + callees: { + // Do not validate any function call arguments globally to reduce noise + exclude: [".*"], + }, words: { exclude: [ // Numbers and common symbols @@ -38,6 +52,10 @@ export default [ "^(px|rem|em|%|vh|vw|auto|none|inherit|KB|MB|GB|ms|s|min|h)$", // Boolean and null values "^(true|false|null|undefined)$", + // Single letters (initials) + "^[A-Za-z]$", + // Brand names + "^Pochi$", ], }, }, From 429d75342ecd68174d58e6063557acb7cdde8dae Mon Sep 17 00:00:00 2001 From: Allen Date: Fri, 31 Oct 2025 17:11:55 -0400 Subject: [PATCH 2/2] style(eslint): format jsx-attributes array for better readability --- packages/vscode-webui/eslint.config.mjs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/vscode-webui/eslint.config.mjs b/packages/vscode-webui/eslint.config.mjs index 36bf391d7c..70b4066d75 100644 --- a/packages/vscode-webui/eslint.config.mjs +++ b/packages/vscode-webui/eslint.config.mjs @@ -25,12 +25,7 @@ export default [ mode: "jsx-only", // limit to JSX text and attributes to reduce noise // Only check user-facing attributes; ignore design/technical attrs like className/variant/size/id "jsx-attributes": { - include: [ - "^title$", - "^alt$", - "^placeholder$", - "^label$", - ], + include: ["^title$", "^alt$", "^placeholder$", "^label$"], }, // Ignore developer-oriented strings passed to specific utility calls callees: {