mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-15 07:28:05 +00:00
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:
@@ -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',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user