tweak event-naming rule and remove disable-pragma from vscode.d.ts, (#154914)

fixes https://github.com/microsoft/vscode/issues/154526
This commit is contained in:
Johannes Rieken 2022-07-12 14:28:07 +02:00 committed by GitHub
parent 261e65f44e
commit 2e247a1162
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 4 deletions

View file

@ -76,7 +76,7 @@ module.exports = new (_a = class ApiEventNaming {
if (def.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
return def;
}
else if ((def.type === experimental_utils_1.AST_NODE_TYPES.TSPropertySignature || def.type === experimental_utils_1.AST_NODE_TYPES.Property) && def.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
else if ((def.type === experimental_utils_1.AST_NODE_TYPES.TSPropertySignature || def.type === experimental_utils_1.AST_NODE_TYPES.PropertyDefinition) && def.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
return def.key;
}
return this.getIdent(def.parent);

View file

@ -88,11 +88,10 @@ export = new class ApiEventNaming implements eslint.Rule.RuleModule {
if (def.type === AST_NODE_TYPES.Identifier) {
return def;
} else if ((def.type === AST_NODE_TYPES.TSPropertySignature || def.type === AST_NODE_TYPES.Property) && def.key.type === AST_NODE_TYPES.Identifier) {
} else if ((def.type === AST_NODE_TYPES.TSPropertySignature || def.type === AST_NODE_TYPES.PropertyDefinition) && def.key.type === AST_NODE_TYPES.Identifier) {
return def.key;
}
return this.getIdent(def.parent);
}
};

View file

@ -1608,7 +1608,6 @@ declare module 'vscode' {
/**
* The event listeners can subscribe to.
*/
// eslint-disable-next-line vscode-dts-event-naming
event: Event<T>;
/**