From 94da87e5c92fdd6821262beedbfd219bdbd07624 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 6 Feb 2025 17:45:08 -0800 Subject: [PATCH] Remove vscode-dts-region-comments (#239868) This is from how the old vscode.proposed.d.ts was managed, and is no longer relevant --- .../vscode-dts-region-comments.ts | 40 ------------------- eslint.config.js | 1 - ...scode.proposed.chatParticipantPrivate.d.ts | 4 ++ 3 files changed, 4 insertions(+), 41 deletions(-) delete mode 100644 .eslint-plugin-local/vscode-dts-region-comments.ts diff --git a/.eslint-plugin-local/vscode-dts-region-comments.ts b/.eslint-plugin-local/vscode-dts-region-comments.ts deleted file mode 100644 index b08dc6357bb..00000000000 --- a/.eslint-plugin-local/vscode-dts-region-comments.ts +++ /dev/null @@ -1,40 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as eslint from 'eslint'; - -export = new class ApiEventNaming implements eslint.Rule.RuleModule { - - readonly meta: eslint.Rule.RuleMetaData = { - messages: { - comment: 'region comments should start with a camel case identifier, `:`, then either a GH issue link or owner, e.g #region myProposalName: https://github.com/microsoft/vscode/issues/', - }, - schema: false, - }; - - create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener { - - const sourceCode = context.getSourceCode(); - - return { - ['Program']: (_node: any) => { - for (const comment of sourceCode.getAllComments()) { - if (comment.type !== 'Line') { - continue; - } - if (!/^\s*#region /.test(comment.value)) { - continue; - } - if (!/^\s*#region ([a-z]+): (@[a-z]+|https:\/\/github.com\/microsoft\/vscode\/issues\/\d+)/i.test(comment.value)) { - context.report({ - node: comment, - messageId: 'comment', - }); - } - } - } - }; - } -}; diff --git a/eslint.config.js b/eslint.config.js index b3167b40a5c..7263f381313 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -268,7 +268,6 @@ export default tseslint.config( 'local/vscode-dts-cancellation': 'warn', 'local/vscode-dts-use-export': 'warn', 'local/vscode-dts-use-thenable': 'warn', - 'local/vscode-dts-region-comments': 'warn', 'local/vscode-dts-vscode-in-comments': 'warn', 'local/vscode-dts-provider-naming': [ 'warn', diff --git a/src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts b/src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts index b5b7c170df3..e9311b26f38 100644 --- a/src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +++ b/src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts @@ -128,6 +128,8 @@ declare module 'vscode' { tooltip?: string | MarkdownString; } + // #region Chat participant detection + export interface ChatParticipantMetadata { participant: string; command?: string; @@ -146,4 +148,6 @@ declare module 'vscode' { export namespace chat { export function registerChatParticipantDetectionProvider(participantDetectionProvider: ChatParticipantDetectionProvider): Disposable; } + + // #endregion }