From a91e6b684ba2cc23ce4da04874004b4cf9b2e952 Mon Sep 17 00:00:00 2001 From: aslezar <97354675+aslezar@users.noreply.github.com> Date: Sun, 29 Dec 2024 15:24:38 +0530 Subject: [PATCH 1/3] feat: support custom js switch-case indentation --- extensions/typescript-language-features/package.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/typescript-language-features/package.json b/extensions/typescript-language-features/package.json index 51ac7bd20c9..0ad561675b6 100644 --- a/extensions/typescript-language-features/package.json +++ b/extensions/typescript-language-features/package.json @@ -532,6 +532,12 @@ "description": "%format.indentSwitchCase%", "scope": "resource" }, + "javascript.format.indentSwitchCase": { + "type": "boolean", + "default": true, + "description": "%format.indentSwitchCase%", + "scope": "resource" + }, "javascript.validate.enable": { "type": "boolean", "default": true, From 97a5f18d0d41171eb00d7a3aa7c1056c5bd35a5f Mon Sep 17 00:00:00 2001 From: aslezar <97354675+aslezar@users.noreply.github.com> Date: Tue, 31 Dec 2024 13:06:32 +0530 Subject: [PATCH 2/3] fix: update descriptions for switch-case indentation settings in TypeScript and JavaScript --- extensions/typescript-language-features/package.json | 4 ++-- extensions/typescript-language-features/package.nls.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/typescript-language-features/package.json b/extensions/typescript-language-features/package.json index 0ad561675b6..a58e678e328 100644 --- a/extensions/typescript-language-features/package.json +++ b/extensions/typescript-language-features/package.json @@ -529,13 +529,13 @@ "typescript.format.indentSwitchCase": { "type": "boolean", "default": true, - "description": "%format.indentSwitchCase%", + "description": "%typescript.format.indentSwitchCase%", "scope": "resource" }, "javascript.format.indentSwitchCase": { "type": "boolean", "default": true, - "description": "%format.indentSwitchCase%", + "description": "%javascript.format.indentSwitchCase%", "scope": "resource" }, "javascript.validate.enable": { diff --git a/extensions/typescript-language-features/package.nls.json b/extensions/typescript-language-features/package.nls.json index 6a7dc26a24d..d5ea7061498 100644 --- a/extensions/typescript-language-features/package.nls.json +++ b/extensions/typescript-language-features/package.nls.json @@ -40,7 +40,8 @@ "format.semicolons.ignore": "Don't insert or remove any semicolons.", "format.semicolons.insert": "Insert semicolons at statement ends.", "format.semicolons.remove": "Remove unnecessary semicolons.", - "format.indentSwitchCase": "Indent case clauses in switch statements. Requires using TypeScript 5.1+ in the workspace.", + "typescript.format.indentSwitchCase": "Indent case clauses in switch statements in TypeScript Files. Requires using TypeScript 5.1+ in the workspace.", + "javascript.format.indentSwitchCase": "Indent case clauses in switch statements in JavaScript Files. Requires using TypeScript 5.1+ in the workspace.", "javascript.validate.enable": "Enable/disable JavaScript validation.", "javascript.goToProjectConfig.title": "Go to Project Configuration (jsconfig / tsconfig)", "typescript.goToProjectConfig.title": "Go to Project Configuration (tsconfig)", From d8ea024868c9a487036bfbacca6471417320527b Mon Sep 17 00:00:00 2001 From: aslezar <97354675+aslezar@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:49:27 +0530 Subject: [PATCH 3/3] chore: used same message decription for TS and JS --- extensions/typescript-language-features/package.json | 4 ++-- extensions/typescript-language-features/package.nls.json | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/typescript-language-features/package.json b/extensions/typescript-language-features/package.json index 24c672ce7c4..b47af81f94a 100644 --- a/extensions/typescript-language-features/package.json +++ b/extensions/typescript-language-features/package.json @@ -528,13 +528,13 @@ "typescript.format.indentSwitchCase": { "type": "boolean", "default": true, - "description": "%typescript.format.indentSwitchCase%", + "description": "%format.indentSwitchCase%", "scope": "resource" }, "javascript.format.indentSwitchCase": { "type": "boolean", "default": true, - "description": "%javascript.format.indentSwitchCase%", + "description": "%format.indentSwitchCase%", "scope": "resource" }, "javascript.validate.enable": { diff --git a/extensions/typescript-language-features/package.nls.json b/extensions/typescript-language-features/package.nls.json index d5ea7061498..6a7dc26a24d 100644 --- a/extensions/typescript-language-features/package.nls.json +++ b/extensions/typescript-language-features/package.nls.json @@ -40,8 +40,7 @@ "format.semicolons.ignore": "Don't insert or remove any semicolons.", "format.semicolons.insert": "Insert semicolons at statement ends.", "format.semicolons.remove": "Remove unnecessary semicolons.", - "typescript.format.indentSwitchCase": "Indent case clauses in switch statements in TypeScript Files. Requires using TypeScript 5.1+ in the workspace.", - "javascript.format.indentSwitchCase": "Indent case clauses in switch statements in JavaScript Files. Requires using TypeScript 5.1+ in the workspace.", + "format.indentSwitchCase": "Indent case clauses in switch statements. Requires using TypeScript 5.1+ in the workspace.", "javascript.validate.enable": "Enable/disable JavaScript validation.", "javascript.goToProjectConfig.title": "Go to Project Configuration (jsconfig / tsconfig)", "typescript.goToProjectConfig.title": "Go to Project Configuration (tsconfig)",