Remove vscode-dts-region-comments (#239868)

This is from how the old vscode.proposed.d.ts was managed, and is no longer relevant
This commit is contained in:
Rob Lourens
2025-02-06 17:45:08 -08:00
committed by GitHub
parent 245b24a958
commit 94da87e5c9
3 changed files with 4 additions and 41 deletions

View File

@@ -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/<number>',
},
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: <any>comment,
messageId: 'comment',
});
}
}
}
};
}
};

View File

@@ -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',

View File

@@ -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
}